2.2.23 problem 22

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

Internal problem ID [8253]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 22
Date solved : Sunday, November 10, 2024 at 03:30:00 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

Solve

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

Solved as second order Airy ode

Time used: 0.067 (sec)

This is Airy ODE. It has the general form

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

Where in this case

\begin{align*} a &= 1\\ b &= -2\\ c &= -1\\ F &= x^{3}-2 \end{align*}

Therefore the solution to the homogeneous Airy ODE becomes

\[ y = c_1 \,{\mathrm e}^{x} \operatorname {AiryAi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )+c_2 \,{\mathrm e}^{x} \operatorname {AiryBi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right ) \]

Since this is inhomogeneous Airy ODE, then we need to find the particular solution. The particular solution is now found using the method of undetermined coefficients. Looking at the RHS of the ode, which is

\[ x^{3}+1 \]

Shows that the corresponding undetermined set of the basis functions (UC_set) for the trial solution is

\[ [\{1, x, x^{2}, x^{3}\}] \]

While the set of the basis functions for the homogeneous solution found earlier is

\[ \left \{{\mathrm e}^{x} \operatorname {AiryAi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right ), {\mathrm e}^{x} \operatorname {AiryBi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )\right \} \]

Since there is no duplication between the basis function in the UC_set and the basis functions of the homogeneous solution, the trial solution is a linear combination of all the basis in the UC_set.

\[ y_p = A_{4} x^{3}+A_{3} x^{2}+A_{2} x +A_{1} \]

The unknowns \(\{A_{1}, A_{2}, A_{3}, A_{4}\}\) are found by substituting the above trial solution \(y_p\) into the ODE and comparing coefficients. Substituting the trial solution into the ODE and simplifying gives

\[ 6 x A_{4}+2 A_{3}-6 x^{2} A_{4}-4 x A_{3}-2 A_{2}-x \left (A_{4} x^{3}+A_{3} x^{2}+A_{2} x +A_{1}\right )-x^{3}+2 = 0 \]

Solving for the unknowns by comparing coefficients results in

\[ [A_{1} = 4, A_{2} = 0, A_{3} = -1, A_{4} = 0] \]

Substituting the above back in the above trial solution \(y_p\), gives the particular solution

\[ y_p = -x^{2}+4 \]

Therefore the general solution is

\begin{align*} y &= y_h + y_p \\ &= \left (c_1 \,{\mathrm e}^{x} \operatorname {AiryAi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )+c_2 \,{\mathrm e}^{x} \operatorname {AiryBi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )\right ) + \left (-x^{2}+4\right ) \\ &= c_1 \,{\mathrm e}^{x} \operatorname {AiryAi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )+c_2 \,{\mathrm e}^{x} \operatorname {AiryBi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )-x^{2}+4 \\ \end{align*}

Will add steps showing solving for IC soon.

Summary of solutions found

\begin{align*} y &= c_1 \,{\mathrm e}^{x} \operatorname {AiryAi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )+c_2 \,{\mathrm e}^{x} \operatorname {AiryBi}\left (\left (-x -1\right ) \left (-1\right )^{{1}/{3}}\right )-x^{2}+4 \\ \end{align*}

Maple step by step solution

Maple trace
`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 2; linear nonhomogeneous with symmetry [0,1] 
trying a double symmetry of the form [xi=0, eta=F(x)] 
-> Try solving first the homogeneous part of the ODE 
   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 
<- solving first the homogeneous part of the ODE successful`
 
Maple dsolve solution

Solving time : 0.021 (sec)
Leaf size : 27

dsolve(diff(diff(y(x),x),x)-2*diff(y(x),x)-x*y(x)-x^3+2 = 0, 
       y(x),singsol=all)
 
\[ y = {\mathrm e}^{x} \operatorname {AiryAi}\left (x +1\right ) c_{2} +{\mathrm e}^{x} \operatorname {AiryBi}\left (x +1\right ) c_{1} -x^{2}+4 \]
Mathematica DSolve solution

Solving time : 2.465 (sec)
Leaf size : 87

DSolve[{D[y[x],{x,2}]-2*D[y[x],x]-x*y[x]-x^3+2==0,{}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (\operatorname {AiryAi}(x+1) \int _1^x-e^{-K[1]} \pi \operatorname {AiryBi}(K[1]+1) \left (K[1]^3-2\right )dK[1]+\operatorname {AiryBi}(x+1) \int _1^xe^{-K[2]} \pi \operatorname {AiryAi}(K[2]+1) \left (K[2]^3-2\right )dK[2]+c_1 \operatorname {AiryAi}(x+1)+c_2 \operatorname {AiryBi}(x+1)\right ) \]