2.14 problem Problem 15.24(b)

Internal problem ID [2526]

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(b).
ODE order: 2.
ODE degree: 1.

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

\[ \boxed {y^{\prime \prime }-2 y^{\prime }+y=2 x \,{\mathrm e}^{x}} \]

Solution by Maple

Time used: 0.016 (sec). Leaf size: 17

dsolve(diff(y(x),x$2)-2*diff(y(x),x)+y(x)=2*x*exp(x),y(x), singsol=all)
 

\[ y \left (x \right ) = {\mathrm e}^{x} \left (c_{2} +c_{1} x +\frac {1}{3} x^{3}\right ) \]

Solution by Mathematica

Time used: 0.023 (sec). Leaf size: 25

DSolve[y''[x]-2*y'[x]+y[x]==2*x*Exp[x],y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {1}{3} e^x \left (x^3+3 c_2 x+3 c_1\right ) \]