58.11.9 problem 9

Internal problem ID [14740]
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 : 9
Date solved : Thursday, October 02, 2025 at 09:50:41 AM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

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