Torsion analysis of prismatic bars has been treated by an optimization approach using the twist angle and the boundary values of the stress function as decision parameters. The sensitivity analysis of the objective function is performed by the adjoint variable method. Solution of the primary and adjoint problems are achieved by the finite element method. The minimizations of the objective functions are done using the BFGS variable metric method. After checking the numerical algorithm with exact solutions, several example problems are investigated by the present method of analysis. Copyright (C) 1999 John Wiley & Sons, Ltd.