81.11.9 problem 15-8

Internal problem ID [21633]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 15. Method of undetermined coefficients. Page 337.
Problem number : 15-8
Date solved : Thursday, October 02, 2025 at 07:59:16 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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