1.11.24 problem 24

Internal problem ID [345]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 24
Date solved : Tuesday, September 30, 2025 at 03:57:36 AM
CAS classification : [[_3rd_order, _missing_y]]

\begin{align*} y^{\prime \prime \prime }-y^{\prime \prime }-12 y^{\prime }&=x -2 x \,{\mathrm e}^{-3 x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 45
ode:=diff(diff(diff(y(x),x),x),x)-diff(diff(y(x),x),x)-12*diff(y(x),x) = x-2*x*exp(-3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{-3 x} \left (\left (x^{2}-\frac {1}{6} x -24 c_3 \right ) {\mathrm e}^{3 x}+\frac {8 x^{2}}{7}-6 c_1 \,{\mathrm e}^{7 x}+\frac {160 x}{147}+8 c_2 +\frac {1264}{3087}\right )}{24} \]
Mathematica. Time used: 0.192 (sec). Leaf size: 54
ode=D[y[x],{x,3}]-D[y[x],{x,2}]-12*D[y[x],x]==x-2*x*Exp[-3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {x^2}{24}-\frac {e^{-3 x} \left (441 x^2+420 x+158+3087 c_1\right )}{9261}+\frac {x}{144}+\frac {1}{4} c_2 e^{4 x}+c_3 \end{align*}
Sympy. Time used: 0.224 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + 2*x*exp(-3*x) - 12*Derivative(y(x), x) - Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{3} e^{4 x} - \frac {x^{2}}{24} + \frac {x}{144} + \left (C_{2} - \frac {x^{2}}{21} - \frac {20 x}{441}\right ) e^{- 3 x} \]