61
$\begingroup$

This question already has an answer here:

I read the following statement in a book on Calculus, as part of my mathematics course:

Technically this separation of $\frac{dy}{dx}$ is not mathematically valid. However, the resulting integration leads to correct answer.

The book also contains the following:

To solve a differential equation by separation of variables:

  • get all the $x$ values on one side and all the $y$ values on the other side by multiplication and division.
  • separate $\frac{dy}{dx}$ as if it were a fraction.
  • integrate both sides.

Note: This box doesn't refer to a particular problem. It refers to a class of problems of differential equations which can be solved using the Method of Separation of Variables.

My high school mathematics teacher told me that this is the most fundamental way to solve differential equations but the textbook says it is not mathematically valid. I am not able to understand why are certain methods being followed without having a mathematical proof. Or am I wrong?

$\endgroup$

marked as duplicate by Hans Lundmark, Claude Leibovici calculus Feb 14 '17 at 9:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ This post does not contain enough information. $\endgroup$ – Jas Ter Apr 26 '15 at 9:32
  • $\begingroup$ @NemisL. What information can provide you further context? Name of the book? $\endgroup$ – Devarsh Ruparelia Apr 26 '15 at 9:33
  • $\begingroup$ Quote what the book is referring to by the word "this". $\endgroup$ – John Bentin Apr 26 '15 at 9:36
  • $\begingroup$ It is not clear what kind of technique is referred to: "this separation" -- what separation? The quoted statement is without context. $\endgroup$ – Jas Ter Apr 26 '15 at 9:36
  • 9
    $\begingroup$ @NemisL. I think the question contains more then enough information if you are familiar with how calculus is taught in the US. If you are used to a rigorous approach to mathematical analysis it might make less sense. $\endgroup$ – DRF Apr 26 '15 at 10:00
105
$\begingroup$

The problem with this form of separation of variables (I say "this form" because "separation of variables" can refer to multiple things) is that treating the derivative $dy/dx$ as a ratio is a purely formal algebraic manipulation. There is a way to arrive at the same results in a rigorous fashion, but textbooks often don't address this.

To elaborate, separation of variables in ODEs most commonly refers to a method of solving the ODE $$ \frac{dy}{dx} = g(x)h(y) $$ for the unknown function $y(x)$. Introductory textbooks often tell you to split the "fraction" $dy/dx"$ and unite common variables, like so: $$ \frac{dy}{h(y)} = g(x)dx $$ and then integrate both sides, as long as $h(y)\neq 0$, to obtain $$ H(y(x)) = \int g(x)~dx + C, $$ where $H(y)$ is an antiderivative of $\frac{1}{h(y)}$.

Unfortunately "$dy$" and "$dx$" have no actual mathematical meaning in this context, so all we've done is pull a little algebraic trick without understanding why it works. To resolve this, we rearrange: $$ \frac{1}{h(y)}\frac{dy}{dx} = g(x). $$ Integrating in $x$, $$ \int \frac{1}{h(y(x))}\frac{dy}{dx}(x)~dx = \int g(x)~dx + C. $$ Now if $H(y)$ is an antiderivative of $1/h(y)$, then by the chain rule $$ \frac{d}{dx}H(y(x)) = \frac{1}{h(y(x))}\frac{dy}{dx}(x) $$ so the left-hand integral is $$ \int \frac{1}{h(y(x))}\frac{dy}{dx}(x)~dx = \int \frac{d}{dx}H(y(x))~dx = H(y(x)) $$ leading us to our desired conclusion, $$ H(y(x)) = \int g(x)~dx + C. $$

Doing it this way gives a rigorous justification of the result, but frankly the abuse of notation with the symbolic approach is much easier for most to memorize, so it is often the way it is taught to students. However, I think not explaining why the abuse of notation works confuses many students, both about the method and about their already flimsy understanding of the derivative.

$\endgroup$
  • 10
    $\begingroup$ This is really nice explanation. $\endgroup$ – Devarsh Ruparelia Apr 26 '15 at 9:58
  • 2
    $\begingroup$ +1 Thank you alot for sharing this simple explanation. Up until your post I only saw pages of explanations which were hard to follow :D. $\endgroup$ – MrYouMath Sep 29 '16 at 12:05
  • $\begingroup$ So this proves that the "trick" of moving around the $dy$ and $dx$ works for the equation $\frac{dy}{dx}=g(x)h(y)$. I wonder though: does moving around $dy$ and $dx$ give you the right answer in general? or only in that particular equation. E.g. do we get the right answers if we apply something similar to complicated PDE's? $\endgroup$ – user56834 Sep 29 '16 at 14:24
  • $\begingroup$ @Programmer2134 Separation of variables is definitely the standard approach to solving some PDEs (particularly the Laplace and Heat equations), particularly in physics. My introduction to PDE class in the math department has also used this technique though. In PDE, if for instance we want to solve for $u(x,y)$ given a PDE in $u$, we attempt to write $u(x,y)=f(x)g(y)$ and solve the PDE using this form (this often allows you to convert the pde into a system of ODEs). I unfortunately do not recall when this is a reasonable assumption (might have to do with linearity). $\endgroup$ – helloworld112358 May 17 '17 at 18:40
  • $\begingroup$ What does the '(x)' mean and where does it come from? (it first crops up after the bit where you integrate in x). $\endgroup$ – BagelEnthusiast Aug 24 at 10:35
15
$\begingroup$

You are misunderstanding what they mean by not mathematically valid in this situation. It has little to do with whether or not there is a proof and more to do with some formalism.

When we write $\frac{dy}{dx}$ I'm sure you've heard already that this is not a fraction. In particular this is really saying to apply the differential operator $\frac{d}{dx}$ to the function $y$.

So when you perform separation of variables by transitioning from $\frac{dy}{dx}=g(x)h(y)$ to $\frac{dy}{h(y)}=g(x)dx$ we have done something that seems to be fundamentally incorrect we took the operator $\frac{d}{dx}$ and split it as if it was a fraction. This obviously makes no sense if we really think of $\frac{d}{dx}$ as an operator and moreover the $dx$ and $dy$ we end up with make no sense either as we don't even know what they should mean.

On the other hand the resulting integrals $\int\frac{1}{h(y)}dy=\int g(x)dx$ actually have a reasonable mathematical meaning and moreover assuming $g(x)$ and $h(y)$ aren't very awful you get the correct result.

Now the fact that the resulting integral equation gives you the correct result is absolutely provable, we just shouldn't have gotten to it the way we did. Instead the following approach is appropriate:

$$\frac{dy}{dx}=g(x)h(y)$$ then assuming $h(y)$ is not $0$. $$\frac{1}{h(y)}\frac{dy}{dx}=g(x)$$ Further assuming both sides are integrable we get $$\int\frac{1}{h(y)}\frac{dy}{dx}dx=\int g(x)dx$$ Now performing a substitution in the integral on the left we get $$\int\frac{1}{h(y)}dy=\int g(x)dx$$

Now even in this explanation I've cheated in a few places slightly but it's a reasonable first approximation to explaining why separation of variables is a correct method for solving differential equations.

Edit You can actually build mathematics in such a way that $dy$ and $dx$ do have a reasonable meaning on their own and that you can pretty much treat $\frac{dy}{dx}$ as a fraction. This is usually called non-standard mathematics and makes use of something called infinitesimals. It's not particularly easy to do though and you still end up having some issues.

$\endgroup$
  • 4
    $\begingroup$ How did you perform the last substitution $\int\frac{1}{h(y)}dy=\int g(x)dx$ ? $\endgroup$ – Dor Apr 26 '15 at 9:47
  • $\begingroup$ Makes sense but not completely. $\endgroup$ – Devarsh Ruparelia Apr 26 '15 at 9:50
  • 2
    $\begingroup$ @dor that is just the standard substitution rule for integrals except with a tiny bit of abuse of notation. You have $\int f(g(x))g^\prime(x)dx=\int f(y)dy$ for $y=g(x)$. So really I should have said $u=y$ and $\int \frac{1}{h(y)}\frac{dy}{dx}dx=\int \frac{1}{h(u)}du$. $\endgroup$ – DRF Apr 26 '15 at 10:06
  • $\begingroup$ What issues arise when dealing with infinitesimals? $\endgroup$ – bjb568 Apr 26 '15 at 16:29
  • 3
    $\begingroup$ @bjb568 I must admit that my knowledge of the topic is cursory at best. Adding infinitesimals loses you a number of properties of the reals, like being archimedean and complete. In my mind though the biggest issues is that actually properly formalizing infinitesimals always seemed extremely hard and it seemed to me that while some things end up being easier for students they end up completely confused in the end because they miss a lot of the nuances of the theory they work in. That might just be my own problem since my understanding isn't good enough. $\endgroup$ – DRF Apr 26 '15 at 16:42

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