60.2.6 problem Problem 6

Internal problem ID [15186]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 2, DIFFERENTIAL EQUATIONS OF THE SECOND ORDER AND HIGHER. Problems page 172
Problem number : Problem 6
Date solved : Thursday, October 02, 2025 at 10:06:59 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=\cosh \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 17
ode:=diff(diff(y(x),x),x)+y(x) = cosh(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (x \right ) c_2 +\cos \left (x \right ) c_1 +\frac {\cosh \left (x \right )}{2} \]
Mathematica. Time used: 0.022 (sec). Leaf size: 22
ode=D[y[x],{x,2}]+y[x]==Cosh[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\cosh (x)}{2}+c_1 \cos (x)+c_2 \sin (x) \end{align*}
Sympy. Time used: 0.037 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - cosh(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )} + \frac {\cosh {\left (x \right )}}{2} \]