85.56.6 problem 1 (f)

Internal problem ID [22831]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 199
Problem number : 1 (f)
Date solved : Thursday, October 02, 2025 at 09:15:30 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+3 y&=3 \,{\mathrm e}^{x}+2 \,{\mathrm e}^{-x}+x^{3} {\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 42
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+3*y(x) = 3*exp(x)+2*exp(-x)+x^3*exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{-x} \left (32 x^{3}+72 x^{2}+84 x +109\right )}{256}+{\mathrm e}^{3 x} c_1 -\frac {3 \,{\mathrm e}^{x} \left (x -\frac {2 c_2}{3}+\frac {1}{2}\right )}{2} \]
Mathematica. Time used: 0.212 (sec). Leaf size: 54
ode=D[y[x],{x,2}]-4*D[y[x],{x,1}]+3*y[x]==3*Exp[x]+2*Exp[-x]+x^3*Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{256} e^{-x} \left (32 x^3+72 x^2+84 x-64 e^{2 x} (6 x+3-4 c_1)+256 c_2 e^{4 x}+109\right ) \end{align*}
Sympy. Time used: 0.254 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3*exp(-x) + 3*y(x) - 3*exp(x) - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 2*exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{3 x} + \left (C_{1} - \frac {3 x}{2}\right ) e^{x} + \frac {\left (32 x^{3} + 72 x^{2} + 84 x + 109\right ) e^{- x}}{256} \]