70.1.7 problem 7

Internal problem ID [18593]
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 : Thursday, October 02, 2025 at 03:15:22 PM
CAS classification : [_separable]

\begin{align*} y y^{\prime }&=\left (x y^{2}+x \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: 3.904 (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.447 (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 ] \]