  We study the density of polynomials in $H^2(E,\varphi)$, the space of square
integrable functions with respect to $e^{-\varphi}dm$ and holomorphic on the
interior of $E$ in $\mathbb{C}$, where $\varphi$ is a subharmonic function and
$dm$ is a measure on $E$. We give a result where $E$ is the union of a
Lipschitz graph and a Carath\'{e}odory domain, that we state as a weighted
$L^2$-version of the Mergelyan theorem. We also prove a weighted $L^2$-version
of the Carleman theorem.
  Keywords: Mergelyan theorem, Carleman theorem, Weighted $L^2$- spaces,
Rectifiable non-Lipschitz arc
