58.11.17 problem 17

Internal problem ID [14748]
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 : 17
Date solved : Thursday, October 02, 2025 at 09:50:44 AM
CAS classification : [[_3rd_order, _missing_y]]

\begin{align*} y^{\prime \prime \prime }+y^{\prime }&=2 x^{2}+4 \sin \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 30
ode:=diff(diff(diff(y(x),x),x),x)+diff(y(x),x) = 2*x^2+4*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-2-c_2 \right ) \cos \left (x \right )+\left (c_1 -2 x \right ) \sin \left (x \right )+\frac {2 x^{3}}{3}-4 x +c_3 \]
Mathematica. Time used: 0.126 (sec). Leaf size: 35
ode=D[y[x],{x,3}]+D[y[x],x]==2*x^2+4*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {2 x^3}{3}-4 x-(2+c_2) \cos (x)+(-2 x+c_1) \sin (x)+c_3 \end{align*}
Sympy. Time used: 0.108 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**2 - 4*sin(x) + Derivative(y(x), x) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{3} \cos {\left (x \right )} + \frac {2 x^{3}}{3} - 4 x + \left (C_{2} - 2 x\right ) \sin {\left (x \right )} \]