36.4.5 problem 6

Internal problem ID [6343]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problems. page 79
Problem number : 6
Date solved : Wednesday, March 05, 2025 at 12:36:16 AM
CAS classification : [_separable]

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

Maple. Time used: 0.004 (sec). Leaf size: 41
ode:=2*x*y(x)^3-(-x^2+1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {1}{\sqrt {c_1 +2 \ln \left (x -1\right )+2 \ln \left (x +1\right )}} \\ y &= -\frac {1}{\sqrt {c_1 +2 \ln \left (x -1\right )+2 \ln \left (x +1\right )}} \\ \end{align*}
Mathematica. Time used: 0.213 (sec). Leaf size: 57
ode=2*x*y[x]^3-(1-x^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {1}{\sqrt {2} \sqrt {\log \left (x^2-1\right )-c_1}} \\ y(x)\to \frac {1}{\sqrt {2} \sqrt {\log \left (x^2-1\right )-c_1}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.818 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x)**3 - (1 - x**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {2} \sqrt {- \frac {1}{C_{1} - \log {\left (x^{2} - 1 \right )}}}}{2}, \ y{\left (x \right )} = \frac {\sqrt {2} \sqrt {- \frac {1}{C_{1} - \log {\left (x^{2} - 1 \right )}}}}{2}\right ] \]