82.12.18 problem Ex. 20

Internal problem ID [18712]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Examples on chapter II at page 29
Problem number : Ex. 20
Date solved : Monday, March 31, 2025 at 06:02:20 PM
CAS classification : [_separable]

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

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