1.11.41 problem 43 (b)

Internal problem ID [362]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 43 (b)
Date solved : Tuesday, September 30, 2025 at 03:57:48 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }+4 y&=\cos \left (x \right )^{3} \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 43
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+4*y(x) = cos(x)^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,{\mathrm e}^{x} \cos \left (x \right )+c_3 \,{\mathrm e}^{-x} \cos \left (x \right )+c_2 \,{\mathrm e}^{x} \sin \left (x \right )+c_4 \,{\mathrm e}^{-x} \sin \left (x \right )+\frac {\cos \left (x \right )^{3}}{85}+\frac {12 \cos \left (x \right )}{85} \]
Mathematica. Time used: 0.124 (sec). Leaf size: 53
ode=D[y[x],{x,4}]+4*y[x]==Cos[x]^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{340} \cos (3 x)+\left (c_1 e^{-x}+c_4 e^x+\frac {3}{20}\right ) \cos (x)+c_2 e^{-x} \sin (x)+c_3 e^x \sin (x) \end{align*}
Sympy. Time used: 9.774 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - cos(x)**3 + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )}\right ) e^{- x} + \left (C_{3} \sin {\left (x \right )} + C_{4} \cos {\left (x \right )}\right ) e^{x} + \frac {3 \cos {\left (x \right )}}{20} + \frac {\cos {\left (3 x \right )}}{340} \]