58.11.11 problem 11

Internal problem ID [14742]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 11
Date solved : Thursday, October 02, 2025 at 09:50:41 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }+y^{\prime \prime }+3 y^{\prime }-5 y&=5 \sin \left (2 x \right )+10 x^{2}+3 x +7 \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 49
ode:=diff(diff(diff(y(x),x),x),x)+diff(diff(y(x),x),x)+3*diff(y(x),x)-5*y(x) = 5*sin(2*x)+10*x^2+3*x+7; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (17 c_3 \,{\mathrm e}^{-x}-9\right ) \sin \left (2 x \right )}{17}+c_2 \,{\mathrm e}^{-x} \cos \left (2 x \right )-2 x^{2}+c_1 \,{\mathrm e}^{x}-3 x +\frac {2 \cos \left (2 x \right )}{17}-4 \]
Mathematica. Time used: 0.187 (sec). Leaf size: 55
ode=D[y[x],{x,3}]+D[y[x],{x,2}]+3*D[y[x],x]-5*y[x]==5*Sin[2*x]+10*x^2+3*x+7; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -2 x^2-3 x+c_3 e^x+\left (\frac {2}{17}+c_2 e^{-x}\right ) \cos (2 x)+\left (-\frac {9}{17}+c_1 e^{-x}\right ) \sin (2 x)-4 \end{align*}
Sympy. Time used: 0.237 (sec). Leaf size: 51
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-10*x**2 - 3*x - 5*y(x) - 5*sin(2*x) + 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 7,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{x} - 2 x^{2} - 3 x + \left (C_{1} \sin {\left (2 x \right )} + C_{2} \cos {\left (2 x \right )}\right ) e^{- x} - \frac {9 \sin {\left (2 x \right )}}{17} + \frac {2 \cos {\left (2 x \right )}}{17} - 4 \]