78.16.13 problem 13

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

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

Maple. Time used: 0.002 (sec). Leaf size: 22
ode:=diff(diff(y(x),x),x)+y(x) = x^4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (x \right ) c_2 +\cos \left (x \right ) c_1 +x^{4}-12 x^{2}+24 \]
Mathematica. Time used: 0.012 (sec). Leaf size: 25
ode=D[y[x],{x,2}]+y[x]==x^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^4-12 x^2+c_1 \cos (x)+c_2 \sin (x)+24 \]
Sympy. Time used: 0.073 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**4 + y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )} + x^{4} - 12 x^{2} + 24 \]