Potential flow problems around immersed bodies have been treated by an optimization approach. When the stream function is used as the field variable, the boundary values may not be known a priori and may be taken as the decision parameters to minimize integral objective functionals. The circulation integrals around the immersed bodies or the Kutta condition at the trailing edges of the bodies may be used to construct the objective function of optimization. The sensitivity analysis needed for the minimization process is performed by the adjoint variable method, while the numerical solutions of the primary (flow) and adjoint equations have been obtained by the finite element method. Having checked the present method with exact solutions and the classical superposition method, several flow problems involving one or more immersed bodies with or without circulation are investigated numerically. (C) 1998 John Wiley & Sons, Ltd.