28.1.105 problem 128

Internal problem ID [4411]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 128
Date solved : Sunday, March 30, 2025 at 03:18:00 AM
CAS classification : [_Bernoulli]

\begin{align*} {\mathrm e}^{x}+3 y^{2}+2 x y y^{\prime }&=0 \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 56
ode:=exp(x)+3*y(x)^2+2*x*y(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {-\left (\left (x^{2}-2 x +2\right ) {\mathrm e}^{x}-c_1 \right ) x}}{x^{2}} \\ y &= -\frac {\sqrt {-\left (\left (x^{2}-2 x +2\right ) {\mathrm e}^{x}-c_1 \right ) x}}{x^{2}} \\ \end{align*}
Mathematica. Time used: 2.058 (sec). Leaf size: 62
ode=(Exp[x]+3*y[x]^2)+(2*x*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {-e^x \left (x^2-2 x+2\right )+c_1}}{x^{3/2}} \\ y(x)\to \frac {\sqrt {-e^x \left (x^2-2 x+2\right )+c_1}}{x^{3/2}} \\ \end{align*}
Sympy. Time used: 0.810 (sec). Leaf size: 63
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x)*Derivative(y(x), x) + 3*y(x)**2 + exp(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {\frac {\frac {C_{1}}{x^{2}} - e^{x} + \frac {2 e^{x}}{x} - \frac {2 e^{x}}{x^{2}}}{x}}, \ y{\left (x \right )} = \sqrt {\frac {\frac {C_{1}}{x^{2}} - e^{x} + \frac {2 e^{x}}{x} - \frac {2 e^{x}}{x^{2}}}{x}}\right ] \]