8.3.12 problem 12

Internal problem ID [688]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.4. Separable equations. Page 43
Problem number : 12
Date solved : Tuesday, March 04, 2025 at 11:32:34 AM
CAS classification : [_separable]

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

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