23.1.42 problem 37

Internal problem ID [4649]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 37
Date solved : Tuesday, September 30, 2025 at 07:38:07 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=6 \,{\mathrm e}^{2 x}-y \tanh \left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 25
ode:=diff(y(x),x) = 6*exp(2*x)-y(x)*tanh(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 \tanh \left (x \right )+4 \sinh \left (x \right ) \cosh \left (x \right )+4 \cosh \left (x \right )^{2}+c_1 \,\operatorname {sech}\left (x \right ) \]
Mathematica. Time used: 0.077 (sec). Leaf size: 42
ode=D[y[x],x]==6*Exp[2*x]- y[x]*Tanh[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {6 e^{2 x}+2 e^{4 x}+c_1 \sqrt {e^{2 x}}}{e^{2 x}+1} \end{align*}
Sympy. Time used: 0.511 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*tanh(x) - 6*exp(2*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} \tanh {\left (x \right )} + C_{1} e^{- x} - 2 e^{2 x} \tanh {\left (x \right )} + 4 e^{2 x} \]