In this paper, we propose a domain embedding method associated with an opti
mal boundary control problem with boundary observations to solve elliptic p
roblems. We prove that the optimal boundary control problem has a unique so
lution if the controls are taken in a finite dimensional subspace of the sp
ace of the boundary conditions on the auxiliary domain.
Using a controllability theorem due to J. L. Lions, we prove that the solut
ions of Dirichlet ( or Neumann) problems can be approximated within any pre
scribed error, however small, by solutions of Dirichlet ( or Neumann) probl
ems on the auxiliary domain taking an appropriate subspace for such an opti
mal control problem. We also prove that the results obtained for the interi
or problems hold for the exterior problems. Some numerical examples are giv
en for both the interior and the exterior Dirichlet problems.