Transforming Second-order ODEs to Canonical Form
For a general second-order linear ODE with variable coefficients:
\begin{align}
\frac{d^2y}{dx^2} + a_1(x) \frac{dy}{dx} + a_0(x) y = f(x) \tag{1}
\end{align}
where \( a_0(x), a_1(x) \) are functions of \( x \) only, we can absorb the \( a_1(x) dy/dx \) first derivative term using a suitable variable transformation. Let \( y = u(x) v(x) \) where \( v(x) \) will be our new dependent variable and we will find the required form of \( u(x) \). Note that
\begin{align}
\begin{aligned}
\frac{dy}{dx} &= u(x) v'(x) + u'(x) v(x) \\
\frac{d^2y}{dx^2} &= u(x) v^{\prime\prime}(x) + 2u'(x) v'(x) + u^{\prime\prime}(x) v(x) \\
\end{aligned} \tag{2}
\end{align}
Then plugging into (1) gives
\begin{align}
(uv^{\prime\prime} + 2u’v’ + u^{\prime\prime}v) + a_1 (uv’ + u’v) + a_0 uv &= f(x) \\
uv^{\prime\prime} + (2u’ + a_1u) v’ + (u^{\prime\prime} + a_1 u’ + a_0 u)v &= f(x) \tag{3}
\end{align}
So to make the first derivative \( v’ \) disappear, we require that
\begin{align}
2u’ + a_1(x)u &= 0 \\
\frac{du}{dx} &= -\frac{1}{2}a_1(x)u \\
\int \frac{du}{u} &= \int -\frac{1}{2}a_1(x’) dx’ \\
\ln u &= -\frac{1}{2} \int a_1(x’) dx’ \\
\Rightarrow u(x) &= \exp(-\frac{1}{2} \int^x a_1(x’) dx’) \tag{4}
\end{align}
where we designate \( x’ \) as the dummy integration variable. The ODE (3) then becomes
\begin{align}
uv^{\prime\prime} + (u^{\prime\prime} + a_1 u’ + a_0 u)v &= f(x) \\
v^{\prime\prime} + \left(\frac{u^{\prime\prime} + a_1 u’ + a_0 u}{u}\right)v &= \frac{f(x)}{u} \tag{5}
\end{align}
The term in front of \( v \) can be evaluated to, by noting that (in (4))
\begin{align}
\begin{aligned}
u’ &= -\frac{1}{2}a_1u \\
u^{\prime\prime} &= -\frac{1}{2}a_1’u -\frac{1}{2}a_1u’ = -\frac{1}{2}a_1’u + \frac{1}{4}a_1^2u
\end{aligned} \tag{6}
\end{align}
and so the ODE finally looks like
\begin{align}
\frac{d^2v}{dx^2} + g(x) v = h(x) \tag{7}
\end{align}
where
\begin{align}
\begin{aligned}
g(x) &= a_0(x) -\frac{1}{4}[a_1(x)]^2 -\frac{1}{2}a_1^{\prime}(x) \\
h(x) &= f(x) \exp(\frac{1}{2} \int^x a_1(x’) dx’)
\end{aligned} \tag{8}
\end{align}
This is then the Canonical Form for second-order linear ODEs. By this conversion, some seemingly complicated ODEs may become easier to handle, as it allows the problem to be tackled through its similarity to any Schrödinger-like equation.
Example
Find the general solution to the ODE:
\begin{align}
4x^2\frac{d^2y}{dx^2} -4x\frac{dy}{dx} + (4x^2+3)y &= 0 \tag{9}
\end{align}
First, normalizing/dividing by \( 4x^2 \), it becomes
\begin{align}
\frac{d^2y}{dx^2} -\frac{1}{x}\frac{dy}{dx} + (1+\frac{3}{4x^2})y &= 0 \tag{10}
\end{align}
Referring to (4) and (8), we identify with \( a_1 = -1/x \), \( a_0 = 1 + 3/(4x^2) \), and
\begin{align}
u(x) &= \exp(-\frac{1}{2} \int^x a_1(x’) dx’) \\
&= \exp(-\frac{1}{2} \int^x -\frac{1}{x’} dx’) \\
&= \exp(\frac{1}{2} \ln x) = \sqrt{x} \tag{11}
\end{align}
\begin{align}
g(x) &= a_0(x) -\frac{1}{4}[a_1(x)]^2 -\frac{1}{2}a_1^{\prime}(x) \\
&= (1 + \frac{3}{4x^2}) -\frac{1}{4}(-\frac{1}{x})^2 -\frac{1}{2}(\frac{1}{x^2}) \\
&= 1 + \frac{3}{4x^2} -\frac{1}{4x^2} -\frac{1}{2x^2} = 1 \tag{12}
\end{align}
Finally, trivially \( h(x) = 0 \). The new ODE becomes
\begin{align}
\frac{d^2v}{dx^2} + v = 0 \tag{13}
\end{align}
which is very easily seen to have the general solution \( v(x) = c_1\cos x + c_2\sin x \), and thus the recovered solution will be \( y = uv = c_1\sqrt{x}\cos x + c_2\sqrt{x}\sin x \).
Exercise
Derive the general solution to the ODE by first converting it into the canonical form:
\begin{align}
x\frac{d^2y}{dx^2} + 2\frac{dy}{dx} -xy = e^x \tag{14}
\end{align}
Answer
Dividing by \(x\) gives
\begin{align}
\frac{d^2y}{dx^2} + \frac{2}{x}\frac{dy}{dx} -y = \frac{e^x}{x}
\end{align}
According to (4) and (8), we can identify with \( a_1 = 2/x \), \( a_0 = -1 \), and
\begin{align}
u(x) &= \exp(-\frac{1}{2} \int^x a_1(x’) dx’) \\
&= \exp(-\frac{1}{2} \int^x \frac{2}{x’} dx’) \\
&= \exp(-\int^x \frac{1}{x’} dx’) = \exp(- \ln x) = \frac{1}{x}
\end{align}
also
\begin{align}
g(x) &= -1 -\frac{1}{4}(\frac{2}{x})^2 -\frac{1}{2}(-\frac{2}{x^2}) = -1 \\
h(x) &= (\frac{e^x}{x})(x) = e^x
\end{align}
Therefore the ODE now has a new form of
\begin{align}
\frac{d^2v}{dx^2} -v &= e^x
\end{align}
It is easy to see that the complementary solution consists of \( v_1 = e^x, v_2 = e^{-x} \). The particular solution is also not hard to derive by the method of Undetermined Coefficients: \( v_p = xe^x/2 \). Therefore, the general solution will be \( y = uv = \frac{1}{x}(c_1e^x + c_2e^{-x} + xe^x/2) = c_1e^x/x + c_2e^{-x}/x + e^x/2 \).








Leave a Reply