78.16.16 problem 16

Internal problem ID [18324]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 23. Operator Methods for Finding Particular Solutions. Problems at page 169
Problem number : 16
Date solved : Monday, March 31, 2025 at 05:25:36 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+3 y&=x^{3} {\mathrm e}^{2 x} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+3*y(x) = x^3*exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -{\mathrm e}^{x} \left (-c_2 \,{\mathrm e}^{2 x}+\left (x^{3}+6 x \right ) {\mathrm e}^{x}-c_1 \right ) \]
Mathematica. Time used: 0.019 (sec). Leaf size: 31
ode=D[y[x],{x,2}]-4*D[y[x],x]+3*y[x]==x^3*Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (-e^x x \left (x^2+6\right )+c_2 e^{2 x}+c_1\right ) \]
Sympy. Time used: 0.283 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3*exp(2*x) + 3*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 )} = \left (C_{1} + C_{2} e^{2 x} + x \left (- x^{2} - 6\right ) e^{x}\right ) e^{x} \]