23.3.66 problem 68

Internal problem ID [5780]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 68
Date solved : Tuesday, September 30, 2025 at 02:02:59 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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