Answer with Step-by-step explanation:
The given differential equation is variable separable in nature and hence will be solved accordingly as follows:
[tex]\frac{dy}{dx}=\frac{y}{x}\\\\=\frac{dy}{y}=\frac{dx}{x}\\\\\int \frac{dy}{y}=\int \frac{dx}{x}\\\\ln(y)=ln(x)+ln(c)\\\\ln(y)=ln(cx)\\\\(\because ln(ab)=ln(a)+ln(b))\\\\\therefore y=cx[/tex]
where 'c' is constant of integration whose value shall be obtained using the given condition [tex]y(1)=-2[/tex]
Thus we have
[tex]-2=c\times 1\\\\\therefore c=-2\\[/tex]
Thus solution becomes
[tex]y=-2x[/tex]