85.36.1 problem 1 (a)

Internal problem ID [22729]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 171
Problem number : 1 (a)
Date solved : Thursday, October 02, 2025 at 09:14:07 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y^{\prime }+2 y&=x^{3} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 32
ode:=diff(diff(y(x),x),x)+3*diff(y(x),x)+2*y(x) = x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {45}{8}+\frac {21 x}{4}-\frac {9 x^{2}}{4}+\frac {x^{3}}{2}-{\mathrm e}^{-2 x} c_1 +{\mathrm e}^{-x} c_2 \]
Mathematica. Time used: 0.037 (sec). Leaf size: 41
ode=D[y[x],{x,2}]+3*D[y[x],{x,1}]+2*y[x]==x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{8} \left (4 x^3-18 x^2+42 x-45\right )+c_1 e^{-2 x}+c_2 e^{-x} \end{align*}
Sympy. Time used: 0.150 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + 2*y(x) + 3*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^{- 2 x} + C_{2} e^{- x} + \frac {x^{3}}{2} - \frac {9 x^{2}}{4} + \frac {21 x}{4} - \frac {45}{8} \]