26.1.1 problem 1.a

Internal problem ID [4241]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, section 7, page 37
Problem number : 1.a
Date solved : Tuesday, March 04, 2025 at 05:58:35 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

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