89.18.26 problem 26

Internal problem ID [24726]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 9. Nonhomogeneous Equations: Undetermined coefficients. Oral Exercises at page 146
Problem number : 26
Date solved : Thursday, October 02, 2025 at 10:47:28 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }+4 y&=\cos \left (x \right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 37
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+4*y(x) = cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\cos \left (x \right )}{5}+c_1 \,{\mathrm e}^{x} \cos \left (x \right )+c_2 \,{\mathrm e}^{x} \sin \left (x \right )+c_3 \,{\mathrm e}^{-x} \cos \left (x \right )+c_4 \,{\mathrm e}^{-x} \sin \left (x \right ) \]
Mathematica. Time used: 0.064 (sec). Leaf size: 46
ode=D[y[x],{x,4}]+4*y[x]==Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (c_1 e^{-x}+c_4 e^x+\frac {1}{5}\right ) \cos (x)+e^{-x} \left (c_3 e^{2 x}+c_2\right ) \sin (x) \end{align*}
Sympy. Time used: 0.083 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - cos(x) + 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 {\cos {\left (x \right )}}{5} \]