2.13 problem Problem 15.24(a)

Internal problem ID [2016]

Book: Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section: Chapter 15, Higher order ordinary differential equations. 15.4 Exercises, page 523
Problem number: Problem 15.24(a).
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

Solve \begin {gather*} \boxed {y^{\prime \prime }-y-x^{n}=0} \end {gather*}

Solution by Maple

Time used: 0.015 (sec). Leaf size: 81

dsolve(diff(y(x),x$2)-y(x)=x^n,y(x), singsol=all)
 

\[ y \relax (x ) = {\mathrm e}^{-x} c_{2}+{\mathrm e}^{x} c_{1}+\frac {{\mathrm e}^{-x} \left (-\left (n +1\right ) x^{n} \left (\left (n \Gamma \left (n , -x \right )-\Gamma \left (n +1\right )\right ) \left (-x \right )^{-n}+{\mathrm e}^{x}\right )+{\mathrm e}^{\frac {3 x}{2}} x^{\frac {n}{2}} \WhittakerM \left (\frac {n}{2}, \frac {n}{2}+\frac {1}{2}, x\right )\right )}{2 n +2} \]

Solution by Mathematica

Time used: 0.025 (sec). Leaf size: 50

DSolve[y''[x]-y[x]==x^n,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {1}{2} e^{-x} \left (e^{2 x} (-\text {Gamma}(n+1,x)+2 c_1)+x^{n+1} E_{-n}(-x)+2 c_2\right ) \\ \end{align*}