Suppose $$L=p(x) \frac{d^2}{dx^2} + r(x) \frac{d}{dx} + q(x).$$ Consider $$\int_a^b vL(u) {\rm d}x \quad \quad \ldots (1)$$
From repeated integration by parts, I got the adjoint operator $L^*$ such that $$\int_a^b \big(uL^*(v)-vL(u)\big) {\rm d}x = H(x) \Big|_a^b$$
I know $H(x) = p(x)(u'v-uv') + uv(p'(x)-r(x))$ and $L^* = p\frac{d^2}{dx^2} + \Big(2\frac{dp}{dx} - r\Big)\frac{d}{dx} + \Big(\frac{d^2p}{dx^2} - \frac{dr}{dx} + q\Big)$.
If $L=L^*$, then $p$ is a constant and $r$ has to be identically $0$.
Using the above result, prove the following part from Fredholm's alternative: $L(u) = f(x)$ subject to homogeneous boundary conditions may exist only if $f(x)$ is orthogonal to all solutions of the homogeneous adjoint problem.
So if $v$ is a solution to $L(v) = 0$, subject to homogeneous adjoint conditions $A\mathbf{v} = 0$, where $\mathbf{v} = [v,v']^T$, I have to prove $\int _a^b vf {\rm d}x = 0$. How do I go about this?
If $u$ is a solution of $L(u)=f$ with imposed conditions, and if $v$ is solution of $L(v)=0$ with imposed conditions, then \begin{align} \int_a^b f v dx & = \int_a^b L(u) v dx \\ &= \int_a^b u L^*(v)dx + H(u,v)|_{a}^{b} \\ &= 0 + 0. \end{align} So it is necessary that, if such a solution $u$ exists, then $f$ must be orthogonal to all solutions $v$ of the homogeneous problem.