77.16.4 problem 4

Internal problem ID [20478]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter III. Ordinary linear differential equations with constant coefficients. Exercise III (H) at page 47
Problem number : 4
Date solved : Thursday, October 02, 2025 at 06:03:15 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&=\cos \left (x \right ) \cosh \left (x \right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)-y(x) = cosh(x)*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} c_2 +{\mathrm e}^{-x} c_1 -\frac {\cosh \left (x \right ) \cos \left (x \right )}{5}+\frac {2 \sin \left (x \right ) \sinh \left (x \right )}{5} \]
Mathematica. Time used: 0.048 (sec). Leaf size: 50
ode=D[y[x],{x,2}]-y[x]==Cosh[x]*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{10} e^{-x} \left (2 \left (e^{2 x}-1\right ) \sin (x)-\left (e^{2 x}+1\right ) \cos (x)+10 \left (c_1 e^{2 x}+c_2\right )\right ) \end{align*}
Sympy. Time used: 0.067 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) - cos(x)*cosh(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + C_{2} e^{x} + \frac {2 \sin {\left (x \right )} \sinh {\left (x \right )}}{5} - \frac {\cos {\left (x \right )} \cosh {\left (x \right )}}{5} \]