81.11.10 problem 15-9

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

\begin{align*} 5 y+2 y^{\prime }+y^{\prime \prime }&=x^{3}+3 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 39
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+5*y(x) = x^3+3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} \sin \left (2 x \right ) c_2 +{\mathrm e}^{-x} \cos \left (2 x \right ) c_1 +\frac {x^{3}}{5}-\frac {6 x^{2}}{25}-\frac {6 x}{125}+\frac {447}{625} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 49
ode=D[y[x],{x,2}]+2*D[y[x],x]+5*y[x]==x^3+3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{625} \left (125 x^3-150 x^2-30 x+447\right )+c_2 e^{-x} \cos (2 x)+c_1 e^{-x} \sin (2 x) \end{align*}
Sympy. Time used: 0.132 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + 5*y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{3}}{5} - \frac {6 x^{2}}{25} - \frac {6 x}{125} + \left (C_{1} \sin {\left (2 x \right )} + C_{2} \cos {\left (2 x \right )}\right ) e^{- x} + \frac {447}{625} \]