76.1.7 problem 7

Internal problem ID [17235]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.1 (Separable equations). Problems at page 44
Problem number : 7
Date solved : Monday, March 31, 2025 at 03:45:27 PM
CAS classification : [_separable]

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

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