15.5.19 problem 23

Internal problem ID [2955]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 9, page 38
Problem number : 23
Date solved : Sunday, March 30, 2025 at 01:01:16 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

With initial conditions

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

Maple
ode:=(x^2+y(x)^2-2*y(x))*diff(y(x),x) = 2*x; 
ic:=y(1) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 0.204 (sec). Leaf size: 29
ode=(x^2+y[x]^2-2*y[x])*D[y[x],x]==2*x; 
ic={y[1]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x^2 \left (-e^{-y(x)}\right )-e^{-y(x)} y(x)^2=-1,y(x)\right ] \]
Sympy. Time used: 0.999 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + (x**2 + y(x)**2 - 2*y(x))*Derivative(y(x), x),0) 
ics = {y(1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \frac {x^{2} e^{- y{\left (x \right )}}}{2} + \frac {y^{2}{\left (x \right )} e^{- y{\left (x \right )}}}{2} - \frac {1}{2} = 0 \]