60.1.128 problem 131

Internal problem ID [10142]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 131
Date solved : Sunday, March 30, 2025 at 03:19:46 PM
CAS classification : [_separable]

\begin{align*} \left (2 x +1\right ) y^{\prime }-4 \,{\mathrm e}^{-y}+2&=0 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 31
ode:=(2*x+1)*diff(y(x),x)-4*exp(-y(x))+2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\ln \left (\frac {2 x +1}{-1+\left (4 x +2\right ) {\mathrm e}^{2 c_1}}\right )-2 c_1 \]
Mathematica. Time used: 0.682 (sec). Leaf size: 26
ode=(2*x+1)*D[y[x],x] - 4*Exp[-y[x]] + 2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \log \left (2+\frac {e^{c_1}}{2 x+1}\right ) \\ y(x)\to \log (2) \\ \end{align*}
Sympy. Time used: 0.326 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*x + 1)*Derivative(y(x), x) + 2 - 4*exp(-y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \log {\left (\frac {C_{1}}{2 x + 1} + 2 \right )} \]