81.14.6 problem 18-16

Internal problem ID [21691]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 18. Algebra of differential operators. Page 435
Problem number : 18-16
Date solved : Thursday, October 02, 2025 at 08:00:01 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+5 y&=16 x^{3} {\mathrm e}^{3 x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 37
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)+5*y(x) = 16*x^3*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (\sin \left (2 x \right ) c_2 +\cos \left (2 x \right ) c_1 +\frac {x \left (4 x^{2}-6 x +3\right ) {\mathrm e}^{2 x}}{2}\right ) \]
Mathematica. Time used: 0.016 (sec). Leaf size: 46
ode=D[y[x],{x,2}]-2*D[y[x],x]+5*y[x]==16*x^3*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} e^{3 x} x \left (4 x^2-6 x+3\right )+c_2 e^x \cos (2 x)+c_1 e^x \sin (2 x) \end{align*}
Sympy. Time used: 0.192 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-16*x**3*exp(3*x) + 5*y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (2 x \right )} + C_{2} \cos {\left (2 x \right )} + x \left (2 x^{2} - 3 x + \frac {3}{2}\right ) e^{2 x}\right ) e^{x} \]