32.1.11 problem First order with homogeneous Coefficients. Exercise 7.12, page 61

Internal problem ID [5781]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 7
Problem number : First order with homogeneous Coefficients. Exercise 7.12, page 61
Date solved : Sunday, March 30, 2025 at 10:16:02 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} x^{2}+y^{2}&=2 x y y^{\prime } \end{align*}

With initial conditions

\begin{align*} y \left (-1\right )&=0 \end{align*}

Maple. Time used: 0.127 (sec). Leaf size: 23
ode:=x^2+y(x)^2 = 2*x*y(x)*diff(y(x),x); 
ic:=y(-1) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= \sqrt {\left (x +1\right ) x} \\ y &= -\sqrt {\left (x +1\right ) x} \\ \end{align*}
Mathematica. Time used: 0.202 (sec). Leaf size: 36
ode=(x^2+y[x]^2)==2*x*y[x]*D[y[x],x]; 
ic=y[-1]==0; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {x} \sqrt {x+1} \\ y(x)\to \sqrt {x} \sqrt {x+1} \\ \end{align*}
Sympy. Time used: 0.470 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 - 2*x*y(x)*Derivative(y(x), x) + y(x)**2,0) 
ics = {y(-1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {x \left (x + 1\right )}, \ y{\left (x \right )} = \sqrt {x \left (x + 1\right )}\right ] \]