78.16.12 problem 12

Internal problem ID [18320]
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 : 12
Date solved : Monday, March 31, 2025 at 05:25:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.002 (sec). Leaf size: 44
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-y(x) = -x^4+3*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\frac {\left (\sqrt {5}-1\right ) x}{2}} c_2 +{\mathrm e}^{-\frac {\left (\sqrt {5}+1\right ) x}{2}} c_1 +x^{4}+4 x^{3}+24 x^{2}+69 x +117 \]
Mathematica. Time used: 0.023 (sec). Leaf size: 57
ode=D[y[x],{x,2}]+D[y[x],x]-y[x]==3*x-x^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^4+4 x^3+24 x^2+69 x+c_1 e^{-\frac {1}{2} \left (1+\sqrt {5}\right ) x}+c_2 e^{\frac {1}{2} \left (\sqrt {5}-1\right ) x}+117 \]
Sympy. Time used: 0.188 (sec). Leaf size: 48
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**4 - 3*x - y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{\frac {x \left (-1 + \sqrt {5}\right )}{2}} + C_{2} e^{- \frac {x \left (1 + \sqrt {5}\right )}{2}} + x^{4} + 4 x^{3} + 24 x^{2} + 69 x + 117 \]