7.3.12 problem 12

Internal problem ID [52]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.4 (separable equations). Problems at page 43
Problem number : 12
Date solved : Tuesday, March 04, 2025 at 10:40:43 AM
CAS classification : [_separable]

\begin{align*} y y^{\prime }&=x \left (y^{2}+1\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 {c_1 \,{\mathrm e}^{x^{2}}-1} \\ y &= -\sqrt {c_1 \,{\mathrm e}^{x^{2}}-1} \\ \end{align*}
Mathematica. Time used: 6.987 (sec). Leaf size: 57
ode=y[x]*D[y[x],x]==x*(y[x]^2+1); 
DSolve[ode,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.582 (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 ] \]