10.6.25 problem 25

Internal problem ID [1242]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 25
Date solved : Saturday, March 29, 2025 at 10:49:44 PM
CAS classification : [_exact, _rational]

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

Maple. Time used: 0.014 (sec). Leaf size: 17
ode:=2*x/y(x)-y(x)/(x^2+y(x)^2)+(-x^2/y(x)^2+x/(x^2+y(x)^2))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \cot \left (\operatorname {RootOf}\left (-\textit {\_Z} +x \tan \left (\textit {\_Z} \right )+c_1 \right )\right ) \]
Mathematica. Time used: 0.292 (sec). Leaf size: 23
ode=2*x/y[x]-y[x]/(x^2+y[x]^2)+(-x^2/y[x]^2+x/(x^2+y[x]^2))*D[y[x],x] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\arctan \left (\frac {x}{y(x)}\right )-\frac {x^2}{y(x)}=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x/y(x) + (-x**2/y(x)**2 + x/(x**2 + y(x)**2))*Derivative(y(x), x) - y(x)/(x**2 + y(x)**2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out