home

PDF (letter size)

PDF (legal size)

Examples applying transformation on independent variable to solve variable coefficient second order ode

Nasser M. Abbasi

November 10, 2021   Compiled on November 10, 2021 at 3:24am

Contents

 1 Introduction
  1.1 Example 1
  1.2 Example 2

1 Introduction

This note gives examples using a transformation on the independent variable to solve a second order ODE I saw in the book ORDINARY DIFFERENTIAL EQUATIONS AND CALCULUS OF VARIATIONS by M. V. Makarets at page 92. This allows some ode’s of variable coefficients to be solved which otherwise requires more advanced methods.

Given the ode\[ p_{0}\relax (x) y^{\prime \prime }\relax (x) +p_{1}\left ( x\right ) y^{\prime }\relax (x) +p_{2}\relax (x) y\left ( x\right ) =0 \] Let \begin {equation} t=\int e^{-\int \frac {p_{1}}{p_{0}}dx}dx \tag {1} \end {equation} Find what the new ode in \(t\) will be. \begin {align} \frac {dy}{dx} & =\frac {dy}{dt}\frac {dt}{dx}\nonumber \\ & =\frac {dy}{dt}e^{-\int \frac {p_{1}}{p_{0}}dx} \tag {2} \end {align}

And\begin {align*} \frac {d^{2}y}{dx^{2}} & =\frac {d}{dx}\left (\frac {dy}{dx}\right ) \\ & =\frac {d}{dx}\left (e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}\right ) \\ & =-\frac {p_{1}}{p_{0}}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {d}{dx}\frac {dy}{dt}\\ & =-\frac {p_{1}}{p_{0}}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {\frac {d}{dt}}{\frac {dx}{dt}}\frac {dy}{dt}\\ & =-\frac {p_{1}}{p_{0}}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dt}{dx}\left (\frac {d}{dt}\frac {dy}{dt}\right ) \\ & =-\frac {p_{1}}{p_{0}}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dt}{dx}\left (\frac {d^{2}y}{dt^{2}}\right ) \end {align*}

But \(\frac {dt}{dx}=e^{-\int \frac {p_{1}}{p_{0}}dx}\) from (1). Hence the above becomes\begin {align} \frac {d^{2}y}{dx^{2}} & =-\frac {p_{1}}{p_{0}}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+e^{-\int \frac {p_{1}}{p_{0}}dx}e^{-\int \frac {p_{1}}{p_{0}}dx}\left (\frac {d^{2}y}{dt^{2}}\right ) \nonumber \\ & =-\frac {p_{1}}{p_{0}}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+e^{-2\int \frac {p_{1}}{p_{0}}dx}\left (\frac {d^{2}y}{dt^{2}}\right ) \tag {3} \end {align}

Substituting (2,3) back into original ode gives\begin {align*} p_{0}\left (-\frac {p_{1}}{p_{0}}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+e^{-2\int \frac {p_{1}}{p_{0}}dx}\left (\frac {d^{2}y}{dt^{2}}\right ) \right ) +p_{1}\left (\frac {dy}{dt}e^{-\int \frac {p_{1}}{p_{0}}dx}\right ) +p_{2}y\relax (t) & =0\\ -p_{1}e^{-\int \frac {p_{1}}{p_{0}}dx}\frac {dy}{dt}+p_{0}e^{-2\int \frac {p_{1}}{p_{0}}dx}\left (\frac {d^{2}y}{dt^{2}}\right ) +p_{1}\frac {dy}{dt}e^{-\int \frac {p_{1}}{p_{0}}dx}+p_{2}y\relax (t) & =0\\ p_{0}e^{-2\int \frac {p_{1}}{p_{0}}dx}\left (\frac {d^{2}y}{dt^{2}}\right ) +p_{2}y\relax (t) & =0\\ \frac {d^{2}y}{dt^{2}}+\frac {p_{2}}{p_{0}e^{-2\int \frac {p_{1}}{p_{0}}dx}}y\relax (t) & =0 \end {align*}

But since \(t=\int e^{-\int \frac {p_{1}}{p_{0}}dx}dx\) then \(\frac {dt}{dx}=e^{-\int \frac {p_{1}}{p_{0}}dx}\). Therefore \(e^{-2\int \frac {p_{1}}{p_{0}}dx}=\left (\frac {dt}{dx}\right ) ^{2}\). The above becomes\begin {equation} \frac {d^{2}y}{dt^{2}}+\frac {p_{2}\relax (x) }{p_{0}\relax (x) }\left (\frac {dt}{dx}\right ) ^{-2}y\relax (t) =0 \tag {4} \end {equation} Now the above expression \(\frac {p_{2}\relax (x) }{p_{0}\left ( x\right ) }\left (\frac {dt}{dx}\right ) ^{-2}\) is checked to see if it is independent of \(x\). If so, then this transformation was successful. Else it can not be used. To do this, it is applied to some actual odes for illustration.

1.1 Example 1

Solve \[ y^{\prime \prime }\relax (x) \sin ^{2}\left (2x\right ) +y^{\prime }\relax (x) \sin \left (4x\right ) -4y=0 \] Using the above Makarets transformation. In this ode \(p_{0}\relax (x) =\sin ^{2}\left (2x\right ) ,p_{1}\relax (x) =\sin \left (4x\right ) ,p_{2}\relax (x) =-4\). Therefore\[ \frac {dt}{dx}=e^{-\int \frac {p_{1}}{p_{0}}dx}=e^{-\int \frac {\sin \left ( 4x\right ) }{\sin ^{2}\left (2x\right ) }dx}=\frac {1}{\sin \left (2x\right ) }\] Hence\begin {align*} \frac {p_{2}\relax (x) }{p_{0}\relax (x) }\left (\frac {dt}{dx}\right ) ^{-2} & =\frac {-4}{\sin ^{2}\left (2x\right ) }\left (\frac {1}{\sin \left (2x\right ) }\right ) ^{-2}\\ & =-4 \end {align*}

Since this is independent of \(x\), then the transformation was successful. The new ode is\[ \frac {d^{2}y}{dt^{2}}-4y\relax (t) =0 \] Which has solution \begin {equation} y\relax (t) =c_{1}e^{-2t}+c_{2}e^{2t} \tag {5} \end {equation} Now the ode is transformed back to \(x\) using \(t=\int e^{-\int \frac {p_{1}}{p_{0}}dx}dx\). But\begin {align*} t & =\int e^{-\int \frac {p_{1}}{p_{0}}dx}dx\\ & =\int \frac {1}{\sin \left (2x\right ) }dx\\ & =\frac {1}{2}\ln \left (\csc \left (2x\right ) -\cot \left (2x\right ) \right ) \end {align*}

Hence (5) becomes\begin {align*} y\relax (x) & =c_{1}e^{-2\left (\frac {1}{2}\ln \left (\csc \left ( 2x\right ) -\cot \left (2x\right ) \right ) \right ) }+c_{2}e^{2\left ( \frac {1}{2}\ln \left (\csc \left (2x\right ) -\cot \left (2x\right ) \right ) \right ) }\\ & =c_{1}e^{-\left (\ln \left (\csc \left (2x\right ) -\cot \left (2x\right ) \right ) \right ) }+c_{2}e^{\ln \left (\csc \left (2x\right ) -\cot \left ( 2x\right ) \right ) }\\ & =\frac {c_{1}}{\csc \left (2x\right ) -\cot \left (2x\right ) }+c_{2}\left ( \csc \left (2x\right ) -\cot \left (2x\right ) \right ) \end {align*}

According to the book, the above can be simplified to \(y\relax (x) =c_{1}\tan x+c_{2}\cot x\). But I did not try to do the simplification at this time.

1.2 Example 2

Solve \[ \left (1-x^{2}\right ) y^{\prime \prime }\relax (x) -xy^{\prime }\left ( x\right ) +y=0 \] Using the above Makarets transformation. In this ode \(p_{0}\relax (x) =\left (1-x^{2}\right ) ,p_{1}\relax (x) =-x,p_{2}\relax (x) =1\). Therefore\[ \frac {dt}{dx}=e^{-\int \frac {p_{1}}{p_{0}}dx}=e^{-\int \frac {-x}{\left ( 1-x^{2}\right ) }dx}=\frac {1}{\sqrt {x-1}\sqrt {x+1}}\] Hence\begin {align*} \frac {p_{2}\relax (x) }{p_{0}\relax (x) }\left (\frac {dt}{dx}\right ) ^{-2} & =\frac {1}{\left (1-x^{2}\right ) }\left (\frac {1}{\sqrt {x-1}\sqrt {x+1}}\right ) ^{-2}\\ & =\frac {1}{\left (1-x^{2}\right ) }\left (\sqrt {x-1}\sqrt {x+1}\right ) ^{2}\\ & =\frac {1}{\left (1-x^{2}\right ) }\left (\left (x-1\right ) \left ( x+1\right ) \right ) \\ & =\frac {\left (x^{2}-1\right ) }{\left (1-x^{2}\right ) }\\ & =-1 \end {align*}

Since this is independent of \(x\), then the transformation was successful. The new ode is\[ \frac {d^{2}y}{dt^{2}}-y\relax (t) =0 \] Which has solution \begin {equation} y\relax (t) =c_{1}e^{-t}+c_{2}e^{t}\tag {5} \end {equation} Now the ode is transformed back to \(x\) using \(t=\int e^{-\int \frac {p_{1}}{p_{0}}dx}dx\). But\begin {align*} t & =\int e^{-\int \frac {p_{1}}{p_{0}}dx}dx\\ & =\int \frac {1}{\sqrt {x-1}\sqrt {x+1}}dx\\ & =\frac {\sqrt {x^{2}-1}}{\sqrt {x-1}\sqrt {x+1}}\ln \left (x+\sqrt {x^{2}-1}\right ) \end {align*}

Hence (5) becomes\[ y\relax (x) =c_{1}e^{-\left (\frac {\sqrt {x^{2}-1}}{\sqrt {x-1}\sqrt {x+1}}\ln \left (x+\sqrt {x^{2}-1}\right ) \right ) }+c_{2}e^{\left ( \frac {\sqrt {x^{2}-1}}{\sqrt {x-1}\sqrt {x+1}}\ln \left (x+\sqrt {x^{2}-1}\right ) \right ) }\] Which can be simplified to \[ y\relax (x) =c_{1}x+c_{2}\sqrt {x-1}\sqrt {x+1}\]