83.16.4 problem 4

Internal problem ID [19114]
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, March 13, 2025 at 01:43:29 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.005 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)-y(x) = cosh(x)*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {\left (10 c_{2} -\cos \left (x \right )-2 \sin \left (x \right )\right ) {\mathrm e}^{-x}}{10}+\left (c_{1} -\frac {\cos \left (x \right )}{10}+\frac {\sin \left (x \right )}{5}\right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.074 (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]
 
\[ 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 ) \]
Sympy. Time used: 0.117 (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} \]