67.15.53 problem 22.11 (L)

Internal problem ID [16771]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 22. Method of undetermined coefficients. Additional exercises page 412
Problem number : 22.11 (L)
Date solved : Thursday, October 02, 2025 at 01:38:42 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+20 y&=x^{3} \sin \left (4 x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 59
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+20*y(x) = x^3*sin(4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (9826 x^{3}+16473 x^{2}+167042 c_1 \,{\mathrm e}^{2 x}+15810 x +7815\right ) \cos \left (4 x \right )}{167042}+\frac {\sin \left (4 x \right ) \left (x^{3}+\frac {3 x^{2}}{17}+68 c_2 \,{\mathrm e}^{2 x}-\frac {39 x}{578}-\frac {45}{4913}\right )}{68} \]
Mathematica. Time used: 0.046 (sec). Leaf size: 76
ode=D[y[x],{x,2}]-4*D[y[x],x]+20*y[x]==x^3*Sin[4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\left (9826 x^3+1734 x^2-663 x-90\right ) \sin (4 x)+4 \left (9826 x^3+16473 x^2+15810 x+7815\right ) \cos (4 x)}{668168}+c_2 e^{2 x} \cos (4 x)+c_1 e^{2 x} \sin (4 x) \end{align*}
Sympy. Time used: 0.287 (sec). Leaf size: 102
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3*sin(4*x) + 20*y(x) - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{3} \sin {\left (4 x \right )}}{68} + \frac {x^{3} \cos {\left (4 x \right )}}{17} + \frac {3 x^{2} \sin {\left (4 x \right )}}{1156} + \frac {57 x^{2} \cos {\left (4 x \right )}}{578} - \frac {39 x \sin {\left (4 x \right )}}{39304} + \frac {465 x \cos {\left (4 x \right )}}{4913} + \left (C_{1} \sin {\left (4 x \right )} + C_{2} \cos {\left (4 x \right )}\right ) e^{2 x} - \frac {45 \sin {\left (4 x \right )}}{334084} + \frac {7815 \cos {\left (4 x \right )}}{167042} \]