Second-order inhomogeneous linear Dirichlet and Neumann problems of divergent form in n dimensions (n-3) are considered. For a given Dirichlet or Neumann problem, a conjugate problem of elliptic type in n-1 dependent variables with Neumann-like boundary conditions or Dirichler boundary conditions, respectively, is introduced in such a way that the sum of the minima of the energies of a given problem and its conjugate problem is a calculable constant There result a posteriori error bounds for the energy-space norm of the difference of an approximate solution and the unknown exact solution of the Dirichlet or Neumann problem and of its conjugate problem. The data needed for the conjugate problem can be calculated with knowledge of only the given data of the oriyinal Dirichlet or Neumann problem. When those data are sufficiently smooth, the boundary functions of the original problem and the conjugate problem are related by simple formulas involving are-length differentiation or are length integration along t...