67.1.10 problem Problem 2(a)

Internal problem ID [13886]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 2, First Order Equations. Problems page 149
Problem number : Problem 2(a)
Date solved : Monday, March 31, 2025 at 08:16:20 AM
CAS classification : [_separable]

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

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