58.11.53 problem 53

Internal problem ID [14784]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 53
Date solved : Thursday, October 02, 2025 at 09:54:50 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} -4 y+3 y^{\prime \prime }+y^{\prime \prime \prime \prime }&=\cos \left (x \right )^{2}-\cosh \left (x \right ) \end{align*}
Maple. Time used: 0.014 (sec). Leaf size: 49
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+3*diff(diff(y(x),x),x)-4*y(x) = cos(x)^2-cosh(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {1}{8}+\frac {\left (200 c_2 -9\right ) \cos \left (2 x \right )}{200}+\frac {\left (-x +40 c_4 \right ) \sin \left (2 x \right )}{40}-\frac {\sinh \left (x \right ) x}{10}+c_3 \,{\mathrm e}^{-x}+c_1 \,{\mathrm e}^{x}+\frac {9 \cosh \left (x \right )}{100} \]
Mathematica. Time used: 0.106 (sec). Leaf size: 75
ode=D[y[x],{x,4}]+3*D[y[x],{x,2}]-4*y[x]==Cos[x]^2-Cosh[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{400} e^{-x} \left ((-13+400 c_1) e^x \cos (2 x)+2 \left (10 x-25 e^x+e^{2 x} (-10 x+9+200 c_4)-5 e^x (x-40 c_2) \sin (2 x)+9+200 c_3\right )\right ) \end{align*}
Sympy. Time used: 1.987 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*y(x) - cos(x)**2 + cosh(x) + 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- x} + C_{3} e^{x} + C_{4} \cos {\left (2 x \right )} - \frac {x \sinh {\left (x \right )}}{10} + \left (C_{1} - \frac {x}{40}\right ) \sin {\left (2 x \right )} + \frac {\cosh {\left (x \right )}}{25} - \frac {1}{8} \]