81.11.11 problem 15-10

Internal problem ID [21635]
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-10
Date solved : Thursday, October 02, 2025 at 07:59:17 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }-6 y&=2 x^{3}+5 x^{2}-7 x +2 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 31
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-6*y(x) = 2*x^3+5*x^2-7*x+2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} c_2 +{\mathrm e}^{-3 x} c_1 -\frac {x^{3}}{3}-x^{2}+\frac {x}{2}-\frac {7}{12} \]
Mathematica. Time used: 0.011 (sec). Leaf size: 42
ode=D[y[x],{x,2}]+D[y[x],x]-6*y[x]==2*x^3+5*x^2-7*x+2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {x^3}{3}-x^2+\frac {x}{2}+c_1 e^{-3 x}+c_2 e^{2 x}-\frac {7}{12} \end{align*}
Sympy. Time used: 0.107 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**3 - 5*x**2 + 7*x - 6*y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 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^{3}}{3} - x^{2} + \frac {x}{2} - \frac {7}{12} \]