71.1.132 problem 159 (page 236)

Internal problem ID [19308]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 159 (page 236)
Date solved : Thursday, October 02, 2025 at 04:18:38 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&=\frac {{\mathrm e}^{x}-{\mathrm e}^{-x}}{{\mathrm e}^{x}+{\mathrm e}^{-x}} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 23
ode:=diff(diff(y(x),x),x)-y(x) = (exp(x)-exp(-x))/(exp(x)+exp(-x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (\arctan \left ({\mathrm e}^{x}\right )+c_1 \right )+{\mathrm e}^{-x} \left (\arctan \left ({\mathrm e}^{x}\right )+c_2 \right ) \]
Mathematica. Time used: 0.384 (sec). Leaf size: 34
ode=D[y[x],{x,2}]-y[x]==(Exp[x]-Exp[-x])/(Exp[x]+Exp[-x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-x} \left (\left (e^{2 x}+1\right ) \arctan \left (e^x\right )+c_1 e^{2 x}+c_2\right ) \end{align*}
Sympy. Time used: 1.161 (sec). Leaf size: 53
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-exp(x) + exp(-x))/(exp(x) + exp(-x)) - y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \int \frac {\sinh ^{2}{\left (x \right )}}{\left (e^{x} - 1\right ) \left (e^{x} + 1\right ) \cosh {\left (x \right )}}\, dx\right ) e^{x} + \left (C_{2} + \frac {\operatorname {atan}{\left (\tanh {\left (\frac {x}{2} \right )} \right )}}{2} - \frac {\int \frac {e^{2 x}}{\cosh {\left (x \right )}}\, dx}{4}\right ) e^{- x} \]