I am trying to evaluate an indefinite integral of the form


$\int \frac{dz}{A u\_1^2 + Bu\_2^2 + Cu\_1u\_2}$


where $u\_1$ and $u\_2$ are two independent solutions to the ODE


$u'' + F(z)u = 0$


This integral has arisen because the quantity $\sqrt{A u\_1^2 + Bu\_2^2 + Cu\_1u\_2}$ is a solution to the Ermakov-Pinney equation, $u'' + F(z)u + \Lambda u^{-3} = 0$. I can simplify by setting one or both of $A$ or $B$ to zero, but $C$ is dependent: $C \equiv 2\sqrt{AB + \Lambda/W^2}$, where $W$ is the Wronskian of $u\_1$ and $u\_2$, which here is always constant.


In this particular situation (due to the form of $F(z)$), another way of writing the solutions $u$ is as


$u = \sqrt{p} y$


where $y$ satisfies the Sturm-Liouville problem


$-(py')' = \lambda \omega y$


but we do not necessarily have $\lambda \geq 0$.


Is it possible to say anything about the integral above in general? I am particularly keen to know under what conditions the antiderivative is a) expressible in closed form, and b) invertible in closed form.


For example, when $u = e^{\pm z/2}$, both a) and b) are true.



An indefinite integral containing functions that are solutions to a 2nd order linear ODE
Assuming $4AB-C^2 \ne 0$, let $$ J(z) =\frac{2}{W \sqrt{4AB-C^2}}\;\arctan \left(\frac{2B}{\sqrt{4AB-C^2}} \frac{u\_2(z)}{u\_1(z)} + \frac{C}{\sqrt{4AB-C^2}}\right)$$
where $W$ is the (constant) Wronskian of $u\_1$ and $u\_2$.
Then I get
$$ \dfrac{dJ}{dz} = \frac{1}{A u\_1^2 + B u\_2^2 + C u\_1 u\_2}$$


