2.4.65 problem 62

Solved as second order ode adjoint method
Maple step by step solution
Maple trace
Maple dsolve solution
Mathematica DSolve solution

Internal problem ID [8630]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 62
Date solved : Thursday, December 12, 2024 at 09:32:38 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solve

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

Solved as second order ode adjoint method

Time used: 0.773 (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 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 )} \end{align*}

Or

\begin{align*} 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+i \sqrt {3}\right ) \left (\operatorname {AiryAi}\left (1, -\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right ) c_3 +\operatorname {AiryBi}\left (1, -\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right ) c_4 \right )}{2 c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+2 c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )}\\ p(x) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int \frac {\left (1+i \sqrt {3}\right ) \left (\operatorname {AiryAi}\left (1, -\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right ) c_3 +\operatorname {AiryBi}\left (1, -\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right ) c_4 \right )}{2 c_3 \operatorname {AiryAi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\right )+2 c_4 \operatorname {AiryBi}\left (-\frac {\left (-1+x \right ) \left (1+i \sqrt {3}\right )}{2}\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*}

The constants can be merged to give

\[ 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 ) \]

Will add steps showing solving for IC soon.

Summary of solutions found

\begin{align*} 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 ) \\ \end{align*}

Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {x \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )}{1-x}+x y \left (x \right )=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )=\left (x -1\right ) y \left (x \right ) \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (x \right )\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^{2}}{d x^{2}}y \left (x \right )+\left (1-x \right ) y \left (x \right )=0 \\ \bullet & {} & \textrm {Assume series solution for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\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 \left (x \right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =0..1 \\ {} & {} & x^{m}\cdot y \left (x \right )=\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 \left (x \right )=\moverset {\infty }{\munderset {k =\max \left (0, -m \right )+m}{\sum }}a_{k -m} x^{k} \\ {} & \circ & \textrm {Convert}\hspace {3pt} \frac {d^{2}}{d x^{2}}y \left (x \right )\hspace {3pt}\textrm {to series expansion}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )=\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^{2}}{d x^{2}}y \left (x \right )=\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 \left (x \right )=\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} \]

Maple trace
`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
checking if the LODE is of Euler type 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Trying a Liouvillian solution using Kovacics algorithm 
<- No Liouvillian solutions exists 
-> Trying a solution in terms of special functions: 
   -> Bessel 
   <- Bessel successful 
<- special function solution successful`
 
Maple dsolve solution

Solving time : 0.017 (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 (x -1\right )+c_{2} \operatorname {AiryBi}\left (x -1\right ) \]
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) \]