Hi I am stuck solving this problem: 'Employ a change of variables $z=\frac{y}{x}$ to solve the differential equation: $$(x+y)\frac{dy}{dx} -(4x+y)=0, y(1)=2$$
Enter the result $y(3)$.
I have done the substitution and then integrated by I cannot get an explicit expression for y, which leaves me confused as to how I can find $y(3)$. Please help!
Starting from
$$(x+y)\frac{dy}{dx} -(4x+y)=0$$
rewrite as
$$\frac{dy}{dx}=\frac{4x+4}{x+y}=\frac{4+\frac xy}{1+\frac xy}$$
then with the substitution $z=\frac{y}{x}$ we have $\frac{dy}{dx}=z+x\frac{dz}{dx}$ so
$$z+x\frac{dz}{dx}=\frac{4+z}{1+z} \implies x\frac{dz}{dx}=\frac{4-z^2}{1+z}$$
which we can rewrite as
$$\frac{1+z}{4-z^2}dz=\frac{1}{x}dx$$
where a partial fraction decomposition of the LHS forms
$$\frac{1+z}{4-z^2}=\frac{-1}{4(z+2)}-\frac{3}{4(z-2)}$$
hence
$$-\frac{1}{4}\left(\frac{1}{z+2}+\frac{3}{z-2}\right)dz=\frac{1}{x}dx$$
whereby integrating both sides forms
$$-\frac{1}{4}\Big(\ln|z+2|+3\ln|z-2|\Big)=\ln|x|+C$$ or $$\ln|z+2|+3\ln|z-2|=-4\ln|x|+C$$ which can be rewritten as $$(z+2)(z-2)^3=Cx^{-4} \implies C=x^4(z+2)(z-2)^3$$ therefore substituting $z=\frac{y}{x}$ $$C=x^4\left(\frac{y}{x}+2\right)\left(\frac{y}{x}-2\right)^3$$ the initial/boundary condition of $y(1)=2$ forms $$C=1(4)(0)=0$$ hence since $x\neq 0$ we see that $$(y+2x)(y-2x)^3=0$$ which implies $$y=-2x,\quad y=2x$$ where $y=-2x$ cannot be the solution since $y(1)=2$. Therefore, $y=2x$ is the solution and $y(3)=6$.