Question # Give the correct answer and solve the given equation [x-y arctan(frac{y}{x})]dx+x arctan (frac{y}{x})dy=0

Integrals
ANSWERED Give the correct answer and solve the given equation $$[x-y \arctan(\frac{y}{x})]dx+x \arctan (\frac{y}{x})dy=0$$ 2021-03-07

We will first write this equation as
$$x \arctan (\frac{y}{x}) \cdot \frac{dy}{dx} = y \arctan (\frac{y}{x}) - x$$ (1)
Notice that $$\arctan (\frac{y}{x}) = 0$$
means that $$\frac{y}{x} = 0,\ so\ y = 0.$$ However, this is
not a solution of the given equation.
Thus, $$\arctan (\frac{y}{x}) \neq 0,$$ so we can divide the equation (1)
by $$x \arctan (\frac{y}{x})$$
$$\frac{dy}{dx}=\frac{y}{x}-\frac{1}{\arctan(\frac{y}{x})}$$ (2)
Make the substitution $$u = \frac{y}{x}\ or\ y = ux.$$ Then
$$\frac{dy}{dx} = \frac{d}{dx} (ux) = x \frac{dy}{dx} + u$$ (3)
(use the Chain Rule). Furthermore, (2) becomes
$$\frac{dy}{dx} = u - \frac{1}{\arctan(u)}$$ (4)
Combining (3) and (4), we get $$x \frac{du}{dx} + u = u - \frac{1}{\arctan(u)} \Rightarrow x \frac{du}{dx} = - \frac{1}{\arctan(u)}$$
Notice that this is a separable equation! It can be written as
$$\arctan(u) du = - \frac{1}{x} dx$$
Integrate both sides:
$$\int \arctan(u) du = - \int \frac{dx}{d}$$ (5)
Clearly,
$$- \int \frac{dx}{d} = - \ln |x| + C_{2},$$
where $$C_{2}$$ is some constant.
For the other integral, we use the integration by parts:
$$\int \arctan(u) du = \{(t = \arctan(u) dv = du), (dt = \frac{du}{1+u^{2}} v = u)\}$$
$$= u \arctan(u) - \int \frac{udu}{1+u^{2}} du$$
$$= u \arctan(u) - \frac{1}{2} \ln |1 + u^{2}| + C_{1}$$
$$= u \arctan(u) - \ln \sqrt{1+u^{2}} + C_{1}$$
where $$C_{1}$$ is some constant.
(In last equality we need used that $$1 + u^{2} > 0,\ so\ |1 + u^{2}| = 1 + u^{2},$$
and the property of the logarithmic function: $$x \ln y = \ln y^{x}.)$$
Finnaly. (5) becomes
$$= u \arctan(u) - \ln \sqrt{1+u^{2}} = - \ln |x| + C,$$
where $$C = C_{2} - C_{1}$$