2.15 problem 15
Internal
problem
ID
[7799]
Book
:
Own
collection
of
miscellaneous
problems
Section
:
section
2.0
Problem
number
:
15
Date
solved
:
Monday, October 21, 2024 at 04:21:24 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
Solve
\begin{align*} y^{\prime \prime }-y^{\prime }-x y-x^{2}&=0 \end{align*}
2.15.1 Solved as second order Airy ode
Time used: 0.974 (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 &= -1\\ c &= -1\\ F &= x^{2} \end{align*}
Therefore the solution to the homogeneous Airy ODE becomes
\[
y = c_1 \,{\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )+c_2 \,{\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )
\]
Since this is inhomogeneous
Airy ODE, then we need to find the particular solution. The particular solution \(y_p\) can be
found using either the method of undetermined coefficients, or the method of variation
of parameters. The method of variation of parameters will be used as it is more
general and can be used when the coefficients of the ODE depend on \(x\) as well.
Let
\begin{equation}
\tag{1} y_p(x) = u_1 y_1 + u_2 y_2
\end{equation}
Where \(u_1,u_2\) to be determined, and \(y_1,y_2\) are the two basis solutions (the two linearly
independent solutions of the homogeneous ODE) found earlier when solving the
homogeneous ODE as
\begin{align*}
y_1 &= {\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) \\
y_2 &= {\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) \\
\end{align*}
In the Variation of parameters \(u_1,u_2\) are found using
\begin{align*}
\tag{2} u_1 &= -\int \frac {y_2 f(x)}{a W(x)} \\
\tag{3} u_2 &= \int \frac {y_1 f(x)}{a W(x)} \\
\end{align*}
Where \(W(x)\) is the
Wronskian and \(a\) is the coefficient in front of \(y''\) in the given ODE. The Wronskian is given
by \(W= \begin {vmatrix} y_1 & y_{2} \\ y_{1}^{\prime } & y_{2}^{\prime } \end {vmatrix} \). Hence
\[ W = \begin {vmatrix} {\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) & {\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) \\ \frac {d}{dx}\left ({\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )\right ) & \frac {d}{dx}\left ({\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )\right ) \end {vmatrix} \]
Which gives
\[ W = \begin {vmatrix} {\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) & {\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) \\ \frac {{\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )}{2}-{\mathrm e}^{\frac {x}{2}} \left (-1\right )^{{1}/{3}} \operatorname {AiryAi}\left (1, \left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) & \frac {{\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )}{2}-{\mathrm e}^{\frac {x}{2}} \left (-1\right )^{{1}/{3}} \operatorname {AiryBi}\left (1, \left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) \end {vmatrix} \]
Therefore
\[
W = \left ({\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )\right )\left (\frac {{\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )}{2}-{\mathrm e}^{\frac {x}{2}} \left (-1\right )^{{1}/{3}} \operatorname {AiryBi}\left (1, \left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )\right ) - \left ({\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )\right )\left (\frac {{\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )}{2}-{\mathrm e}^{\frac {x}{2}} \left (-1\right )^{{1}/{3}} \operatorname {AiryAi}\left (1, \left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )\right )
\]
Which simplifies to
\[
W = -{\mathrm e}^{x} \operatorname {AiryAi}\left (-\frac {\left (4 x +1\right ) \left (-1\right )^{{1}/{3}}}{4}\right ) \left (-1\right )^{{1}/{3}} \operatorname {AiryBi}\left (1, -\frac {\left (4 x +1\right ) \left (-1\right )^{{1}/{3}}}{4}\right )+{\mathrm e}^{x} \operatorname {AiryBi}\left (-\frac {\left (4 x +1\right ) \left (-1\right )^{{1}/{3}}}{4}\right ) \left (-1\right )^{{1}/{3}} \operatorname {AiryAi}\left (1, -\frac {\left (4 x +1\right ) \left (-1\right )^{{1}/{3}}}{4}\right )
\]
Which simplifies to
\[
W = -\frac {{\mathrm e}^{x} \left (1+i \sqrt {3}\right )}{2 \pi }
\]
Therefore Eq. (2) becomes
\[
u_1 = -\int \frac {{\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) x^{2}}{-\frac {{\mathrm e}^{x} \left (1+i \sqrt {3}\right )}{2 \pi }}\,dx
\]
Which simplifies to
\[
u_1 = - \int -\frac {2 \pi \,x^{2} {\mathrm e}^{-\frac {x}{2}} \operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right )}{1+i \sqrt {3}}d x
\]
Hence
\[
u_1 = -\left (\int _{0}^{x}-\frac {2 \pi \,\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )}{1+i \sqrt {3}}d \alpha \right )
\]
And Eq. (3) becomes
\[
u_2 = \int \frac {{\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) x^{2}}{-\frac {{\mathrm e}^{x} \left (1+i \sqrt {3}\right )}{2 \pi }}\,dx
\]
Which
simplifies to
\[
u_2 = \int -\frac {2 \pi \,x^{2} {\mathrm e}^{-\frac {x}{2}} \operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right )}{1+i \sqrt {3}}d x
\]
Hence
\[
u_2 = \int _{0}^{x}-\frac {2 \pi \,\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )}{1+i \sqrt {3}}d \alpha
\]
Therefore the particular solution, from equation (1) is
\[
y_p(x) = -\left (\int _{0}^{x}-\frac {2 \pi \,\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )}{1+i \sqrt {3}}d \alpha \right ) {\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )+{\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right ) \left (\int _{0}^{x}-\frac {2 \pi \,\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )}{1+i \sqrt {3}}d \alpha \right )
\]
Which
simplifies to
\[
y_p(x) = \frac {2 \,{\mathrm e}^{\frac {x}{2}} \pi \left (\operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right ) \left (\int _{0}^{x}\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )d \alpha \right )-\operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right ) \left (\int _{0}^{x}\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )d \alpha \right )\right )}{1+i \sqrt {3}}
\]
Therefore the general solution is
\begin{align*}
y &= y_h + y_p \\
&= \left (c_1 \,{\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )+c_2 \,{\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )\right ) + \left (\frac {2 \,{\mathrm e}^{\frac {x}{2}} \pi \left (\operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right ) \left (\int _{0}^{x}\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )d \alpha \right )-\operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right ) \left (\int _{0}^{x}\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )d \alpha \right )\right )}{1+i \sqrt {3}}\right ) \\
&= c_1 \,{\mathrm e}^{\frac {x}{2}} \operatorname {AiryAi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )+c_2 \,{\mathrm e}^{\frac {x}{2}} \operatorname {AiryBi}\left (\left (-x -\frac {1}{4}\right ) \left (-1\right )^{{1}/{3}}\right )+\frac {2 \,{\mathrm e}^{\frac {x}{2}} \pi \left (\operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right ) \left (\int _{0}^{x}\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )d \alpha \right )-\operatorname {AiryBi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (x +\frac {1}{4}\right )}{2}\right ) \left (\int _{0}^{x}\alpha ^{2} {\mathrm e}^{-\frac {\alpha }{2}} \operatorname {AiryAi}\left (-\frac {\left (1+i \sqrt {3}\right ) \left (\alpha +\frac {1}{4}\right )}{2}\right )d \alpha \right )\right )}{1+i \sqrt {3}} \\
\end{align*}
Will add steps showing solving for IC
soon.
2.15.2 Maple step by step solution
2.15.3 Maple trace
Methods for second order ODEs:
2.15.4 Maple dsolve solution
Solving time : 0.006
(sec)
Leaf size : 63
dsolve(diff(diff(y(x),x),x)-diff(y(x),x)-x*y(x)-x^2 = 0,
y(x),singsol=all)
\[
y = {\mathrm e}^{\frac {x}{2}} \left (-\operatorname {AiryAi}\left (x +\frac {1}{4}\right ) \pi \left (\int x^{2} \operatorname {AiryBi}\left (x +\frac {1}{4}\right ) {\mathrm e}^{-\frac {x}{2}}d x \right )+\operatorname {AiryBi}\left (x +\frac {1}{4}\right ) \pi \left (\int x^{2} \operatorname {AiryAi}\left (x +\frac {1}{4}\right ) {\mathrm e}^{-\frac {x}{2}}d x \right )+c_2 \operatorname {AiryAi}\left (x +\frac {1}{4}\right )+c_1 \operatorname {AiryBi}\left (x +\frac {1}{4}\right )\right )
\]
2.15.5 Mathematica DSolve solution
Solving time : 9.261
(sec)
Leaf size : 103
DSolve[{D[y[x],{x,2}]-D[y[x],x]-x*y[x]-x^2==0,{}},
y[x],x,IncludeSingularSolutions->True]
\[
y(x)\to e^{x/2} \left (\operatorname {AiryAi}\left (x+\frac {1}{4}\right ) \int _1^x-e^{-\frac {K[1]}{2}} \pi \operatorname {AiryBi}\left (K[1]+\frac {1}{4}\right ) K[1]^2dK[1]+\operatorname {AiryBi}\left (x+\frac {1}{4}\right ) \int _1^xe^{-\frac {K[2]}{2}} \pi \operatorname {AiryAi}\left (K[2]+\frac {1}{4}\right ) K[2]^2dK[2]+c_1 \operatorname {AiryAi}\left (x+\frac {1}{4}\right )+c_2 \operatorname {AiryBi}\left (x+\frac {1}{4}\right )\right )
\]