2.13 problem Problem 15.24(a)

Internal problem ID [2525]

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]]

\[ \boxed {y^{\prime \prime }-y=x^{n}} \]

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 0.055 (sec). Leaf size: 58

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

\[ y(x)\to -\frac {1}{2} e^{-x} x^n (-x)^{-n} \Gamma (n+1,-x)-\frac {1}{2} e^x \Gamma (n+1,x)+c_1 e^x+c_2 e^{-x} \]