15.14.32 problem 34

Internal problem ID [3204]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 23, page 106
Problem number : 34
Date solved : Tuesday, March 04, 2025 at 04:05:51 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }-y&=x^{2} \cos \left (x \right ) \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 45
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-y(x) = x^2*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_4 \,{\mathrm e}^{-x}+\frac {\left (-3 x^{2}+8 c_{1} +2\right ) \cos \left (x \right )}{8}+\frac {\left (-2 x^{3}+24 c_3 +15 x \right ) \sin \left (x \right )}{24}+c_2 \,{\mathrm e}^{x} \]
Mathematica. Time used: 0.101 (sec). Leaf size: 54
ode=D[y[x],{x,4}]-y[x]==x^2*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (-\frac {x^3}{12}+\frac {5 x}{8}+c_4\right ) \sin (x)+\left (-\frac {3 x^2}{8}+\frac {5}{16}+c_2\right ) \cos (x)+c_1 e^x+c_3 e^{-x} \]
Sympy. Time used: 0.241 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*cos(x) - y(x) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{- x} + C_{4} e^{x} + \left (C_{1} - \frac {3 x^{2}}{8}\right ) \cos {\left (x \right )} + \left (C_{2} - \frac {x^{3}}{12} + \frac {5 x}{8}\right ) \sin {\left (x \right )} \]