The purpose of this paper is to present a method to calculate the derivativ
e of a functional that depends on the shape of an object. This functional d
epends on the solution of a linear acoustic problem posed in an unbounded d
omain. We rewrite this problem in terms of another one posed in a bounded d
omain using the Dirichlet-to-Neumann (DtN) map oi the modified DtN map. Usi
ng a classical method in shape sensitivity analysis, called the adjoint met
hod, we are able to calculate the derivative of the functional using the so
lution of an auxiliary problem. This method is particularly efficient becau
se the cost of calculating the derivatives is independent of the number of
parameters used to approximate the shape of the domain. The resulting varia
tional problems are discretized using the finite-element method and solved
using an efficient Krylov-subspace iterative scheme. Numerical examples tha
t illustrate the efficacy of our approach are presented.