Let $L$ a differential operator and consider the equation $Lu=f$ for $f\in L^2$. Then $u$ is a weak solution if $$\left<u,L^*\varphi\right>=\left<f,\varphi\right>,$$ for all $\varphi\in \mathcal C_0^\infty $ where $L^*$ is the formal adjoint.
What is the "formal adjoint" ?
I recall that $\left<f,g\right>=\int fg.$
I assume we work with real-valued functions. If $L = \sum_{\alpha} k_{\alpha} D^{\alpha}$ (using multi-index notation), where $k_{\alpha}$ are constants, then $L^{*}$ is given by $$ L^{*} = \sum_{\alpha} k_{\alpha} (-1)^{|\alpha|} D^{\alpha}. $$ To see why it makes sense, one may check that for $\phi, \psi \in C_0^{\infty}$ equality $\langle L \phi, \psi \rangle = \langle \phi, L^{*} \psi \rangle$ is just integration by parts.