4.65 problem 62

4.65.1 Solved as second order ode adjoint method
4.65.2 Maple step by step solution
4.65.3 Maple trace
4.65.4 Maple dsolve solution
4.65.5 Mathematica DSolve solution

Internal problem ID [7934]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 62
Date solved : Monday, October 21, 2024 at 04:35:16 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solve

\begin{align*} \frac {x y^{\prime \prime }}{1-x}+x y&=0 \end{align*}

4.65.1 Solved as second order ode adjoint method

Time used: 0.809 (sec)

In normal form the ode

\begin{align*} \frac {x y^{\prime \prime }}{1-x}+x y = 0 \tag {1} \end{align*}

Becomes

\begin{align*} y^{\prime \prime }+p \left (x \right ) y^{\prime }+q \left (x \right ) y&=r \left (x \right ) \tag {2} \end{align*}

Where

\begin{align*} p \left (x \right )&=0\\ q \left (x \right )&=1-x\\ r \left (x \right )&=0 \end{align*}

The Lagrange adjoint ode is given by

\begin{align*} \xi ^{''}-(\xi \, p)'+\xi q &= 0\\ \xi ^{''}-\left (0\right )' + \left (\left (1-x \right ) \xi \left (x \right )\right ) &= 0\\ \xi ^{\prime \prime }\left (x \right )-\left (-1+x \right ) \xi \left (x \right )&= 0 \end{align*}

Which is solved for \(\xi (x)\). This is Airy ODE. It has the general form

\[ a \xi ^{\prime \prime } + b \xi ^{\prime } + c \xi x = F(x) \]

Where in this case

\begin{align*} a &= 1\\ b &= 0\\ c &= \frac {1-x}{x}\\ F &= 0 \end{align*}

Therefore the solution to the homogeneous Airy ODE becomes

\[ \xi = c_3 \operatorname {AiryAi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )+c_4 \operatorname {AiryBi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right ) \]

Will add steps showing solving for IC soon.

The original ode (2) now reduces to first order ode

\begin{align*} \xi \left (x \right ) y^{\prime }-y \xi ^{\prime }\left (x \right )+\xi \left (x \right ) p \left (x \right ) y&=\int \xi \left (x \right ) r \left (x \right )d x\\ y^{\prime }+y \left (p \left (x \right )-\frac {\xi ^{\prime }\left (x \right )}{\xi \left (x \right )}\right )&=\frac {\int \xi \left (x \right ) r \left (x \right )d x}{\xi \left (x \right )}\\ y^{\prime }-\frac {y \left (-c_3 \left (-1\right )^{{1}/{3}} \operatorname {AiryAi}\left (1, \left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )-c_4 \left (-1\right )^{{1}/{3}} \operatorname {AiryBi}\left (1, \left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )\right )}{c_3 \operatorname {AiryAi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )+c_4 \operatorname {AiryBi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )}&=0 \end{align*}

Which is now a first order ode. This is now solved for \(y\). In canonical form a linear first order is

\begin{align*} y^{\prime } + q(x)y &= p(x) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(x) &=\frac {\left (-1\right )^{{1}/{3}} \left (\operatorname {AiryAi}\left (1, \left (1-x \right ) \left (-1\right )^{{1}/{3}}\right ) c_3 +\operatorname {AiryBi}\left (1, \left (1-x \right ) \left (-1\right )^{{1}/{3}}\right ) c_4 \right )}{c_3 \operatorname {AiryAi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )+c_4 \operatorname {AiryBi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )}\\ p(x) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int \frac {\left (-1\right )^{{1}/{3}} \left (\operatorname {AiryAi}\left (1, \left (1-x \right ) \left (-1\right )^{{1}/{3}}\right ) c_3 +\operatorname {AiryBi}\left (1, \left (1-x \right ) \left (-1\right )^{{1}/{3}}\right ) c_4 \right )}{c_3 \operatorname {AiryAi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )+c_4 \operatorname {AiryBi}\left (\left (1-x \right ) \left (-1\right )^{{1}/{3}}\right )}d x}\\ &= \frac {1}{c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )} \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \mu y &= 0 \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\frac {y}{c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )}\right ) &= 0 \end{align*}

Integrating gives

\begin{align*} \frac {y}{c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )}&= \int {0 \,dx} + c_5 \\ &=c_5 \end{align*}

Dividing throughout by the integrating factor \(\frac {1}{c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )}\) gives the final solution

\[ y = \left (c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )\right ) c_5 \]

Hence, the solution found using Lagrange adjoint equation method is

\begin{align*} y &= \left (c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )\right ) c_5 \\ \end{align*}

Will add steps showing solving for IC soon.

4.65.2 Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {x \left (\frac {d}{d x}y^{\prime }\right )}{1-x}+x y=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d}{d x}y^{\prime } \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=y \left (-1+x \right ) \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }+y \left (1-x \right )=0 \\ \bullet & {} & \textrm {Assume series solution for}\hspace {3pt} y \\ {} & {} & y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} x^{k} \\ \square & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & \circ & \textrm {Convert}\hspace {3pt} x^{m}\cdot y\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =0..1 \\ {} & {} & x^{m}\cdot y=\moverset {\infty }{\munderset {k =\max \left (0, -m \right )}{\sum }}a_{k} x^{k +m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k -m \\ {} & {} & x^{m}\cdot y=\moverset {\infty }{\munderset {k =\max \left (0, -m \right )+m}{\sum }}a_{k -m} x^{k} \\ {} & \circ & \textrm {Convert}\hspace {3pt} \frac {d}{d x}y^{\prime }\hspace {3pt}\textrm {to series expansion}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=\moverset {\infty }{\munderset {k =2}{\sum }}a_{k} k \left (k -1\right ) x^{k -2} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +2 \\ {} & {} & \frac {d}{d x}y^{\prime }=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k +2} \left (k +2\right ) \left (k +1\right ) x^{k} \\ & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & {} & 2 a_{2}+a_{0}+\left (\moverset {\infty }{\munderset {k =1}{\sum }}\left (a_{k +2} \left (k +2\right ) \left (k +1\right )+a_{k}-a_{k -1}\right ) x^{k}\right )=0 \\ \bullet & {} & \textrm {Each term must be 0}\hspace {3pt} \\ {} & {} & 2 a_{2}+a_{0}=0 \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & \left (k^{2}+3 k +2\right ) a_{k +2}+a_{k}-a_{k -1}=0 \\ \bullet & {} & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1 \\ {} & {} & \left (\left (k +1\right )^{2}+3 k +5\right ) a_{k +3}+a_{k +1}-a_{k}=0 \\ \bullet & {} & \textrm {Recursion relation that defines the series solution to the ODE}\hspace {3pt} \\ {} & {} & \left [y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} x^{k}, a_{k +3}=\frac {-a_{k +1}+a_{k}}{k^{2}+5 k +6}, 2 a_{2}+a_{0}=0\right ] \end {array} \]

4.65.3 Maple trace
Methods for second order ODEs:
 
4.65.4 Maple dsolve solution

Solving time : 0.003 (sec)
Leaf size : 17

dsolve(x/(1-x)*diff(diff(y(x),x),x)+x*y(x) = 0, 
       y(x),singsol=all)
 
\[ y = c_1 \operatorname {AiryAi}\left (-1+x \right )+c_2 \operatorname {AiryBi}\left (-1+x \right ) \]
4.65.5 Mathematica DSolve solution

Solving time : 0.015 (sec)
Leaf size : 20

DSolve[{x/(1-x)*D[y[x],{x,2}]+x*y[x]==0,{}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 \operatorname {AiryAi}(x-1)+c_2 \operatorname {AiryBi}(x-1) \]