58.11.15 problem 15

Internal problem ID [14746]
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 : 15
Date solved : Thursday, October 02, 2025 at 09:50:44 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-3 y^{\prime \prime }+4 y&=4 \,{\mathrm e}^{x}-18 \,{\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 33
ode:=diff(diff(diff(y(x),x),x),x)-3*diff(diff(y(x),x),x)+4*y(x) = 4*exp(x)-18*exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} \left (c_3 x +c_2 \right )+2 \,{\mathrm e}^{x}+\frac {{\mathrm e}^{-x} \left (3 c_1 -6 x -4\right )}{3} \]
Mathematica. Time used: 0.123 (sec). Leaf size: 44
ode=D[y[x],{x,3}]-3*D[y[x],{x,2}]+4*y[x]==4*Exp[x]-18*Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} e^{-x} \left (-6 x+6 e^{2 x}+3 e^{3 x} (c_3 x+c_2)-4+3 c_1\right ) \end{align*}
Sympy. Time used: 0.068 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - 4*exp(x) - 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) + 18*exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - 2 x\right ) e^{- x} + \left (C_{2} + C_{3} x\right ) e^{2 x} + 2 e^{x} \]