89.16.21 problem 21

Internal problem ID [24671]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 9. Nonhomogeneous Equations: Undetermined coefficients. Exercises at page 140
Problem number : 21
Date solved : Thursday, October 02, 2025 at 10:46:54 PM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

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