# Help with very easy differential equation

1. May 10, 2012

### pmqable

1. The problem statement, all variables and given/known data
dy/dx=y/x

2. Relevant equations

3. The attempt at a solution
ok heres what I got... dy/dx=y/x so dy/y=dx/x. Then just integrate both sides and you get ln(y)=ln(x)+C. Next raise both sides to a power of e and you get y=e^(ln(x)+C). This can be rewritten y=e^ln(x)*e^C. so the answer i got is y=xe^C. however, i checked the answer in the back of my textbook and it says that the answer is y=Cx. Help please??

2. May 10, 2012

### LCKurtz

You have the right idea, but need to use a little more care. When you integrate you get$$\ln(|y|) = \ln(|x|) + C$$
Writing in exponential form$$|y| = e^{\ln(|x|+C)}=|x|e^C$$Note that while $C$ can be any constant, $e^C$ is positive, so both sides of this equation are positive. You can drop the absolute value signs like this$$y = \pm e^Cx$$where $\pm e^C$ can now be any nonzero constant so you can call it a new constant K.$$y = Kx$$One other point. By dividing by $y$ in your solution, you ruled out the possibility of finding $y=0$ if it would happen to be a solution. Checking it you will see that $y=0$ also works, so you can include that by saying $K$ is any constant, not just a nonzero one.

Finally, the way the equation is written, no solution can be valid for $x=0$. That would be solved by writing the DE in the form $x\frac{dy}{dx}= y$ in the first place.

3. May 10, 2012

### pmqable

thanks a lot lckurtz