58.11.8 problem 8

Internal problem ID [14739]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 8
Date solved : Thursday, October 02, 2025 at 09:50:40 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+10 y&=5 x \,{\mathrm e}^{-2 x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 37
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+10*y(x) = 5*x*exp(-2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (10 \cos \left (3 x \right ) c_1 +10 \sin \left (3 x \right ) c_2 \right ) {\mathrm e}^{-x}}{10}+\frac {\left (5 x +1\right ) {\mathrm e}^{-2 x}}{10} \]
Mathematica. Time used: 0.015 (sec). Leaf size: 41
ode=D[y[x],{x,2}]+2*D[y[x],x]+10*y[x]==5*x*Exp[-2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{10} e^{-2 x} \left (5 x+10 c_2 e^x \cos (3 x)+10 c_1 e^x \sin (3 x)+1\right ) \end{align*}
Sympy. Time used: 0.183 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-5*x*exp(-2*x) + 10*y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (3 x \right )} + C_{2} \cos {\left (3 x \right )} + \frac {\left (5 x + 1\right ) e^{- x}}{10}\right ) e^{- x} \]