83.3.7 problem 2 (b)

Internal problem ID [21926]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter III. First order differential equations of the first degree. Ex. IV at page 38
Problem number : 2 (b)
Date solved : Thursday, October 02, 2025 at 08:13:08 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

With initial conditions

\begin{align*} y \left (0\right )&=3 \\ \end{align*}
Maple. Time used: 0.055 (sec). Leaf size: 23
ode:=x^2+2*x*y(x)-2*y(x)^2+(y(x)^2+2*x*y(x)-2*x^2)*diff(y(x),x) = 0; 
ic:=[y(0) = 3]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {3}{2}+\frac {x}{2}+\frac {\sqrt {-3 x^{2}+18 x +9}}{2} \]
Mathematica. Time used: 0.996 (sec). Leaf size: 26
ode=(x^2+2*x*y[x]-2*y[x]^2)+(y[x]^2+2*x*y[x]-2*x^2)*D[y[x],x]==0; 
ic={y[0]==3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (\sqrt {-3 x^2+18 x+9}+x+3\right ) \end{align*}
Sympy. Time used: 1.587 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + 2*x*y(x) + (-2*x**2 + 2*x*y(x) + y(x)**2)*Derivative(y(x), x) - 2*y(x)**2,0) 
ics = {y(0): 3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x}{2} + \frac {\sqrt {- 3 x^{2} + 18 x + 9}}{2} + \frac {3}{2} \]