I have a differential equation: $$ (x+2y-4)dx +(-2x+4y)dy = 0 $$
Since the coefficients of $dx$ and $dy$ are assumed to define line in the plain, so:
$$ 7y -3 = 0 $$ $$ 2x+1 = 0 $$
Point od the intersection of these lines is:$ (x,y) = (2,1) $
Next, I'm trying to move origin of the plain to the intesection point.
We know that relations between coordinates are:
$$ x = \bar{x} +2 $$ $$ y = \bar{y} +1 $$
where $\bar{x}$, $\bar{y}$ are coordinates measured from point $ (2,1)$
After substitution these relations, equation simplifices to form:
$$ (\bar{x} + 2 \bar{y})d\bar{x} + (-2\bar{x}+4\bar{y})d\bar{y} =0 $$
Now I'm trying to do substitution:
$$ \bar{x} = u \bar{y}, d\bar{x} = u d\bar{y} + \bar{y}du $$
So after substitution and simplifications I'm obtaining:
$$ (u^{2} + 4) \bar{y}d\bar{y} + (u+2)\bar{y}^2 du = 0$$
Now, I'm dividing equation both sides by $(u^2+4)(\bar{y}^2)$
and I'm obtaining equation with separable variables:
$$ \frac{d\bar{y}}{\bar{y}} + \frac{u+2}{u^2+4}du = 0 $$
Because: $$ \int \frac{u+2}{u^2+4} = arctan(\frac{u}{2}) + \frac{1}{2} ln|4+u^2| + C$$
So, I have a solution:
$$ ln|\bar{y}| + arctan(\frac{u}{2})+ \frac{1}{2}ln|(4+u^2)| = C $$
After substitution relationship between $\bar{x},x$ and $\bar{y},y$ and simplifications, I'm obtaining:
$$ ln|4(y-1)^{2} + (x-2)^2| + 2 arctan(\frac{x-2}{2y-2}) = C $$
Now I have a problem because answer from book to this exercise is:
$$ ln|4(y-1)^{2} + (x-2)^2| -2 arctan(\frac{2y-2}{x-2})+= C $$
I've check that this solutions we may obtain with substitution:
$$ \bar{y} = u\bar{x}, d\bar{y} = u d \bar{x} + \bar{x}du $$
Is my answer wrong? I would be grateful for explaining. Best regards
These two answers are equivalent. Since $\arctan\left(\frac{1}{a}\right)=\frac{\pi}{2}-\arctan(a)$ for positive $a$ and $\arctan\left(\frac{1}{a}\right)=-\frac{\pi}{2}-\arctan(a)$ for negative $a$, your answer and their answer only differ by a constant. So both answers are correct — you just need to note that the two constants $C$ are different from each other.