86.10.14 problem 14

Internal problem ID [23194]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 9. The operational method. Exercise 9b at page 134
Problem number : 14
Date solved : Thursday, October 02, 2025 at 09:24:13 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }+y&=2 x^{3}+7 x^{2}-x \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 43
ode:=diff(diff(y(x),x),x)+diff(y(x),x)+y(x) = 2*x^3+7*x^2-x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {x}{2}} \sin \left (\frac {\sqrt {3}\, x}{2}\right ) c_2 +{\mathrm e}^{-\frac {x}{2}} \cos \left (\frac {\sqrt {3}\, x}{2}\right ) c_1 +2 x^{3}+x^{2}-15 x +13 \]
Mathematica. Time used: 0.014 (sec). Leaf size: 60
ode=D[y[x],{x,2}]+D[y[x],x]+y[x]==2*x^3+7*x^2-x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 x^3+x^2-15 x+c_2 e^{-x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_1 e^{-x/2} \sin \left (\frac {\sqrt {3} x}{2}\right )+13 \end{align*}
Sympy. Time used: 0.120 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**3 - 7*x**2 + x + y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 x^{3} + x^{2} - 15 x + \left (C_{1} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} + 13 \]