If I take a very simple differential equation $\frac{dy}{dx} = y$ and apply the separation rule to get to $\frac{dy}{y} = dx$, I obtain $ln|y|=x+c$, and thus $y = ce^x$.

However, in case I separate the terms differently to gain $dy=y dx$ and, as in the previous instance, integrate both sides of the equation, the result will be $y=yx+c$, which is clearly not the same and also it is quite distinctly wrong (at least considering the result WolframAlpha provided).

I have just began learning all this stuff about differential equations and this leaves me baffled - the latter method seems correct to me, and yet it yeields a wrong result. Could someone please clarify where exactly the mistake is made, i.e. which step is the "illegal" one in the second approach? Have I made any false assumptions?

Thanks in advance.

edit: Thanks for prompt answers, the problem was treating y as a constant while integrating it.

  • 2
    $\begingroup$ y is a function of x; that is y=y(x) $\endgroup$ – randomgirl Feb 7 '15 at 23:46

I can't comment (don't have enough reputation), but I believe that the mistake is in the part where you take:

$$ dy=ydx $$

and you integrate it to get

$$ y=yx+c $$

The left hand side is fine, but when you integrate $y$ with respect to $x$, since $y$ is a variable function, you can't treat it like a 'constant'. Thus the integration to get $yx+c$ is invalid.

Another way to look at it I guess is:

take $y=yx$ and differentiate it. If $y$ and $x$ are both functions. This gives:

$$\frac{dy}{dx} =y'x+yx'$$

while if $y$ is a constant (like you treated it) it would give:

$$\frac{dy}{dx} =y$$

  • $\begingroup$ Oh my I see that now, many thanks. Quite a stupid overlooking :x $\endgroup$ – Nihilus Feb 8 '15 at 0:02

if you integrate $dy = ydx$ what you get is $y = \int y \, dx + C$ not as you have $y = xy + C$

the reason is $y$ is a function of $x$ and you are trying to determine that. the function $e^x$ will satisfy the $e^x = \int e^x dx + C$ as you can see.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.