18.2.14 problem Problem 15.24(b)

Internal problem ID [3497]
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)
Date solved : Monday, January 27, 2025 at 07:39:46 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+y&=2 x \,{\mathrm e}^{x} \end{align*}

Solution by Maple

Time used: 0.004 (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.020 (sec). Leaf size: 25

DSolve[D[y[x],{x,2}]-2*D[y[x],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 ) \]