35.2.2 problem 2

Internal problem ID [6094]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 2. Separable equations. page 398
Problem number : 2
Date solved : Sunday, March 30, 2025 at 10:38:24 AM
CAS classification : [_separable]

\begin{align*} x \sqrt {1-y^{2}}+y \sqrt {-x^{2}+1}\, y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (\frac {1}{2}\right )&={\frac {1}{2}} \end{align*}

Maple. Time used: 0.472 (sec). Leaf size: 25
ode:=x*(1-y(x)^2)^(1/2)+y(x)*(-x^2+1)^(1/2)*diff(y(x),x) = 0; 
ic:=y(1/2) = 1/2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \sqrt {2 \sqrt {3}\, \sqrt {-x^{2}+1}+x^{2}-3} \]
Mathematica. Time used: 3.615 (sec). Leaf size: 38
ode=x*Sqrt[1-y[x]^2]+y[x]*Sqrt[1-x^2]*D[y[x],x]==0; 
ic={y[1/2]==1/2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \sqrt {x^2} \\ y(x)\to \sqrt {x^2+2 \sqrt {3-3 x^2}-3} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*sqrt(1 - y(x)**2) + sqrt(1 - x**2)*y(x)*Derivative(y(x), x),0) 
ics = {y(1/2): 1/2} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants