Wronskian of a self-adjoint form (sturm-liouville) I'm studying Sturm-Liouville theory and an exercise asks me:

Show the following when the linear second-order differential equation
  is expressed in self-adjoint form:
a) The Wronskian is equal to a constant divided by the initial
  coefficient $p$:
$$W(x) = \frac{C}{p(x)}$$
b) A second solution is given by
$$y_2(x) = Cy_1(x)\int^x \frac{dt}{p(t)[y_1(t)]^2}$$

As far as I know, a self-adjoitn form is something in the form:
$$\frac{d}{dx}\left[p(x)\frac{du(x)}{dx}\right] + q(x)u(x)$$
And the Wronskian of the two solutions $y_1, y_2$ of a general second order linear ODE, is $W(x) = y_1(x)y_2'(x)-y_1'(x)y_2(x)$. We also have that the wronskian can be expressed as
$$W(x) = W(a) \exp\left[-\int_a^xP(x_1)dx_1\right]$$ 
for some $a$ that I don't remember. Is there some connection between these formulas and what I need to prove?
Also, for b), I know that there is a method of finding a second solution based on the first solution, the wronskian, and the coefficients of the ODE, but how exactly should I do? I presume we have to use the wronskian above, but how?
 A: The general formally selfadjoint form of a Sturm-Liouville operator is
$$
          Lf = \frac{1}{w(x)}\left[-\frac{d}{dx}\left(p(x)\frac{df}{dx}\right)+q(x)f\right]
$$
where $w(x) > 0$ is a positive weight and $p(x) > 0$ also holds. The Lagrange identity for $L$ is
\begin{align}
       (Lf)g-f(Lg) & = \frac{1}{w}\left[-(pf')'g + f(pg')'\right] \\
   & =\frac{1}{w}\frac{d}{dx}\left(-(pf')g+f(pg')\right) \\
   & =\frac{1}{w}\frac{d}{dx}W_p(f,g),
\end{align}
where $W_p(f,g)=p(fg'-f'g)$ is the weighted Wronskian. This gives the weighted inner-product identity
$$
    \int_{a}^{b}(Lf)gwdx - \int_{a}^{b}f(Lg)wdx = W_p(f,g)|_{a}^{b}, \\
       (Lf,g)_w - (f,Lg)_w = W_p(f,g)|_{a}^{b}.
$$
The Lagrange identity gives a reduction of order formula, which was discovered by Lagrange in the late 1700's for linear ODEs of second and higher orders. To see how such an identity arises, suppose $Lf=\lambda f$ is a known solution. Then a second solution $g$ of $Lg=\lambda g$ is obtained by using the Lagrange identity to obtain a reduced order equation:
$$
         0 = \lambda f g - \lambda fg = (Lf)g-f(Lg) = \frac{1}{w}\frac{d}{dx}W_p(f,g).
$$
That is, $g$ is obtained from a known solution $f$ by solving $W_p(f,g)=C$ using this known $f$:
$$
           p(fg'-f'g) = C \\
            fg'-f'g = \frac{C}{p} \\
          \frac{fg'-f'g}{f^2} = \frac{C}{pf^2} \\
        \frac{d}{dx}\left(\frac{g}{f}\right) = \frac{C}{pf^2} \\
        \frac{g}{f} = C\int \frac{1}{pf^2}dx + D \\
          g = Cf \int \frac{1}{pf^2}dx + Df.
$$
Nothing is lost by setting $D=0$ and later adding a linear combination of $g$ and $f$ for the general solution.
A: For part (a), since you start with a self-adjoint second order linear differential operator, expanding this out gives:
\begin{equation}
p(x)y''(x) + p'(x)y'(x) + q(x)y(x) = 0. \tag{1}
\end{equation}
Let $y'(x)=z(x)$, then
$$ z'(x) = y''(x) = -\frac{q(x)y(x) + p'(x)y'(x)}{p(x)} = -\frac{p'(x)z(x)}{p(x)} - \frac{q(x)y(x)}{p(x)},$$
assuming $p(x)$ is not the zero function. 
We can write this in a matrix form:
$$ \begin{bmatrix} y' \\ z' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -\frac{q}{p} & -\frac{p'}{p} \end{bmatrix} \begin{bmatrix} y \\ z \end{bmatrix} = A\begin{bmatrix} y \\ z \end{bmatrix}.$$ 
Now, using Abel's identity (which is the one you stated for the Wronskian), we obtain
\begin{align*}
W(x) & = W(a)\exp\left(-\int_a^x Tr(A(s))\, ds\right) \\
& = W(a)\exp\left(-\int_a^x \frac{p'(s)}{p(s)}\, ds\right) \\
& = W(a)\exp\left[-\ln(p(x)) + \ln(p(a))\right]\\
& = W(a)\exp\left[-\ln\left(\frac{p(x)}{p(a)}\right)\right] \\
& = W(a)\left(\frac{p(a)}{p(x)}\right) \\
& = \frac{C}{p(x)},
\end{align*}
with constant $C=W(a)p(a)$.
For part (b), we guess an ansatz of the form $y_2(x) = v(x)y_1(x)$. Computing its first and second derivative:
\begin{align*}
y_2' & = v'y_1 + vy_1' \\
y_2'' & = v''y_1 + v'y_1' + v'y_1' + vy_1'' \\
& = v''y_1 + 2v'y_1' + vy_1''
\end{align*}
Substituting this into (1) yields:
\begin{align*}
p[v''y_1 + 2v'y_1' + vy_1''] + p'[v'y_1 + vy_1'] + qvy_1 & = 0
\end{align*}
Rearranging this yields:
\begin{align*}
v[py_1'' + p'y_1' + qy_1] + v''py_1 + 2v'py_1'+ v'p'y_1 & = 0
\end{align*}
The term in the square bracket vanishes since $y_1$ is assumed to be a solution of (1). We are left with:
\begin{align*}
v''py_1 & = -v'[2py_1' + p'y_1] \\
v'' & = -\frac{v'[2py_1' + p'y_1]}{py_1} \\
v'' & = -v'\left(\frac{2y_1'}{y_1} + \frac{p'}{p}\right)
\end{align*}
Now, you only need to solve this separable second order ODE to obtain $v(x)$, which I will leave it to you. 
