9.11.24 problem 24

Internal problem ID [3134]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 24
Date solved : Tuesday, September 30, 2025 at 06:27:24 AM
CAS classification : [[_3rd_order, _missing_y]]

\begin{align*} y^{\prime \prime \prime }+2 y^{\prime \prime }&=\left (2 x^{2}+x \right ) {\mathrm e}^{-2 x}+5 \cos \left (3 x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 45
ode:=diff(diff(diff(y(x),x),x),x)+2*diff(diff(y(x),x),x) = (2*x^2+x)*exp(-2*x)+5*cos(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (8 x^{3}+30 x^{2}+12 c_1 +48 x +33\right ) {\mathrm e}^{-2 x}}{48}+c_2 x +c_3 -\frac {10 \cos \left (3 x \right )}{117}-\frac {5 \sin \left (3 x \right )}{39} \]
Mathematica. Time used: 0.563 (sec). Leaf size: 56
ode=D[y[x],{x,3}]+2*D[y[x],{x,2}]==(2*x^2+x)*Exp[-2*x]+5*Cos[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{48} e^{-2 x} \left (8 x^3+30 x^2+48 x+33+12 c_1\right )-\frac {5}{39} \sin (3 x)-\frac {10}{117} \cos (3 x)+c_3 x+c_2 \end{align*}
Sympy. Time used: 0.163 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*x**2 - x)*exp(-2*x) - 5*cos(3*x) + 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + x \left (C_{2} + e^{- 2 x}\right ) + \left (C_{3} + \frac {x^{3}}{6} + \frac {5 x^{2}}{8}\right ) e^{- 2 x} - \frac {5 \sin {\left (3 x \right )}}{39} - \frac {10 \cos {\left (3 x \right )}}{117} \]