PDF (letter size)

## Worked examples applying change of variable in solving diﬀerential equations

July 6, 2022   Compiled on July 6, 2022 at 4:03am

### 1 Introduction

Starting with a second order linear ODE in the following normal form\begin {equation} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y=r\left ( x\right ) \tag {A} \end {equation} The goal is to ﬁnd a transformation that converts this ode to one with constant coeﬃcients which is easily solved. There are two transformations to try. One uses transformation on the independent variable $$x$$ and the second is on the dependent variable $$y$$. The transformation on the independent variable uses $$\tau =g\left ( x\right )$$ and the one on the dependent variable uses $$y=v\left ( x\right ) z\left ( x\right )$$.

#### 1.1 Transformation on the independent variable

Let $$\tau =g\left ( x\right )$$ where $$\tau$$ is the new independent variable. Applying this to (A) results in (details not shown)\begin {equation} y^{\prime \prime }\left ( \tau \right ) +p_{1}\left ( \tau \right ) y^{\prime }\left ( \tau \right ) +q_{1}\left ( \tau \right ) y\left ( \tau \right ) =r_{1}\left ( \tau \right ) \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

The idea of the transformation is to determine if (1) can now be solved instead of (A). There are two approaches to take.

Approach 1. Let $$q_{1}=c^{2}$$ where $$c$$ is a constant and then $$\tau$$ is solved for. If $$p_{1}\left ( \tau \right )$$ turns out to be constant then (1) can now be easily solved (since it is constant coeﬃcients ode) and therefore the original ode solution $$y\left ( x\right )$$ for (A) is found.

Approach 2. Let $$p_{1}=0$$ then $$\tau$$ is solved for from $$\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) =0$$. If this solution $$\tau \left ( x\right )$$ results in $$q_{1}$$ above being a constant, or a constant divided by $$\tau ^{2}$$ then (1) can now be easily solved. If both approaches fail, then transformation on the dependent variable is tried next.

##### 1.1.1 Approach 1 $$\left ( q_{1}=c^{2}\right )$$

Let $$q_{1}=c^{2}$$ where $$c$$ is some constant. This implies\begin {align} \frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau ^{\prime } & =\frac {1}{c}\sqrt {q\left ( x\right ) }\tag {5}\\ \tau ^{\prime \prime } & =\frac {1}{2c}\frac {q^{\prime }\left ( x\right ) }{\sqrt {q\left ( x\right ) }} \tag {5A} \end {align}

Substituting (5,5A) in (2) ﬁnds $$p_{1}\left ( \tau \right )$$. If $$p_{1}\left ( \tau \right )$$ is a constant (does not depend on $$x$$) then (1) can be solved for $$y\left ( \tau \right )$$ and (A) is therefore solved for $$y\left ( x\right )$$.

##### 1.1.2 Approach 2 $$\left ( p_{1}=0\right )$$

Let $$p_{1}=0$$ which implies $$\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) =0$$. Hence$\tau =\int e^{-\int pdx}dx$ Substituting this in (3) gives $$q_{1}\left ( \tau \right )$$. If $$q_{1}\left ( \tau \right )$$ is a constant or constant divided by $$\tau ^{2}$$ then (1) can be solved and (A) is also solved. If both approaches fail, then transformation on the dependent variable is tried next.

#### 1.2 Transformation on the dependent variable (general case)

This is called Liouville transformation. Book by Einar Hille, ordinary diﬀerential equations in the complex domain. Page 179. This method assumes that$y=v\left ( x\right ) z\left ( x\right )$ Substituting this (A) results in the following ode where the dependent variable is $$v$$ and not $$y$$\begin {equation} v^{\prime \prime }\left ( x\right ) +\left ( p+\frac {2}{z}z^{\prime }\left ( x\right ) \right ) v^{\prime }\left ( x\right ) +\frac {1}{z}\left ( z^{\prime \prime }\left ( x\right ) +pz^{\prime }\left ( x\right ) +qz\left ( x\right ) \right ) v\left ( x\right ) =\frac {r}{z} \tag {6} \end {equation} Assuming that coeﬃcient of $$v^{\prime }$$ in (6) zero implies$p+\frac {2}{z}z^{\prime }\left ( x\right ) =0$ Solving gives (where constant of integration is taken as one) \begin {equation} z=e^{-\int \frac {p}{2}dx} \tag {6A} \end {equation} With this choice (6) becomes$v^{\prime \prime }+\frac {1}{z}\left ( z^{\prime \prime }+pz^{\prime }+qz\right ) v=\frac {r}{z}$ Substituting $$z$$ from (6A) into the above reduces it to (after some algebra) to\begin {equation} v^{\prime \prime }+q_{1}v=r_{1} \tag {6B} \end {equation} Where \begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ r_{1} & =\frac {r}{z}\\ & =re^{\frac {1}{2}\int pdx} \end {align*}

$$q_{1}$$ is called the Liouville ode invariant. If $$q_{1}$$ is constant, or constant divided by $$x^{2}$$, then $$v\left ( x\right )$$ is now solved from (6B) and the solution to the original ode (A) obtained using $$y=v\left ( x\right ) z\left ( x\right )$$ since $$z\left ( x\right )$$ is also known from (6A).

#### 1.3 Transformation on the dependent variable (special case $$y=v\left ( x\right ) x^{n}$$)

This transformation, if it works, changes the second order ode to an one with missing $$y$$, which then can be solved as ﬁrst order ode by reduction of order. This transformation does not necessarily changes the second order ode to one with constant coeﬃcient like the above general transformation. But to an ode with missing $$y$$.

This method assumes$y=v\left ( x\right ) x^{n}$ If this transformation changes the ode to one with missing $$y$$, then it can be solved.  $$n$$ is chosen to be an integer. Substituting this in (A) results in the following ode where the dependent variable is $$v$$ and not $$y$$\begin {align} x^{n}v^{\prime \prime }+\left ( 2x^{n-1}n+x^{n}p\right ) v^{\prime }+\left ( n\left ( n-1\right ) x^{n-2}+npx^{n-1}+qx^{n}\right ) v & =r\nonumber \\ v^{\prime \prime }+\left ( 2\frac {n}{x}+p\right ) v^{\prime }+\left ( n\left ( n-1\right ) x^{-2}+npx^{-1}+q\right ) v & =\frac {r}{x^{n}} \tag {7} \end {align}

If it happens that \begin {equation} n\left ( n-1\right ) x^{-2}+npx^{-1}+q=0 \tag {7A} \end {equation} For some $$n$$, then (7) becomes\begin {equation} v^{\prime \prime }+\left ( 2\frac {n}{x}+p\right ) v^{\prime }=\frac {r}{x^{n}} \tag {7B} \end {equation} Which now can be solved using substitution $$u=v^{\prime }$$. $u^{\prime }+\left ( 2\frac {n}{x}+p\right ) u=\frac {r}{x^{n}}$ Which is linear ﬁrst order ode. Once $$u$$ is found, then $$v$$ is by found integration. Hence $$y$$ is now found. To use this method, all what is needed is to check if (7A) is true for some $$n$$. Typically one tries $$n=\pm 1$$ ﬁrst and if this does not work, then try to ﬁnd other values. Example below shows how to apply this method.

#### 1.4 Lagrange adjoint equation transformation

This transformation does not use change of variables. It was discovered by Lagrange in his Miscellanea Taurensis paper.  It reduces the order of the ode by one, assuming the so called adjoint ode can be solved. This is also described in section 1.5.1 on page 14 of the “book Change and Variations A History of Diﬀerential Equations to 1900” by Jeremy Gray.

Given the ode\begin {equation} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y=r\left ( x\right ) \tag {1} \end {equation} This method starts by multiplying the ode by some unknown function $$z\equiv z\left ( x\right )$$ which gives\begin {equation} zy^{\prime \prime }+zpy^{\prime }+zqy=zr \tag {2} \end {equation} Integrating gives\begin {equation} \int zy^{\prime \prime }dx+\int zpy^{\prime }dx+\int zqydx=\int zrdx \tag {3} \end {equation} Using integration by parts on $$\int zpy^{\prime }dx$$ using $$\int udv=uv-\int vdu$$ where $$u=zp$$ and $$dv=y^{\prime }$$, hence $$v=y$$ and $$du=\frac {d}{dx}\left ( zp\right )$$. Therefore$\int zpy^{\prime }dx=zpy-\int y\frac {d\left ( zp\right ) }{dx}dx$ Using integration by parts on $$\int zy^{\prime \prime }dx$$ using $$\int udv=uv-\int vdu$$ where $$u=z$$ and $$dv=y^{\prime \prime }$$, hence $$v=y^{\prime }$$ and $$du=z^{\prime }$$. Therefore$\int zy^{\prime \prime }dx=zy^{\prime }-\int y^{\prime }z^{\prime }dx$ Eq (3) becomes\begin {equation} \left ( zy^{\prime }-\int y^{\prime }z^{\prime }dx\right ) +\left ( zpy-\int y\frac {d\left ( zp\right ) }{dx}dx\right ) +\int zqydx=\int zrdx \tag {4} \end {equation} Integrating by part again the term $$\int y^{\prime }z^{\prime }dx$$ using $$\int udv=uv-\int vdu$$ where $$u=z^{\prime }$$ and $$dv=y^{\prime }$$, hence $$v=y$$ and $$du=z^{\prime \prime }$$. Therefore$\int y^{\prime }z^{\prime }dx=yz^{\prime }-\int yz^{\prime \prime }dx$ Substituting this in (4) gives\begin {align} \left ( zy^{\prime }-\left ( yz^{\prime }-\int yz^{\prime \prime }dx\right ) \right ) +\left ( zpy-\int y\frac {d\left ( zp\right ) }{dx}dx\right ) +\int zqydx & =\int zrdx\nonumber \\ zy^{\prime }-yz^{\prime }+\int yz^{\prime \prime }dx+zpy-\int y\frac {d\left ( zp\right ) }{dx}dx+\int zqydx & =\int zrdx\nonumber \\ zy^{\prime }-yz^{\prime }+zpy+\int \left ( yz^{\prime \prime }-y\frac {d\left ( zp\right ) }{dx}+zqy\right ) dx & =\int zrdx\nonumber \\ zy^{\prime }-yz^{\prime }+zpy+\int y\left ( z^{\prime \prime }-\frac {d\left ( zp\right ) }{dx}+zq\right ) dx & =\int zrdx\nonumber \\ zy^{\prime }+\left ( zp-z^{\prime }\right ) y+\int y\left ( z^{\prime \prime }-\frac {d\left ( zp\right ) }{dx}+zq\right ) dx & =\int zrdx \tag {5} \end {align}

The adjoint ode is the term inside the integral above given by\begin {equation} z^{\prime \prime }-\frac {d\left ( zp\right ) }{dx}+zq=0 \tag {6} \end {equation} If this can be solved for $$z\left ( x\right ) \neq 0$$, then (5) reduces to\begin {align*} zy^{\prime }+\left ( zp-z^{\prime }\right ) y & =\int zrdx\\ y^{\prime }+y\left ( p-\frac {z^{\prime }}{z}\right ) & =\frac {1}{z}\int zrdx \end {align*}

Which is ﬁrst order ode in $$y\left ( x\right )$$ which can be easily solved for $$y\left ( x\right )$$. Equation (6) is called the Lagrange adjoint equation. This method of course works only if the adjoint ode can be solved for $$z\left ( x\right )$$ and the solution is not zero.

#### 1.5 Integrating factor method

Another method to try is the integrating factor method on the second order ode. This method does not use transformation. Given the ode\begin {equation} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y=r\left ( x\right ) \tag {1} \end {equation} Let there exists an integrating factor $$M\left ( x\right )$$ such that\begin {equation} \left ( M\left ( x\right ) y\right ) ^{\prime \prime }=M\left ( x\right ) r\left ( x\right ) \tag {2} \end {equation} Then it can be integrated twice and solved. To ﬁnd $$M$$, the above becomes\begin {align} \left ( M^{\prime }y+My^{\prime }\right ) ^{\prime } & =Mr\nonumber \\ M^{\prime \prime }y+M^{\prime }y^{\prime }+M^{\prime }y^{\prime }+My^{\prime \prime } & =Mr\nonumber \\ My^{\prime \prime }+y^{\prime }\left ( 2M^{\prime }\right ) +M^{\prime \prime }y & =Mr\nonumber \\ y^{\prime \prime }+y^{\prime }\left ( 2\frac {M^{\prime }}{M}\right ) +\frac {M^{\prime \prime }}{M}y & =r \tag {2A} \end {align}

Comparing (2A) to (1) gives\begin {align*} 2\frac {M^{\prime }}{M} & =p\\ \frac {M^{\prime \prime }}{M} & =q \end {align*}

Or\begin {align} M^{\prime }-\frac {1}{2}Mp & =0\tag {3}\\ M^{\prime \prime }-Mq & =0 \tag {4} \end {align}

Starting with (3) gives $$M=e^{\frac {1}{2}\int pdx}$$. If this also satisﬁes (4), then $$M$$ is found by integration. For an example, given $$y^{\prime \prime }-4xy^{\prime }+\left ( 4x^{2}-2\right ) y=0$$. Hence $$p=-4x$$ and $$q=\left ( 4x^{2}-2\right )$$. Eq(3) becomes$M^{\prime }+2Mp=0$ Therefore\begin {align*} M & =e^{\frac {1}{2}\int pdx}\\ & =e^{\frac {1}{2}\int -4xdx}\\ & =e^{-x^{2}} \end {align*}

And\begin {align*} M^{\prime } & =-2xe^{-x^{2}}\\ M^{\prime \prime } & =-2e^{-x^{2}}-2x\left ( -2e^{-x^{2}}\right ) \\ & =-2e^{-x^{2}}+4xe^{-x^{2}} \end {align*}

Substituting these in (4) gives\begin {align*} \left ( -2e^{-x^{2}}+4xe^{-x^{2}}\right ) -e^{-x^{2}}\left ( \left ( 4x^{2}-2\right ) \right ) & =0\\ -2e^{-x^{2}}+4xe^{-x^{2}}+2e^{-x^{2}}-4x^{2}e^{-x^{2}} & =0\\ 0 & =0 \end {align*}

$$M$$ is satisﬁed. Therefore the integrating factor is $M=e^{-x^{2}}$ Eq (2) now becomes\begin {align*} \left ( My\right ) ^{\prime \prime } & =0\\ My^{\prime } & =c_{1}\\ My & =c_{1}x+c_{2}\\ y & =\frac {c_{1}x+c_{2}}{M}\\ & =\left ( c_{1}x+c_{2}\right ) e^{x^{2}} \end {align*}

Here is an example where the method of integrating factor does not work. Given $$y^{\prime \prime }+\frac {1}{x}y^{\prime }+\frac {1}{x}y=0$$ then $$p=\frac {1}{x},q=\frac {1}{x}$$. Hence\begin {align*} M & =e^{\frac {1}{2}\int pdx}\\ & =e^{\frac {1}{2}\ln x}\\ & =\sqrt {x} \end {align*}

Therefore $$M^{\prime }=\frac {1}{2}x^{\frac {-1}{2}}$$ and $$M^{\prime \prime }=-\frac {1}{4}x^{\frac {-3}{2}}$$. Substituting these in (4) to verify gives (using $$q=x^{-1}$$)\begin {align*} -\frac {1}{4}x^{\frac {-3}{2}}-x^{\frac {1}{2}}\left ( x^{-1}\right ) & =0\\ -\frac {1}{4}x^{\frac {-3}{2}}-x^{-\frac {1}{2}} & =0 \end {align*}

Which does not verify as the LHS is not zero. Therefore the integrating method did not work on this ode.

An easier method to ﬁnd if an integrating factor exists is the following. Since $$M=e^{\frac {1}{2}\int pdx}$$ then substituting this into (2A) gives$y^{\prime \prime }+y^{\prime }\left ( 2\frac {M^{\prime }}{M}\right ) +\frac {M^{\prime \prime }}{M}y=r$ Since $$M^{\prime }=\frac {1}{2}pe^{\frac {1}{2}\int pdx}=\frac {1}{2}pM$$ and since \begin {align*} M^{\prime \prime } & =\frac {1}{2}\left ( p^{\prime }M+pM^{\prime }\right ) \\ & =\frac {1}{2}\left ( p^{\prime }M+\frac {1}{2}p^{2}M\right ) \end {align*}

Then (2A) now becomes\begin {align*} y^{\prime \prime }+y^{\prime }\left ( 2\frac {\frac {1}{2}pM}{M}\right ) +\frac {\frac {1}{2}\left ( p^{\prime }M+\frac {1}{2}p^{2}M\right ) }{M}y & =r\\ y^{\prime \prime }+py^{\prime }+\frac {1}{2}\left ( p^{\prime }+\frac {1}{2}p^{2}\right ) y & =r \end {align*}

By comparing the above to the given ode in normal form shows that for $$M$$ to exist the condition is $q=\frac {1}{2}\left ( p^{\prime }+\frac {1}{2}p^{2}\right )$ if the above is true, then $$M$$ exists and is given by $M=e^{\frac {1}{2}\int pdx}$ Using this method on the ﬁrst example above $$y^{\prime \prime }-4xy^{\prime }+\left ( 4x^{2}-2\right ) y=0$$, where $$p=-4x$$ and $$q=\left ( 4x^{2}-2\right )$$. Checking if $$\left ( 4x^{2}-2\right ) =\frac {1}{2}\left ( p^{\prime }+\frac {1}{2}p^{2}\right )$$, and since $$p=-4x$$, then $$\frac {1}{2}\left ( -4+\frac {1}{2}\left ( 16x^{2}\right ) \right ) =\allowbreak 4x^{2}-2=q$$. Hence $$M$$ exists. This is a much faster method to determine if $$M$$ exists or not.

The second example $$y^{\prime \prime }+\frac {1}{x}y^{\prime }+\frac {1}{x}y=0$$ where $$p=\frac {1}{x},q=\frac {1}{x}$$, then $$\frac {1}{2}\left ( p^{\prime }+\frac {1}{2}p^{2}\right ) =\frac {1}{2}\left ( -x^{-2}+\frac {1}{2}x^{-2}\right ) =-\frac {1}{4x^{2}}\neq q$$. Therefore no $$M$$ exists and the integration factor does not exist for this ode.

### 2 Worked Examples

#### 2.1 Example 1. $$xy^{\prime \prime }+2y^{\prime }-xy=0$$

Trying change of variable on independent variable ﬁrst.  Let $$\tau =g\left ( x\right )$$ where $$z$$ will be the new independent variable. Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+py^{\prime }+qy & =r\\ p & =\frac {2}{x}\\ q & =-1\\ r & =0 \end {align*}

Applying $$\tau =g\left ( x\right )$$ transformation on the above ode gives\begin {equation} y^{\prime \prime }\left ( \tau \right ) +p_{1}\left ( \tau \right ) y^{\prime }\left ( \tau \right ) +q_{1}\left ( \tau \right ) y\left ( \tau \right ) =r_{1}\left ( \tau \right ) \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau ^{\prime } & =\frac {1}{c}\sqrt {q}\tag {5} \end {align}

If $$p_{1}$$ is constant using this $$\tau$$ then (1) is a second order constant coeﬃcient ode which can be solved easily. This ode has $$q=-1$$, therefore from (3)$\tau ^{\prime }=\frac {1}{c}\sqrt {-1}$ Hence $$p_{1}$$ becomes using (2)\begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {0+\left ( 2x^{-1}\right ) \frac {1}{c}\sqrt {-1}}{\frac {-1}{c^{2}}}\\ & =-2x^{-1}\sqrt {-1}c \end {align*}

Which is not a constant. So this transformation failed.

Approach 2  Let $$p_{1}=0$$. If with this choice now $$q_{1}$$ becomes constant or a constant divided by $$\tau ^{2}$$ then (2) can be integrated. $$p_{1}=0$$ implies from (2) that \begin {align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ & =\int e^{-\int 2x^{-1}dx}dx\\ & =\int x^{-2}dx\\ & =\frac {-1}{x} \end {align*}

Using this then $$q_{1}$$ becomes\begin {align*} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {-1}{\left ( \frac {1}{x^{2}}\right ) ^{2}}\\ & =-x^{4}\\ & =-\frac {1}{\tau ^{4}} \end {align*}

Which is not constant and nor a constant divided by $$\tau ^{2}$$. So this transformation did not work.

Trying change of variables on the dependent variable (general case) transformation. This method assumes$y=v\left ( x\right ) z\left ( x\right )$ Substituting this in the given ode results in new ode where the dependent variable is $$v$$ and not $$y$$ which can be found to be$v^{\prime \prime }\left ( x\right ) +\left ( p+\frac {2}{z}z^{\prime }\left ( x\right ) \right ) v^{\prime }\left ( x\right ) +\frac {1}{z}\left ( z^{\prime \prime }\left ( x\right ) +pz^{\prime }\left ( x\right ) +qz\left ( x\right ) \right ) v\left ( x\right ) =\frac {r}{z}$ Let $$p+\frac {2}{z}z^{\prime }\left ( x\right ) =0$$. Solving gives $$z=e^{-\int \frac {p}{2}dx}$$. With this choice the above ode becomes$v^{\prime \prime }+\frac {1}{z}\left ( z^{\prime \prime }+pz^{\prime }+qz\right ) v=\frac {r}{z}$ Applying $$z=e^{-\int \frac {p}{2}dx}$$ to the above reduces it to \begin {equation} v^{\prime \prime }+q_{1}v=r_{1} \tag {6} \end {equation} Where \begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ r_{1} & =re^{\frac {1}{2}\int pdx} \end {align*}

If $$q_{1}$$ turns out to be constant or a constant divided by $$x^{2}$$ with this choice of $$z$$, then $$v$$ is solved for from (6) and the solution to the original ode is obtained. Applying this method on the given ode gives \begin {align*} z & =e^{-\int \frac {p}{2}dx}\\ & =e^{-\int x^{-1}dx}\\ & =e^{-\ln x}\\ & =x^{-1} \end {align*}

Hence \begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ & =-1+\frac {2}{2}x^{-2}-\frac {1}{4}\left ( 2x^{-1}\right ) ^{2}\\ & =-1+x^{-2}-x^{-2}\\ & =-1 \end {align*}

Since $$q_{1}$$ is constant, then this transformation works. Eq (6) now becomes$v^{\prime \prime }-v=0$ The solution is $v=c_{1}e^{-x}+c_{2}e^{x}$ Therefore, since $$z=x^{-1}$$ then \begin {align*} y & =v\left ( x\right ) z\left ( x\right ) \\ & =\frac {1}{x}\left ( c_{1}e^{-x}+c_{2}e^{x}\right ) \end {align*}

This example shows that change of variable on the independent variable did not work, but change of variable on the dependent variable (general case) worked.

Trying change of variable on the dependent variable (special case). This method assumes that$y=v\left ( x\right ) x^{n}$ For some integer $$n$$, This transformation changes the ode to an ode with a missing $$y$$, which can be easily solved as two ﬁrst order ode’s. Substituting this in (A) results in the following ode where the dependent variable is $$v$$ and not $$y$$\begin {equation} x^{n}v^{\prime \prime }+\left ( 2x^{n-1}n+x^{n}p\right ) v^{\prime }+\left ( n\left ( n-1\right ) x^{n-2}+npx^{n-1}+qx^{n}\right ) v=r \tag {7} \end {equation} If it happens that \begin {equation} \left ( n\left ( n-1\right ) x^{n-2}+npx^{n-1}+qx^{n}\right ) =0 \tag {7A} \end {equation} For some $$n$$, then (7) becomes\begin {equation} x^{n}v^{\prime \prime }+\left ( 2x^{n-1}n+x^{n}p\right ) v^{\prime }=r \tag {7B} \end {equation} Which can be solved using substitution $$u=v^{\prime }$$ to give$u^{\prime }+\frac {\left ( 2x^{n-1}n+x^{n}p\right ) }{x^{n}}u=r$ Applying (7A) on this example ode gives\begin {align*} \left ( n\left ( n-1\right ) x^{n-2}+n\left ( \frac {2}{x}\right ) x^{n-1}+\left ( -1\right ) x^{n}\right ) & =0\\ n\left ( n-1\right ) x^{n-2}+2nx^{n-2}-x^{n} & =0\\ \left ( n+n^{2}\right ) x^{n-2}-x^{n} & =0 \end {align*}

It is clear that there exists no integer $$n$$ which makes the LHS above zero. Hence this special transformation did not work.

This is an example where only the change of variable on the dependent variable (general case) worked.

#### 2.2 Example 2. Euler ODE $$x^{2}y^{\prime \prime }\left ( x\right ) +xy^{\prime }\left ( x\right ) +y\left ( x\right ) =0$$

One way to solve Euler ODE \begin {equation} x^{2}y^{\prime \prime }\left ( x\right ) +xy^{\prime }\left ( x\right ) +y\left ( x\right ) =0 \tag {A} \end {equation} Putting it in normal form gives$y^{\prime \prime }\left ( x\right ) +x^{-1}y^{\prime }\left ( x\right ) +x^{-2}y\left ( x\right ) =0$ Hence\begin {align*} p & =x^{-1}\\ q & =x^{-2}\\ r & =0 \end {align*}

Trying change of variable on the independent variable.  Let $$\tau =g\left ( x\right )$$ where $$\tau$$ will be the new independent variable. Applying this transformation results in\begin {equation} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y=r_{1} \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau & =\frac {1}{c}\int \sqrt {q}dx \tag {5} \end {align}

If with this $$\tau$$, then $$p_{1}$$ turns out to be constant, then (1) is now a second order constant coeﬃcient ode which is easily solved. Applying (5) on the given ode gives\begin {align*} \tau & =\frac {1}{c}\int \sqrt {x^{-2}}dx\\ & =\frac {1}{c}\ln x \end {align*}

Using the above on (2) gives\begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =0 \end {align*}

Which is a constant. Hence this transformation worked.  Therefore(1) becomes (using $$q_{1}=c^{2}$$ which is a constant $$c^{2}$$)\begin {align*} y^{\prime \prime }\left ( \tau \right ) +p_{1}y^{\prime }\left ( \tau \right ) +q_{1}y\left ( \tau \right ) & =r_{1}\\ y^{\prime \prime }+c^{2}y & =0 \end {align*}

The solution is$y\left ( \tau \right ) =A\cos \left ( c\tau \right ) +B\sin \left ( c\tau \right )$ But $$\tau =\frac {1}{c}\ln x$$. Hence the above becomes$y\left ( x\right ) =A\cos \left ( \ln x\right ) +B\sin \left ( \ln x\right )$ In practice, this longer method is not needed to solve Euler ode $$x^{2}y^{\prime \prime }\left ( x\right ) +xy^{\prime }\left ( x\right ) +y\left ( x\right ) =0$$ as that the substitution $$y=x^{r}$$ works more easily. But the above method is more general. For example, using $$y=x^{r}$$, then $$x^{2}y^{\prime \prime }\left ( x\right ) +xy^{\prime }\left ( x\right ) +y\left ( x\right ) =0$$ becomes $$r\left ( r-1\right ) +r+1=0$$. The roots $$r$$ are $$i,-i$$. Then the solution is linear combination of the basis solutions given by\begin {align*} y & =Ax^{i}+Bx^{-i}\\ & =Ae^{\ln x^{i}}+Be^{\ln x^{-i}}\\ & =Ae^{i\ln x}+Be^{-i\ln x}\\ & =A\cos \left ( \ln x\right ) +B\sin \left ( \ln x\right ) \end {align*}

Where the last step used Euler relation to do the conversion. Another known transformation for Euler (which is not as simple as the above) is to use $$x=e^{t}$$. Using this gives\begin {equation} \frac {dx}{dt}=e^{t} \tag {2} \end {equation} But $$\ln x=t$$, hence\begin {equation} \frac {dt}{dx}=\frac {1}{x} \tag {3} \end {equation} To do this change of variable and obtain a new ode where now $$y\left ( x\right )$$ becomes $$y\left ( t\right )$$, then $$y^{\prime }\left ( x\right )$$ is changed to $$y^{\prime }\left ( t\right )$$ and $$y^{\prime \prime }\left ( x\right )$$ is changed $$y^{\prime \prime }\left ( t\right )$$. Using\begin {equation} \frac {dy}{dx}=\frac {dy}{dt}\frac {dt}{dx} \tag {4} \end {equation} Substituting (3) into (4) gives$\frac {dy}{dx}=\frac {dy}{dt}\frac {1}{x}$ But $$\frac {1}{x}=e^{-t}$$. The above becomes\begin {equation} \frac {dy}{dx}=e^{-t}\frac {dy}{dt} \tag {5} \end {equation} Now $$y^{\prime \prime }\left ( x\right )$$ needs to change to $$y^{\prime \prime }\left ( t\right )$$. Since$\frac {d^{2}y}{dx^{2}}=\frac {d}{dx}\left ( \frac {dy}{dx}\right )$ Substituting (5) into the above gives$\frac {d^{2}y}{dx^{2}}=\frac {d}{dx}\left ( e^{-t}\frac {dy}{dt}\right )$ Dividing the numerator and denominator of $$\frac {d}{dx}$$ by $$dt$$ gives\begin {align*} \frac {d^{2}y}{dx^{2}} & =\frac {\frac {d}{dt}}{\frac {dx}{dt}}\left ( e^{-t}\frac {dy}{dt}\right ) \\ & =\frac {dt}{dx}\frac {d}{dt}\left ( e^{-t}\frac {dy}{dt}\right ) \end {align*}

But from (3) $$\frac {dt}{dx}=\frac {1}{x}=e^{-t}$$. Hence the above becomes$\frac {d^{2}y}{dx^{2}}=e^{-t}\frac {d}{dt}\left ( e^{-t}\frac {dy}{dt}\right )$ Using the the product rule gives\begin {align} \frac {d^{2}y}{dx^{2}} & =e^{-t}\left ( -e^{-t}\frac {dy}{dt}+e^{-t}\frac {d^{2}y}{dt^{2}}\right ) \nonumber \\ & =e^{-2t}\left ( -\frac {dy}{dt}+\frac {d^{2}y}{dt^{2}}\right ) \nonumber \\ & =e^{-2t}\left ( \frac {d^{2}y}{dt^{2}}-\frac {dy}{dt}\right ) \tag {6} \end {align}

Now $$y^{\prime }\left ( x\right )$$ and $$y^{\prime \prime }\left ( x\right )$$ have been converted to $$y^{\prime }\left ( t\right ) ,y^{\prime \prime }\left ( t\right )$$. Substituting (5,6) in the gives ode gives\begin {align*} x^{2}y^{\prime \prime }\left ( x\right ) +xy^{\prime }\left ( x\right ) +y\left ( x\right ) & =0\\ x^{2}e^{-2t}\left ( \frac {d^{2}y}{dt^{2}}-\frac {dy}{dt}\right ) +xe^{-t}\frac {dy}{dt}+y\left ( t\right ) & =0 \end {align*}

But $$x=e^{t}$$ and $$x^{2}=e^{2t}$$. The above becomes\begin {align*} \frac {d^{2}y}{dt^{2}}-\frac {dy}{dt}+\frac {dy}{dt}+y\left ( t\right ) & =0\\ \frac {d^{2}y}{dt^{2}}+y\left ( t\right ) & =0 \end {align*}

This is now constant coeﬃcient ODE. The solution is$y\left ( t\right ) =A\cos \left ( t\right ) +B\sin \left ( t\right )$ Since$$\ \ln x=t$$, then the above becomes$y\left ( x\right ) =A\cos \left ( \ln x\right ) +B\sin \left ( \ln x\right )$ This completes the solution.

#### 2.3 Example 3. $$y^{\prime \prime }\sin ^{2}\left ( 2x\right ) +y^{\prime }\sin \left ( 4x\right ) -4y=0$$

Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y & =r\qquad \\ p & =\frac {\sin \left ( 4x\right ) }{\sin ^{2}\left ( 2x\right ) }\qquad \sin \left ( 2x\right ) \neq 0\\ q & =-\frac {4}{\sin ^{2}\left ( 2x\right ) } \end {align*}

Trying change of variable on the independent variable as above.  Let $$\tau =g\left ( x\right )$$ where $$\tau$$ will be the new independent variable. Applying this transformation results in\begin {equation} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y=r_{1} \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau & =\frac {1}{c}\int \sqrt {q}dx \tag {5} \end {align}

If with this $$\tau$$, then $$p_{1}$$ turns out to be constant, then it means (1) is second order constant coeﬃcient ode. Applying this on the given ode (5) becomes\begin {align*} \tau & =\frac {1}{c}\int \sqrt {-\frac {4}{\sin ^{2}\left ( 2x\right ) }}dx\\ & =\frac {2i}{c}\int \frac {1}{\sin \left ( 2x\right ) }dx\\ & =\frac {i}{c}\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right ) \end {align*}

Eq (2) now becomes\begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =0 \end {align*}

Which is constant. Hence this transformation worked.  Therefore (1) becomes (since $$q_{1}=c^{2}$$ is constant $$c^{2}$$)\begin {align*} y^{\prime \prime }\left ( \tau \right ) +p_{1}y^{\prime }\left ( \tau \right ) +q_{1}y\left ( \tau \right ) & =r_{1}\\ y^{\prime \prime }+c^{2}y & =0 \end {align*}

This gives $y\left ( \tau \right ) =A\cos \left ( c\tau \right ) +B\sin \left ( c\tau \right )$ Using $$\tau =\frac {i}{c}\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right )$$ the above becomes$y\left ( x\right ) =A\cos \left ( i\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right ) \right ) +B\sin \left ( i\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right ) \right )$ Simplifying using trig identities gives\begin {align*} y\left ( x\right ) & =\frac {-iB\cos \left ( 2x\right ) +A}{\sin \left ( 2x\right ) }\\ & =\frac {B_{0}\cos \left ( 2x\right ) }{\sin \left ( 2x\right ) }+\frac {A}{\sin \left ( 2x\right ) }\\ & =B_{0}\cot \left ( 2x\right ) +A\csc (2x) \end {align*}

Approach 2  Let $$p_{1}=0$$. If with this choice now $$q_{1}$$ becomes constant or a constant divided by $$\tau ^{2}$$ then (2) can be integrated.  $$p_{1}=0$$ implies from (2) that \begin {align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ \tau & =\int e^{-\int \frac {\sin \left ( 4x\right ) }{\sin ^{2}\left ( 2x\right ) }dx}dx\\ \tau & =\int \frac {1}{\sin \left ( 2x\right ) }dx \end {align*}

Using this gives\begin {align*} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {-\frac {4}{\sin ^{2}\left ( 2x\right ) }}{-\frac {1}{\frac {1}{\sin ^{2}\left ( 2x\right ) }}}\\ & =-4 \end {align*}

Which is a constant. Hence this transformation also works. Eq (1) now becomes\begin {align*} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y & =r_{1}\\ y^{\prime \prime }\left ( \tau \right ) -4y\left ( \tau \right ) & =0\\ y\left ( \tau \right ) & =Ae^{-2\tau }+Be^{2\tau } \end {align*}

But $$\tau =\int \frac {1}{\sin \left ( 2x\right ) }dx=\frac {1}{2}\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right )$$, hence \begin {align*} y\left ( x\right ) & =Ae^{-2\frac {1}{2}\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right ) }+Be^{2\frac {1}{2}\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right ) }\\ & =Ae^{-\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right ) }+Be^{\ln \left ( \csc \left ( 2x\right ) -\cot \left ( 2x\right ) \right ) }\\ & =\frac {A}{\csc \left ( 2x\right ) -\cot \left ( 2x\right ) }+B\csc \left ( 2x\right ) -\cot \left ( 2x\right ) \end {align*}

Which can be simpliﬁed to same solution shown in approach 1. This was an example where both sub methods of change of variable on the independent variable worked.

#### 2.4 Example 4. $$\left ( 1-x^{2}\right ) y^{\prime \prime }-xy^{\prime }+y=0$$

Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y & =r\qquad \\ p & =\frac {-x}{\left ( 1-x^{2}\right ) }\qquad x\neq 1,x\neq -1\\ q & =\frac {1}{\left ( 1-x^{2}\right ) } \end {align*}

Trying change of variable on the independent variable as above.  Let $$\tau =g\left ( x\right )$$ where $$\tau$$ will be the new independent variable. Applying this transformation results in\begin {equation} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y=r_{1} \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau & =\frac {1}{c}\int \sqrt {q}dx \tag {5} \end {align}

If with this $$\tau$$, then $$p_{1}$$ turns out to be constant, then it means (1) is second order constant coeﬃcient ode which is easily solved. Using the given ode (5) becomes\begin {align*} \tau & =\frac {1}{c}\int \sqrt {\frac {1}{\left ( 1-x^{2}\right ) }}dx\\ & =\frac {i}{c}\ln \left ( x+\sqrt {x^{2}-1}\right ) \end {align*}

Hence (2) now becomes\begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =0 \end {align*}

Which is constant. Hence this transformation worked.  Therefore the ode (1) becomes (since $$q_{1}=c^{2}$$ is constant $$c^{2}$$)\begin {align*} y^{\prime \prime }\left ( \tau \right ) +p_{1}y^{\prime }\left ( \tau \right ) +q_{1}y\left ( \tau \right ) & =r_{1}\\ y^{\prime \prime }+c^{2}y & =0 \end {align*}

The solution is$y\left ( \tau \right ) =A\cos \left ( c\tau \right ) +B\sin \left ( c\tau \right )$ Using $$\tau =\frac {i}{c}\ln \left ( x+\sqrt {x^{2}-1}\right )$$ the above becomes$y\left ( x\right ) =A\cos \left ( i\ln \left ( x+\sqrt {x^{2}-1}\right ) \right ) +B\sin \left ( i\ln \left ( x+\sqrt {x^{2}-1}\right ) \right )$ Approach 2  Let $$p_{1}=0$$. If with this choice now $$q_{1}$$ becomes constant or a constant divided by $$\tau ^{2}$$ then (2) can be integrated.  $$p_{1}=0$$ implies from (2) that \begin {align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ \tau & =\int e^{\int \frac {x}{\left ( 1-x^{2}\right ) }dx}dx\\ \tau & =\int \frac {1}{\sqrt {x-1}\sqrt {x+1}}dx \end {align*}

Therefore\begin {align*} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {\frac {1}{\left ( 1-x^{2}\right ) }}{\left ( \frac {1}{\sqrt {x-1}\sqrt {x+1}}\right ) ^{2}}\\ & =\frac {\frac {1}{\left ( 1-x^{2}\right ) }}{\frac {1}{\left ( x-1\right ) \left ( x+1\right ) }}\\ & =\frac {\frac {1}{\left ( 1-x^{2}\right ) }}{\frac {1}{x^{2}-1}}\\ & =-1 \end {align*}

Which is a constant. This transformation also worked. Eq (1) becomes\begin {align*} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y & =r_{1}\\ y^{\prime \prime }\left ( \tau \right ) -y\left ( \tau \right ) & =0\\ y\left ( \tau \right ) & =Ae^{-\tau }+Be^{\tau } \end {align*}

Using $$\tau =\int \frac {1}{\sqrt {x-1}\sqrt {x+1}}dx=\ln \left ( x+\sqrt {x^{2}-1}\right )$$, $$\left ( x>1\right )$$ the above\begin {align*} y\left ( x\right ) & =Ae^{-\tau }+Be^{\tau }\\ & =Ae^{-\ln \left ( x+\sqrt {x^{2}-1}\right ) }+Be^{\ln \left ( x+\sqrt {x^{2}-1}\right ) }\\ & =\frac {A}{x+\sqrt {x^{2}-1}}+B\left ( x+\sqrt {x^{2}-1}\right ) \end {align*}

This solution looks diﬀerent from the solution found above using approach 1, but can be shown to be the same. This was an example where both methods of change of variable on the independent variable work.

#### 2.5 Example 5. $$x^{2}y^{\prime \prime }-xy^{\prime }+\left ( -x^{2}-\frac {1}{4}\right ) y=0$$

Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y & =r\qquad \\ p & =\frac {-1}{x}\qquad x\neq 0\\ q & =-\frac {x^{2}+\frac {1}{4}}{x^{2}}\\ r & =0 \end {align*}

Trying change of variable on the independent variable as above.  Let $$\tau =g\left ( x\right )$$ where $$\tau$$ will be the new independent variable. Applying this transformation results in\begin {equation} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y=r_{1} \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau & =\frac {1}{c}\int \sqrt {q}dx \tag {5} \end {align}

If with this $$\tau$$, then $$p_{1}$$ turns out to be constant, then it means (1) is second order constant coeﬃcient ode which is easily solved. Applying this on the given ode then (5) \begin {align*} \tau & =\frac {1}{c}\int \sqrt {-\frac {x^{2}+\frac {1}{4}}{x^{2}}}dx\\ & =\frac {1}{2c}\sqrt {-4x^{2}-1}+\arctan \left ( \frac {1}{\sqrt {-4x^{2}-1}}\right ) \end {align*}

Hence (2) now becomes\begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {\left ( 8x^{2}+4\right ) c}{\left ( -4x^{2}-1\right ) ^{\frac {3}{2}}} \end {align*}

Which is not constant. Therefore this transformation did not work.

Approach 2  Let $$p_{1}=0$$. If with this choice now $$q_{1}$$ becomes constant or a constant divided by $$\tau ^{2}$$ then (2) can be integrated.  $$p_{1}=0$$ implies from (2) that \begin {align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ & =\int e^{\int \frac {1}{x}dx}dx\\ & =\int e^{\ln x}dx\\ & =\int xdx\\ & =\frac {x^{2}}{2} \end {align*}

Using this then $$q_{1}$$ becomes\begin {align*} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {-\frac {x^{2}+\frac {1}{4}}{x^{2}}}{x^{2}}\\ & =-\frac {1}{x^{4}}\left ( x^{2}+\frac {1}{4}\right ) \end {align*}

Which is not constant.

Trying change of variable on the dependent variable (general case). This method assumes$y=v\left ( x\right ) z\left ( x\right )$ Substituting this in the given ode results in the following ode where the dependent variable is $$v$$ and not $$y$$\begin {equation} v^{\prime \prime }\left ( x\right ) +\left ( p+\frac {2}{z}z^{\prime }\left ( x\right ) \right ) v^{\prime }\left ( x\right ) +\frac {1}{z}\left ( z^{\prime \prime }\left ( x\right ) +pz^{\prime }\left ( x\right ) +qz\left ( x\right ) \right ) v\left ( x\right ) =0 \tag {6} \end {equation} Let the coeﬃcient of $$v^{\prime }$$ in (6) be zero. This implies $$p+\frac {2}{z}z^{\prime }\left ( x\right ) =0$$. Solving for $$z\left ( x\right )$$ gives \begin {align} z & =e^{-\int \frac {p}{2}dx}\tag {6A}\\ & =e^{-\frac {1}{2}\int \frac {-1}{x}dx}\nonumber \\ & =e^{-\frac {1}{2}\ln x}\nonumber \\ & =\frac {1}{\sqrt {x}}\nonumber \end {align}

With this choice (6) now becomes (after some algebra)$v^{\prime \prime }+\frac {1}{z}\left ( z^{\prime \prime }+pz^{\prime }+qz\right ) v=0$ Substituting (6A) in the above reduces it to\begin {equation} v^{\prime \prime }+q_{1}v=0 \tag {6B} \end {equation} Where \begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ r_{1} & =re^{\frac {1}{2}\int pdx}\\ & =0\qquad \text {(since }r=0\text {)} \end {align*}

If $$q_{1}$$ turns out to be constant or constant divided by $$x^{2}$$, then $$v\left ( x\right )$$ is found (6B) and the solution to the original ode is thus obtained using $$y=v\left ( x\right ) z\left ( x\right )$$ since $$z\left ( x\right )$$ is also known from (6A). \begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ & =-\frac {x^{2}+\frac {1}{4}}{x^{2}}-\frac {1}{2}\frac {d}{dx}\left ( \frac {-1}{x}\right ) -\frac {1}{4}\left ( \frac {-1}{x}\right ) ^{2}\\ & =-\frac {1}{x^{2}}\left ( x^{2}+1\right ) \end {align*}

Since $$q_{1}$$ is not constant and not constant divided by $$x^{2}$$, then this transformation did not work. One way to solve this is as a Bessel ODE. I have many examples how to do this on my main page.

#### 2.6 Example 6. $$\left ( x^{2}-1\right ) y^{\prime \prime }-2xy^{\prime }+2y=0$$

Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y & =r\qquad \\ p & =\frac {-2x}{x^{2}-1}\qquad x\neq \pm 1\\ q & =\frac {2}{x^{2}-1}\\ r & =0 \end {align*}

Trying change of variable on the independent variable as above.  Let $$\tau =g\left ( x\right )$$ where $$\tau$$ will be the new independent variable. Applying this transformation results in\begin {equation} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y=r_{1} \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau & =\frac {1}{c}\int \sqrt {q}dx \tag {5} \end {align}

If with this $$\tau$$, then $$p_{1}$$ turns out to be constant, then it means (1) is second order constant coeﬃcient ode. Applying this on the given ode (5) becomes\begin {align*} \tau & =\frac {1}{c}\int \sqrt {\frac {2}{x^{2}-1}}dx\\ & =\frac {1}{c}\sqrt {2}\ln \left ( x+\sqrt {x^{2}}-1\right ) \end {align*}

Hence (2) reduces to\begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =-\frac {3\sqrt {2}cx}{\sqrt {\frac {1}{x^{2}-1}}\left ( 2x^{2}-2\right ) } \end {align*}

Which is not constant. This transformation did not work.

Approach 2  Let $$p_{1}=0$$. If with this choice now $$q_{1}$$ becomes constant or a constant divided by $$\tau ^{2}$$ then (2) can be easily integrated.  $$p_{1}=0$$ implies from (2) that \begin {align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ & =\int e^{\int \frac {2x}{x^{2}-1}dx}dx\\ & =\int \left ( x^{2}-1\right ) dx \end {align*}

Hence $$q_{1}$$ becomes \begin {align*} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {\frac {2}{x^{2}-1}}{\left ( x^{2}-1\right ) ^{2}}\\ & =\frac {2}{\left ( x^{2}-1\right ) ^{3}} \end {align*}

Which is not constant. This transformation did not work.

Trying change of variable on the dependent variable (general method). This method assumes that$y=v\left ( x\right ) z\left ( x\right )$ Substituting this in the given ode results in the following ode where the dependent variable is $$v$$ and not $$y$$\begin {equation} v^{\prime \prime }\left ( x\right ) +\left ( p+\frac {2}{z}z^{\prime }\left ( x\right ) \right ) v^{\prime }\left ( x\right ) +\frac {1}{z}\left ( z^{\prime \prime }\left ( x\right ) +pz^{\prime }\left ( x\right ) +qz\left ( x\right ) \right ) v\left ( x\right ) =0 \tag {6} \end {equation} Let the coeﬃcient of $$v^{\prime }$$ in (6) be zero. This means $$p+\frac {2}{z}z^{\prime }\left ( x\right ) =0$$. Solving gives \begin {equation} z=e^{-\int \frac {p}{2}dx} \tag {6A} \end {equation} With this choice eq. (6) now becomes (after some algebra)$v^{\prime \prime }+\frac {1}{z}\left ( z^{\prime \prime }+pz^{\prime }+qz\right ) v=0$ Applying (6A) into the above reduces it to\begin {equation} v^{\prime \prime }+q_{1}v=0 \tag {6B} \end {equation} Where $q_{1}=q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}$ If $$q_{1}$$ turns out to be constant, or constant divided by $$x^{2}$$, then $$v\left ( x\right )$$ is solved for from (6B) and the solution to the original ode is thus obtained using $$y=v\left ( x\right ) z\left ( x\right )$$ since $$z\left ( x\right )$$ is also known from (6A). Finding $$q_{1}$$ gives\begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ & =\left ( \frac {2}{x^{2}-1}\right ) -\frac {1}{2}\frac {d}{dx}\left ( \frac {-2x}{x^{2}-1}\right ) -\frac {1}{4}\left ( \frac {-2x}{x^{2}-1}\right ) ^{2}\\ & =-\frac {3}{\left ( x^{2}-1\right ) ^{2}} \end {align*}

Which is not constant and not constant divided by $$x^{2}$$. Hence this transformation also did not work.

Trying the Lagrange adjoint ode method. From above the adjoint ode is $z^{\prime \prime }-\frac {d\left ( zp\right ) }{dx}+zq=0$ For some unknown function $$z\left ( x\right )$$. Hence it becomes\begin {align*} z^{\prime \prime }-\frac {d}{dx}\left ( z\left ( \frac {-2x}{x^{2}-1}\right ) \right ) +z\left ( \frac {2}{x^{2}-1}\right ) & =0\\ z^{\prime \prime }-\left ( -\frac {2z^{\prime }x}{x^{2}-1}+\frac {4zx^{2}}{\left ( x^{2}-1\right ) ^{2}}-\frac {2z}{x^{2}-1}\right ) +z\left ( \frac {2}{x^{2}-1}\right ) & =0\\ z^{\prime \prime }+\frac {2x}{x^{2}-1}z^{\prime }-\frac {4x^{2}+4\left ( x^{2}-1\right ) }{\left ( x^{2}-1\right ) ^{2}}z & =0 \end {align*}

Clearly this is just as hard to solve as the original ode So this method does it work.

Trying integrating factor method. For this to work the condition is that $$\frac {1}{2}\left ( p^{\prime }+\frac {1}{2}p^{2}\right ) =q$$. Applying this on the current ode gives\begin {align*} \frac {1}{2}\left ( p^{\prime }+\frac {1}{2}p^{2}\right ) & =q\\ \frac {1}{2}\left ( \frac {d}{dx}\left ( \frac {-2x}{x^{2}-1}\right ) +\frac {1}{2}\left ( \frac {-2x}{x^{2}-1}\right ) ^{2}\right ) & =\frac {2}{x^{2}-1}\\ \frac {\left ( 2x^{2}+1\right ) }{\left ( x^{2}-1\right ) ^{2}} & =\frac {2}{x^{2}-1}\\ \frac {2x^{2}+1}{x^{2}-1} & =2 \end {align*}

Which is not true. Hence there is no integrating factor.

Trying transformation on the dependent variable (speciﬁc case 1). This method assumes$y=v\left ( x\right ) x^{n}$ This works only if (7A) given in the introduction is satisﬁed.\begin {equation} \left ( n\left ( n-1\right ) x^{n-2}+npx^{n-1}+qx^{n}\right ) =0 \tag {7A} \end {equation} Applying this on the current ode example gives$\left ( n\left ( n-1\right ) x^{n-2}+n\left ( \frac {-2x}{x^{2}-1}\right ) x^{n-1}+\left ( \frac {2}{x^{2}-1}\right ) x^{n}\right ) =0$ Trying $$n=1$$ the above becomes$\left ( \left ( \frac {-2x}{x^{2}-1}\right ) +\left ( \frac {2}{x^{2}-1}\right ) x\right ) =0$ Hence this transformation works for $$n=1$$. Therefore $$y=v\left ( x\right ) x$$. eq (7) in the introduction now reduces to\begin {align} x^{n}v^{\prime \prime }+\left ( 2x^{n-1}n+x^{n}p\right ) v^{\prime }+\left ( n\left ( n-1\right ) x^{n-2}+npx^{n-1}+qx^{n}\right ) v & =r\tag {7}\\ v^{\prime \prime }+\frac {\left ( xp+2\right ) }{x}v^{\prime } & =0\nonumber \end {align}

Which now can be solved using substitution $$u=v^{\prime }$$. $u^{\prime }+\frac {\left ( xp+2\right ) }{x}u=r$ Which is linear ﬁrst order ode. Once $$u$$ is found, then $$v$$ is found by integration. Hence $$y$$ is now found. Hence$u^{\prime }-\frac {2}{x^{3}-x}u=0$ Which has the solution $$u=c_{1}\frac {x^{2}}{x^{2}-1}$$. Hence $$v^{\prime }=c_{1}\frac {x^{2}}{x^{2}-1}$$. Integrating gives $$v=c_{1}\left ( x+\frac {1}{x}\right ) +c_{2}$$. Therefore $$y=xv=c_{1}\left ( x^{2}+1\right ) +c_{2}x$$

This was an example where only the transformation on the dependent variable special case $$y=v\left ( x\right ) x^{n}$$ worked.

#### 2.7 Example 7. $$xy^{\prime \prime }+\left ( x^{2}-1\right ) y^{\prime }+x^{3}y=0$$

Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y & =r\qquad \\ p & =\frac {x^{2}-1}{x}\qquad x\neq 0\\ q & =x^{2}\\ r & =0 \end {align*}

Trying change of variable on the independent variable as above.  Let $$\tau =g\left ( x\right )$$ where $$\tau$$ will be the new independent variable. Applying this transformation results in\begin {equation} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y=r_{1} \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau ^{\prime } & =\frac {1}{c}\sqrt {q} \tag {5} \end {align}

If $$p_{1}$$ turns out to be constant with this $$\tau$$ then it implies (1) is second order constant coeﬃcient ode. Eq (5) becomes\begin {align*} \tau ^{\prime } & =\frac {1}{c}\sqrt {x^{2}}\\ \tau ^{\prime \prime }\left ( x\right ) & =\frac {1}{2c}\frac {2x}{\sqrt {x^{2}}} \end {align*}

Hence from (2) \begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {\frac {1}{2c}\frac {2x}{\sqrt {x^{2}}}+\left ( \frac {x^{2}-1}{x}\right ) \frac {1}{c}\sqrt {x^{2}}}{\left ( \frac {1}{c}\sqrt {x^{2}}\right ) ^{2}}\\ & =c \end {align*}

Which is a constant. Then (1) becomes second order of constant coeﬃcient$y^{\prime \prime }\left ( \tau \right ) +cy^{\prime }\left ( \tau \right ) +c^{2}y\left ( \tau \right ) =0$ Which has the solution$y\left ( \tau \right ) =e^{-\frac {c\tau }{2}}\left ( A\sin \left ( \frac {c\sqrt {3}\tau }{2}\right ) +B\sin \left ( \frac {c\sqrt {3}\tau }{2}\right ) \right )$ But from earlier $$\tau =\frac {x^{2}}{2c}$$. Hence the above becomes\begin {align*} y\left ( x\right ) & =Ae^{-\frac {c\frac {x^{2}}{2c}}{2}}\sin \left ( \frac {c\sqrt {3}\frac {x^{2}}{2c}}{2}\right ) +Be^{-\frac {c\frac {x^{2}}{2c}}{2}}\sin \left ( \frac {c\sqrt {3}\frac {x^{2}}{2c}}{2}\right ) \\ & =e^{-\frac {x^{2}}{4}}\left ( A\sin \left ( \frac {\sqrt {3}x^{2}}{4}\right ) +B\sin \left ( \frac {\sqrt {3}x^{2}}{4}\right ) \right ) \end {align*}

Approach 2

Let $$p_{1}=0$$. If with this choice now $$q_{1}$$ becomes constant or a constant divided by $$\tau ^{2}$$ then (2) can be easily integrated.  $$p_{1}=0$$ implies from (2) that \begin {align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ & =\int e^{-\int \frac {x^{2}-1}{x}dx}dx\\ & =\int xe^{-\frac {x^{2}}{2}}dx\\ & =-e^{-\frac {x^{2}}{2}} \end {align*}

Therefore\begin {align*} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {x^{2}}{\left ( xe^{-\frac {x^{2}}{2}}\right ) ^{2}}\\ & =e^{x^{2}} \end {align*}

Which is not constant. Now it is checked to see if it is constant divided by $$\tau ^{2}$$. Since $$\tau ^{2}=\left ( -e^{-\frac {x^{2}}{2}}\right ) ^{2}=\allowbreak e^{-x^{2}}$$ then $$q_{1}=\frac {1}{\tau ^{2}}$$. Therefore this approach also worked.

Eq (2) becomes\begin {align} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y & =0\tag {1}\\ y^{\prime \prime }+\frac {1}{\tau ^{2}}y & =0\nonumber \\ \tau ^{2}y^{\prime \prime }+y & =0\nonumber \end {align}

Which is standard Euler ode which can be solved easily. Giving$y\left ( \tau \right ) =A\sqrt {\tau }\cos \left ( \frac {\sqrt {3}}{2}\ln \left ( \tau \right ) \right ) +B\sqrt {\tau }\sin \left ( \frac {\sqrt {3}}{2}\ln \left ( \tau \right ) \right )$ But $$\tau =-e^{-\frac {x^{2}}{2}}$$. Hence the above becomes$y\left ( x\right ) =A\sqrt {-e^{-\frac {x^{2}}{2}}}\cos \left ( \frac {\sqrt {3}}{2}\ln \left ( -e^{-\frac {x^{2}}{2}}\right ) \right ) +B\sqrt {-e^{-\frac {x^{2}}{2}}}\sin \left ( \frac {\sqrt {3}}{2}\ln \left ( -e^{-\frac {x^{2}}{2}}\right ) \right )$ This looks diﬀerent from the solution obtained in approach 1, but it veriﬁes also as correct solution.  This is an example where change of independent variable using $$q_{1}=c^{2}$$ works and also change of independent variable using $$p_{1}=0$$ works as well.

#### 2.8 Example 8. $$4x^{2}\sin \left ( x\right ) y^{\prime \prime }+\left ( -4x^{2}\cos x-4x\sin x\right ) y^{\prime }+\left ( 2x\cos x+3\sin x\right ) y=0$$

Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y & =0\\ p & =\frac {-4x^{2}\cos x-4x\sin x}{4x^{2}\sin \left ( x\right ) }\qquad x\neq 0,\pi ,2\pi ,\cdots \\ q & =\frac {2x\cos x+3\sin x}{4x^{2}\sin \left ( x\right ) }\\ r & =0 \end {align*}

Applying transformation on the dependent variable $$y=v\left ( x\right ) x^{n}$$ results in\begin {align} x^{n}v^{\prime \prime }+\left ( 2nx^{n-1}+px^{n}\right ) v^{\prime }+\left ( n\left ( n-1\right ) x^{n-2}+px^{n-1}n+qx^{n}\right ) v & =0\nonumber \\ v^{\prime \prime }+\frac {\left ( 2nx^{n-1}+px^{n}\right ) }{x^{n}}v^{\prime }+\left ( \frac {n\left ( n-1\right ) x^{n-2}+px^{n-1}n+qx^{n}}{x^{n}}\right ) v & =0\nonumber \\ v^{\prime \prime }+\left ( 2nx^{-1}+p\right ) v^{\prime }+\left ( n\left ( n-1\right ) x^{-2}+px^{-1}n+q\right ) v & =0\nonumber \\ v^{\prime \prime }+\left ( 2nx^{-1}+p\right ) v^{\prime }+\left ( pnx^{-1}+q+\left ( n^{2}-n\right ) x^{-2}\right ) v & =0\tag {1} \end {align}

Assuming the coeﬃcient of $$v\left ( x\right )$$ above is zero. This gives$pnx^{-1}+q+\left ( n^{2}-n\right ) x^{-2}=0$ Substituting the values for $$p,q\,$$in the above gives$\left ( \frac {-4x^{2}\cos x-4x\sin x}{4x^{2}\sin \left ( x\right ) }\right ) nx^{-1}+\frac {2x\cos x+3\sin x}{4x^{2}\sin \left ( x\right ) }+\left ( n^{2}-n\right ) x^{-2}=0$ Solving for $$n$$ shows that $$n=\frac {1}{2}$$. Hence (1) now reduces to\begin {align*} v^{\prime \prime }+\left ( x^{-1}+p\right ) v^{\prime } & =0\\ v^{\prime \prime }+\left ( \frac {1}{x}+\frac {-4x^{2}\cos x-4x\sin x}{4x^{2}\sin \left ( x\right ) }\right ) v^{\prime } & =0\\ v^{\prime \prime }+\left ( \frac {4x\sin x-4x^{2}\cos x-4x\sin x}{4x^{2}\sin x}\right ) v^{\prime } & =0\\ v^{\prime \prime }+\left ( \frac {-4x^{2}\cos x}{4x^{2}\sin x}\right ) v^{\prime } & =0\\ v^{\prime \prime }-\frac {\cos x}{\sin x}v^{\prime } & =0 \end {align*}

Let $$v^{\prime }=u,$$ the above becomes$u^{\prime }-\frac {\cos x}{\sin x}u=0$ Which is linear ﬁrst order ode. It has the solution $$u=c_{1}\sin \left ( x\right )$$. Hence $v^{\prime }=c_{1}\sin \left ( x\right )$ Integrating gives$v=-c_{1}\cos \left ( x\right ) +c_{2}$ Therefore\begin {align*} y & =v\sqrt {x}\\ & =\left ( -c_{1}\cos \left ( x\right ) +c_{2}\right ) \sqrt {x} \end {align*}

This can also be written as$y=\left ( c_{3}\cos \left ( x\right ) +c_{2}\right ) \sqrt {x}$

#### 2.9 Example 9  $$x^{2}y^{\prime \prime }-\left ( 2a-1\right ) xy^{\prime }+a^{2}y=0$$

The above is standard Euler ode. But below shows how to apply these transformations if one did not know this.

Trying change of variable on independent variable ﬁrst.  Let $$\tau =g\left ( x\right )$$ where $$z$$ will be the new independent variable. Writing the ode in normal form gives\begin {align*} y^{\prime \prime }+py^{\prime }+qy & =r\\ p & =\frac {\left ( 1-2a\right ) }{x}\\ q & =\frac {a^{2}}{x^{2}}\\ r & =0 \end {align*}

Applying $$\tau =g\left ( x\right )$$ transformation on the above ode gives\begin {equation} y^{\prime \prime }\left ( \tau \right ) +p_{1}\left ( \tau \right ) y^{\prime }\left ( \tau \right ) +q_{1}\left ( \tau \right ) y\left ( \tau \right ) =r_{1}\left ( \tau \right ) \tag {1} \end {equation} Where \begin {align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies\begin {align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau ^{\prime } & =\frac {1}{c}\sqrt {q}\tag {5} \end {align}

If $$p_{1}$$ is constant using this $$\tau$$ then (1) is a second order constant coeﬃcient ode which can be solved easily. This ode has $$q=\frac {a^{2}}{x^{2}}$$, therefore from (5) assuming positive\begin {align*} \tau ^{\prime } & =\frac {1}{c}\sqrt {\frac {a^{2}}{x^{2}}}\\ & =\frac {a}{cx} \end {align*}

Hence $$p_{1}$$ becomes using (2)\begin {align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {\left ( 1-2a\right ) c}{x} \end {align*}

Which is not a constant. So this transformation failed.

Approach 2  Let $$p_{1}=0$$. If with this choice $$q_{1}$$ becomes a constant or a constant divided by $$\tau ^{2}$$ then (2) can be integrated. $$p_{1}=0$$ implies from (2) that \begin {align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ & =\int e^{-\int \frac {\left ( 1-2a\right ) }{x}dx}dx\\ & =\int x^{2a-1}dx\\ & =\frac {x^{2a}}{2a} \end {align*}

Using this then $$q_{1}$$ becomes\begin {align} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\nonumber \\ & =\frac {\left ( \frac {a^{2}}{x^{2}}\right ) }{\left ( x^{2a-1}\right ) ^{2}}\nonumber \\ & =\frac {a^{2}}{x^{2}x^{4a-2}}\nonumber \\ & =\frac {a^{2}}{x^{4a}}\tag {6} \end {align}

Which is not constant. But $$\tau ^{2}=\left ( \frac {x^{2a}}{2a}\right ) ^{2}=\frac {x^{4a}}{4a^{2}}$$. Hence $$q_{1}=\frac {1}{4}\frac {1}{\tau ^{2}}$$. Hence this transformation works. Eq (2) becomes\begin {align} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y & =0\tag {1}\\ y^{\prime \prime }+\frac {1}{4}\frac {1}{\tau ^{2}}y & =0\nonumber \\ 4\tau ^{2}y^{\prime \prime }+y & =0\nonumber \end {align}

Which is standard Euler ode which can be solved easily. Giving$y\left ( \tau \right ) =A\sqrt {\tau }+B\sqrt {\tau }\ln \left ( \tau \right )$ But $$\tau =\frac {x^{2a}}{2a}$$. Hence the above becomes\begin {align*} y\left ( x\right ) & =A\sqrt {\frac {x^{2a}}{2a}}+B\sqrt {\frac {x^{2a}}{2a}}\ln \left ( \frac {x^{2a}}{2a}\right ) \\ & =A\sqrt {\frac {x^{2a}}{2a}}+B\sqrt {\frac {x^{2a}}{2a}}\ln \left ( \frac {x^{2a}}{2a}\right ) \\ & =A_{1}x^{a}+B_{1}x^{a}\ln \left ( \frac {x^{2a}}{2a}\right ) \end {align*}

#### 2.10 Example 10. Bessel ODE

Given the ode\begin {equation} y^{\prime \prime }\left ( x\right ) +\left ( 1-\frac {3}{4x^{2}}\right ) y\left ( x\right ) =0 \tag {A} \end {equation} Trying change of variables on the dependent variable.   In this method we assume$y=v\left ( x\right ) z\left ( x\right )$ Substituting this in the ode $y^{\prime \prime }\left ( x\right ) +p\left ( x\right ) y^{\prime }\left ( x\right ) +q\left ( x\right ) y\left ( x\right ) =r\left ( x\right )$ Results in new ode where the dependent variable is $$v$$ and not $$y$$ which can be found to be$v^{\prime \prime }\left ( x\right ) +\left ( p+\frac {2}{z}z^{\prime }\left ( x\right ) \right ) v^{\prime }\left ( x\right ) +\frac {1}{z}\left ( z^{\prime \prime }\left ( x\right ) +pz^{\prime }\left ( x\right ) +qz\left ( x\right ) \right ) v\left ( x\right ) =\frac {r}{z}$ Now we let $$p+\frac {2}{z}z^{\prime }\left ( x\right ) =0$$. Solving for $$z=e^{-\int \frac {p}{2}dx}$$. Hence with this choice the above ode becomes$v^{\prime \prime }+\frac {1}{z}\left ( z^{\prime \prime }+pz^{\prime }+qz\right ) v=\frac {r}{z}$ Applying $$z=e^{-\int \frac {p}{2}dx}$$ to the above reduces it to \begin {equation} v^{\prime \prime }+q_{1}v=r_{1} \tag {B} \end {equation} Where \begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ r_{1} & =re^{\frac {1}{2}\int pdx} \end {align*}

If $$q_{1}$$ turns out to be constant or constant divided by $$x^{2}$$ with this choice of $$z$$, then $$v$$ is solved for from (B) and the solution to the original ODE is thus obtained.

Using the given $$y^{\prime \prime }\left ( x\right ) +\left ( 1-\frac {3}{4x^{2}}\right ) y\left ( x\right ) =0$$ shows that\begin {align*} p & =0\\ q & =\left ( 1-\frac {3}{4x^{2}}\right ) \end {align*}

Then \begin {align*} z & =e^{-\int \frac {p}{2}dx}\\ & =1 \end {align*}

Hence \begin {align*} q_{1} & =q-\frac {1}{2}p^{\prime }-\frac {1}{4}p^{2}\\ & =\left ( 1-\frac {3}{4x^{2}}\right ) \end {align*}

Since $$q_{1}$$ is not constant and not constant divided by $$x^{2}$$, then this method does not work.

Trying change of variable on independent variable.

Let $$z=g\left ( x\right )$$ where $$z$$ will be the new independent variable. In general, given an ode of the form$y^{\prime \prime }\left ( x\right ) +p\left ( x\right ) y^{\prime }\left ( x\right ) +q\left ( x\right ) y\left ( x\right ) =r\left ( x\right )$ Then applying this transformation results in\begin {equation} y^{\prime \prime }\left ( z\right ) +p_{1}\left ( z\right ) y^{\prime }\left ( z\right ) +q_{1}\left ( z\right ) y\left ( z\right ) =r_{1}\left ( z\right ) \tag {1} \end {equation} Where \begin {align} p_{1}\left ( z\right ) & =\frac {z^{\prime \prime }\left ( x\right ) +pz^{\prime }\left ( x\right ) }{\left ( z^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( z\right ) & =\frac {q}{\left ( z^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( z\right ) & =\frac {r}{\left ( z^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4} \end {align}

Approach 1. Let $$q_{1}=c^{2}$$ where $$c^{2}$$ is some constant. This implies

\begin {align} \frac {q}{\left ( z^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ z & =\frac {1}{c}\int \sqrt {q}dx \tag {5} \end {align}

If with this $$z$$, then $$p_{1}$$ turns out to be constant, then it means (1) is second order constant coeﬃcient ode. Applying this on current ode then (5) becomes\begin {align*} z & =\frac {1}{c}\int \sqrt {\left ( 1-\frac {3}{4x^{2}}\right ) }dx\\ & =\frac {1}{2c}\left ( \sqrt {4x^{2}-3}+\sqrt {3}\arctan \left ( \frac {\sqrt {3}}{\sqrt {4x^{2}-3}}\right ) \right ) \end {align*}

Hence (2) becomes\begin {align*} p_{1}\left ( z\right ) & =\frac {z^{\prime \prime }\left ( x\right ) +pz^{\prime }\left ( x\right ) }{\left ( z^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {6c}{\left ( 4x^{2}-3\right ) ^{\frac {3}{2}}} \end {align*}

Which is not a constant. So this transformation did not work.  So change of variable on both the dependent and independent variable does not work for this ode to convert it to one with constant coeﬃcient.

Trying converting it to standard Bessel ODE.  Using this change of variable on the dependent variable $y=ux^{\frac {1}{2}}$ To transform (A) to standard Bessel ODE$x^{2}u^{\prime \prime }+xu^{\prime }+\left ( x^{2}-1\right ) u=0$ Since $$y=ux^{\frac {1}{2}}$$ then\begin {equation} \frac {dy}{dx}=\frac {du}{dx}x^{\frac {1}{2}}+u\frac {x^{\frac {-1}{2}}}{2} \tag {2A} \end {equation} And\begin {align} \frac {d^{2}y}{dx^{2}} & =\frac {d}{dx}\left ( \frac {du}{dx}x^{\frac {1}{2}}+u\frac {x^{\frac {-1}{2}}}{2}\right ) \nonumber \\ & =\frac {d}{dx}\left ( \frac {du}{dx}x^{\frac {1}{2}}\right ) +\frac {d}{dx}\left ( u\frac {x^{\frac {-1}{2}}}{2}\right ) \nonumber \\ & =\frac {d^{2}u}{dx^{2}}x^{\frac {1}{2}}+\frac {1}{2}\frac {du}{dx}x^{-\frac {1}{2}}+\frac {1}{2}\frac {du}{dx}x^{\frac {-1}{2}}-\frac {1}{4}ux^{-\frac {3}{2}}\nonumber \\ & =\frac {d^{2}u}{dx^{2}}x^{\frac {1}{2}}+\frac {du}{dx}x^{-\frac {1}{2}}-\frac {1}{4}ux^{-\frac {3}{2}} \tag {3A} \end {align}

Substituting (2A,3A) into (A) gives\begin {align*} \frac {d^{2}u}{dx^{2}}x^{\frac {1}{2}}+\frac {du}{dx}x^{-\frac {1}{2}}-\frac {1}{4}ux^{-\frac {3}{2}}+\left ( 1-\frac {3}{4x^{2}}\right ) ux^{\frac {1}{2}} & =0\\ \frac {d^{2}u}{dx^{2}}x^{\frac {1}{2}}+\frac {du}{dx}x^{-\frac {1}{2}}-\frac {1}{4}ux^{-\frac {3}{2}}+ux^{\frac {1}{2}}-\frac {3}{4}ux^{-\frac {3}{2}} & =0\\ \frac {d^{2}u}{dx^{2}}x^{\frac {1}{2}}+\frac {du}{dx}x^{-\frac {1}{2}}-ux^{-\frac {3}{2}}+ux^{\frac {1}{2}} & =0 \end {align*}

Multiplying both side by $$x^{\frac {3}{2}}$$ gives\begin {align*} x^{2}\frac {d^{2}u}{dx^{2}}+x\frac {du}{dx}-u+ux^{2} & =0\\ x^{2}\frac {d^{2}u}{dx^{2}}+x\frac {du}{dx}-\left ( 1-x^{2}\right ) u & =0\\ x^{2}\frac {d^{2}u}{dx^{2}}+x\frac {du}{dx}+\left ( x^{2}-1\right ) u & =0 \end {align*}

Which is Bessel ode where order is $$n=1$$. This has known standard solution. Once $$u\left ( x\right )$$ is known, then $$y\left ( x\right )$$ which is the solution to the original ODE (A) is now known also. There is a more general method and better method to ﬁnd if second order ode can be transformed to Bessel ODE. See my main page for examples and description.