5

I'm trying to understand why we can separate $\frac{dy}{dx}$ in separable differential equations when rigorously it's not a fraction but an operator (AFAIK).

I have an assumption, but I'm not sure that it's right. I'm not a mathematician, just a math-curious self-taught programmer and factory worker (all together). I eventually realized that I don't understand how the separation of $\frac{dy}{dx}$ actually works in the background and got kind of nerd-sniped (xkcd 356). I never took a course on rigorous Analysis, just lectures on Calculus a few years ago, from MIT OCW and Professor Leonard and such.

Well, I came here to the community of mathematicians to ask if my first attempt is correct and what should I do with the second one in order to finish it, because I am stuck there.

Fist attempt:
$\frac{dy}{dx} = f(x)g(y)$, $\frac{1}{g(y)}\frac{dy}{dx} = f(x)$, we can write: $\frac{1}{g(y)}$ as: $\frac{d}{dy} \int\frac{1}{g(y)}dy$.

Then: $\frac{d}{dy} \int\frac{1}{g(y)}dy\frac{dy}{dx} = f(x)$. I see a similarity to the chain rule, so maybe I can use it. Recall "The Chain Rule": $\frac{du}{dx} = \frac{du}{dy} \frac{dy}{dx}$, and let $u = \int\frac{1}{g(y)}dy$, so if we substitute it into the chain rule, we get: $\frac{d}{dx} \int\frac{1}{g(y)}dy = \frac{d}{dy} \int\frac{1}{g(y)}dy \frac{dy}{dx}$, since the first term of the right-hand side is simply a differentiation of an integration with respect to the same variable ${y}$ then according to the fundamental theorem of calculus:
$\frac{d}{dx} \int\frac{1}{g(y)}dy = \frac{1}{g(y)} \frac{dy}{dx} = f(x)$.

Now if I integrate all this with respect to $x$: $\int[\frac{d}{dx} \int\frac{1}{g(y)}dy]dx = \int[\frac{1}{g(y)} \frac{dy}{dx}]dx = \int f(x) dx$. I finally get $\frac{dy}{dx}$ separated without "abusing notation": $\int\frac{1}{g(y)}dy = \int\frac{1}{g(y)} \frac{dy}{dx}dx = \int f(x) dx$; $\int\frac{1}{g(y)}dy = \int f(x) dx$.

Is this attempt correct?

Second attempt (which I stuck with at the end):
$\frac{dy}{dx} = f(x)g(y)$; $\frac{1}{g(y)}\frac{dy}{dx} = f(x)$.

Let: $G(u) = \int\frac{1}{g(u)}du$$ where ${u} = y(x)$ and therefore ${du} = \frac{d}{dx}y(x)$. Then I think that I can rewrite: $G(u) = \int\frac{1}{g(u)}du$ as: $G(y(x)) = \int\frac{1}{g(y(x))} \frac{d}{dx} y(x)$.

Then: $\frac{1}{g(y)}\frac{dy}{dx} = f(x)$ can be rewritten as: $\frac{d}{dy}G(y(x)) \frac{dy}{dx} = f(x)$.

Recall the Chain Rule: $\frac{du}{dx} = \frac{du}{dy} \frac{dy}{dx}$ and in this case the $u = G(y(x))$, so we get: $\frac{d}{dx} G(y(x)) = \frac{d}{dy} G(y(x)) \frac{dy}{dx} = f(x)$, then I integrate all this with respect to ${x}$ like this:

$\int\frac{d}{dx} G(y(x)) dx = \int[\frac{d}{dy} G(y(x)) \frac{dy}{dx}]dx = \int f(x) dx$, since $G(y(x)) = \int\frac{1}{g(y(x))} \frac{d}{dx} y(x)$:
$\int[\frac{d}{dx} \int\frac{1}{g(y(x))} \frac{d}{dx} y(x)] dx = \int[\frac{d}{dy} \int\frac{1}{g(y(x))} \frac{d}{dx} y(x) \frac{dy}{dx}]dx = \int f(x) dx$

And here I stuck and don't know what (and why) to do with all this mess.

Mikhail Katz
  • 47,573
Michael
  • 93
  • If you want to know what $\mathrm{d} x$ really means, learn differential geometry. This is, as far as I know, the only branch in mathematics that seriously talks about this. – Mr. Egg Jun 05 '24 at 05:02
  • 1
    @Mr.Egg, if you want to know what $dx$ really means, learn nonstandard analysis. This is, as far as I know, the only branch of mathematics that seriously talks about this. – Mikhail Katz Jun 05 '24 at 09:34
  • When we separate variables in ODEs we neither need DG, nor do we need non-standard analysis because we are not interested what $dx,dy$ really mean. See my answer. The chain rule (aka variable transformation rule) is all we need. And that was noticed by OP in an overly complicated proof. – Kurt G. Jun 05 '24 at 09:45
  • 1
    I think this question isn't very close to the suggested duplicate. Please let's reopen it. – Rob Arthan Jun 07 '24 at 19:19

3 Answers3

5

Let $$\frac{dy}{dx}=f(x)g(y)$$ be the generic separable ODE. Let's mess around unrigorously solving it (I spare us the well-known details): $$ \int_{x_0}^xf(u)\,du=\int_{y_0}^y\frac1{g(u)}\,du\,. $$ In the notation $$ F(x,y):=\int_{x_0}^xf(u)\,du-\int_{y_0}^y\frac1{g(u)}\,du=0 $$ this defines the solution $y(x)$ as an implicit function.

Theorem. This implicit function solves the original ODE.

Proof. $$ 0=\frac{d}{dx}F(x,y)=\frac{\partial}{\partial x}F(x,y)+\frac{\partial}{\partial y}F(x,y)\,\frac{dy}{dx}=f(x)-\frac 1{g(y)}\frac{dy}{dx}\,. $$ $$\tag*{$\Box$} $$ Remark. This proof just mimics what every person solving and ODE should do: verifying the obtained solution.

Kurt G.
  • 17,136
  • Thanks for your post. For my sanity check and practice, my try to solve with this approach also: $\frac{dy}{dx} = xy$, $\frac{1}{y} dy = x dx$, let $x_0 = 0$ and $y_0 = 1$ (initial conditions if I right understand), then: $\int_{1}^y\frac{1}{u} du = \int_{0}^x v dv$ => $ln|y| = 0.5x^2$ => $y = e^{0.5x^2}$. Now if I put this $y$ into original $\frac{dy}{dx} = xy$ I'll see that this solution satisfies the equation. About the definition: F(x, y) = $ln|y| - 0.5x^2$ => since $y = e^{0.5x^2}$ => $ln|e^{0.5x^2}| - 0.5x^2$ => ${0.5x^2} - 0.5x^2 = 0$. – Michael Jun 05 '24 at 09:13
  • About the proof now: $0=\frac{d}{dx}F(x,y)=\frac{\partial}{\partial x}F(x,y)+\frac{\partial}{\partial y}F(x,y),\frac{dy}{dx}=f(x)-\frac 1{g(y)}\frac{dy}{dx},$. Since $F(x,y) = ln|y| - 0.5x^2$ then $\frac{\partial}{\partial x} F(x, y) = -x$ then $\frac{\partial}{\partial y} F(x, y)\frac{dy}{dx} = 1/y$, and $\frac{dy}{dx}=xy$, then $\frac{\partial}{\partial y} F(x, y)\frac{dy}{dx} = x$, so $- x + x = 0$. – Michael Jun 05 '24 at 09:13
  • I just want to make sure that I understand the thing. Did I do everything right? – Michael Jun 05 '24 at 09:14
  • Looks right, except that a serious mathematician writes $1/2$ instead of $0.5,.$ – Kurt G. Jun 05 '24 at 09:43
  • I just now noticed that in the first comment it should be $F(x, y) = \frac{1}{2}x^2 - ln|y|$ not $F(x, y) = ln|y| - \frac{1}{2}x^2$ but that's still equals to $0$. Same as in the second commentary about proof. Partial derivative w.r.t. ${x}$ should be ${x}$ and w.r.t. to ${y}$ should be ($-\frac{1}{y}$) (just different signs for both). Embarrassing mistake. I just wasn't sure it was right to say $\frac{dy}{dx} = xy$ in the end. I said it intuitively because it's really = ${xy}$ in the original diff.eq. and it makes the whole proof correct. Is it correct? – Michael Jun 05 '24 at 10:07
  • Thanks to your answer, I at least practiced after a long time of not doing anything related to calculus at all. – Michael Jun 05 '24 at 10:07
  • $F$ or $-F$ define the same implicit function that solves the original ODE. – Kurt G. Jun 05 '24 at 11:03
4

You can make a change of variables in your $G(u)$, but you are missing the $dx$ in the integral formula for $G(y(x))$.

Your concern was expressed by the well-known educator David Tall in the following terms:

Students are often given emotionally charged instructions to avoid thinking of $dy/dx$ as a quotient and to conceptualize it as a limit, even though the formulae of the calculus visibly seem to operate as if it is a quotient involving symbols that can be shifted around to change differential equations into integrals. (Tall on page 336 in Tall, David. How Humans Learn to Think Mathematically: Exploring the Three Worlds of Mathematics. Cambridge University Press, 2013)

In fact, to give a convincing account of the separation of variables technique, one can use a modern theory of infinitesimals such as nonstandard analysis. Such an account still requires nontrivial work. You could consult Keisler's book Foundations of infinitesimal calculus.

Mikhail Katz
  • 47,573
1

I know this isn't rigorous, but at its core, dy IS some infinitesimally small change in y, and dx is some infinitesimally small change in x. The derivative operator $\frac{d}{dx}$ just examines the infinitely small change in something compared to an infinitely small change in x. (As an aside: $\frac{dy}{dx}$ is NOT an operator. $\frac{d}{dx}$ is. $\frac{dy}{dx}$ is the result you get out after applying $\frac{d}{dx}$ to y)

So, when thought of that way, when you apply the operator $\frac{d}{dx}$ to y, you do get a fraction of $\frac{dy}{dx}$. The number you get out represents the ratio between dy and dx at a given point. And so dy and dx are theoretically measurable and that's the reason $\frac{dy}{dx}$ equals a number when evaluated at a point.

All this to say, that's why you can treat $\frac{dy}{dx}$ as a fraction and manipulate it as such.

As another aside, you cannot do the same thing with $\frac{d}{dx}$ because $\frac{d}{dx}$ is the operator itself that says "take the derivative of something with respect to x", or "find an infinitely small change in something and compare it to an infinitely small change in x." Multiplying out the dx wouldn't make sense because it's an unevaluated operator. At least, that's what helps me sleep at night.

  • "At least, that's what helps me sleep at night." but I can't, for two days :) Because I'm not sure that my approach to this is right too. And I don't have any clue what to do with all the mess I come up with at the end of the second try. Of course, at the end of the first one I got the result, and through the whole process it seems quite logical to me, but I'm not sure because I'm not a mathematician actually – Michael Jun 05 '24 at 04:59
  • What even is a mathematician? – The Math Potato Jun 06 '24 at 06:55