Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Why does separation of variables work?

  1. Apr 18, 2009 #1
    To solve a separable ODE like this I would simply multiply each side by dx and then integrate both sides. However, I know that it is only notational convenience that allows me to do this, and what's really going on is slightly more complicated.

    Take this DE for example:




    [tex]\frac{y^{3}}{3} = \frac{x^{2}}{2} + x + c[/tex]

    What I don't understand, is how the LHS simplified like this:
    [tex]\int{(y^{2}\frac{dy}{dx})}dx = \int{y^{2}}dy[/tex]

    I'm sorry for asking such a basic questions, but my book does not explain this well at all :(
  2. jcsd
  3. Apr 18, 2009 #2


    User Avatar
    Gold Member

    You simplify multiply the dx by the dx in the denominator of dy/dx. Of course, it's not rigorously mathematically legal but i as well have never found out why we can actually do that.
  4. May 27, 2009 #3
    What you need to do is do an integration by parts. It is not simply canceling out the [tex] dx [/tex] on the numerator and denominator, although it does give the same answer.

    [tex]\int{(y^{2}\frac{dy}{dx})}dx = y^2 y - \int{2 y \frac{dy}{dx}y}dx[/tex].
    [tex] \Rightarrow 3 \int{(y^{2}\frac{dy}{dx})}dx = y^3 [/tex]
    [tex] \Rightarrow \int{(y^{2}\frac{dy}{dx})}dx = \frac{y^3}{3} [/tex]
  5. May 27, 2009 #4
    It is simply the chain rule (in integral form). Consider f(x) = g(h(x)).
    We then have f'(x) = g'(h(x))*h'(x). In Leibnitz notation, we thus have df/dx = (dg/dh)(dh/dx). By the Fundamental Theorem of Calculus, we then have
    [tex]\int g'(h(x))*h'(x) = \int f'(x) = f(x) + C[/tex]
    In Leibnitz notation:
    [tex]\int \frac{dg}{dh} \frac{dh}{dx} = f(x) + C = g(h(x)) + C[/tex]
    Suppressing the dependency of h on x, we get the abusive notation:
    [tex]\int \frac{dg}{dh} dh = g(h) + C[/tex]
    It is common for physics and engineering oriented texts to gloss over this and rely on an often undefined algebra of differentials.
    Last edited: May 27, 2009
  6. May 28, 2009 #5
    It seems that most of calculus and DE is based on some amazing notational conveniences which magically work. The underlying mechanics is a little more annoying.

    If you restate the problem, what you really have is an equation of an unknown function of x called y. Your goal is to figure out what values y can take on to make the equation true for ALL real x.

    [tex]y^2(x) y'(x) = x + 1[/tex]

    Both sides of this equation are a function of x, so we can take the anti-derivative of both sides. The right is easy, [tex]\int(x + 1)dx = \frac{1}{2} x^2 + x[/tex].

    The other side is a pain: [tex]\int y^2(x) y'(x) dx[/tex]. Use integration by parts, you can prove [tex]\int y^2(x) y'(x) dx = y(x)^3 - \int y(x)^2 y'(x) dx[/tex], and moving over the common expression to one side, and dividing by the 3, you get [tex]\int y^2(x) y'(x) dx = \frac{1}{3} y(x)^3[/tex].

    So our equation is now [tex]\frac{1}{3} y^3(x) = \frac{1}{2} x^2 + x[/tex]

    All these steps are legal, so the final equation there is a true statement, but it's not the answer to the question asked. This is a SINGLE solution to the DE. To arrive at the family of solutions, we recognize that one of our steps (the anti-derivative) is not one-to-one, and with a little informal rationalization, you can also see where the hell the stupid constant of integration comes in. If you really wanted to formalize away the constant as well, you can think of the result of an anti-derivative as a set-valued operation instead of a function-valued one.

    And that's how we can reduce separable ODE to first-year calculus =-) How the hell the notation works is nothing short of miraculous. Infinitesimal "dx's" are not how it works under the hood. What the hell is a "dx" anyway? It's not quite a number. Not quite a function. It's not well-typed. Infinitesimal calculus is amazing at explaining derivation (dividing by one zero is easy) but it sucks at integration (summing an infinite number of zeroes is hard!)

    Too many people do this kind of math without really understanding how it really works, so it's good to ask such things ;-)
  7. May 28, 2009 #6
    There is no need to integrate by parts. As slider142 pointed out, is simply the chain rule. Suppose you have the separable differential equation

    [tex]f\bigl(y(x)\bigr)y'(x) = g(x),[/tex]

    Let [itex]F(\eta)[/itex] be the primitive of [itex]f(\eta)[/itex]. Then, by the chain rule

    [tex]\frac{d}{d x} F\bigl(y(x)\bigr)=f\bigl(y(x)\bigr)y'(x),[/tex]

    now, integrating both sides of the separable ode,

    [tex]\int_{x_0}^x f\bigl(y(\xi)\bigr)y'(\xi)dx = \int_{x_0}^x \frac{d}{d\xi} F\bigl(y(\xi)\bigr)d\ix = F\bigl(y(x)\bigr)- F\bigl(y(x_0)\bigr),[/tex]


    [tex]F\bigl(y(x)\bigr) = F\bigl(y(x_0)\bigr) + \int_{x_0}^x g(\xi) d\xi,[/tex]

    wich is the solution of the ode in implicit form.
  8. Jun 20, 2009 #7
    This is one reason why I hate the way that many introductions to calculus encourage sloppy interpretations of the symbols [tex]dx[/tex] and [tex]dy[/tex] and so forth. It leads to much confusion when one tries to actually prove the change of variables theorem; it leads to confusion in solving separable ODEs; and it leads to confusion if one still hasn't figured it out by the time one studies calculus on manifolds.

    In my opinion, which may be somewhat rare, the differential symbols [tex]dx[/tex] and so on should simply not be used ever in introductory calculus and differential equations except to form the symbol [tex]d/dx[/tex] for derivatives. The reason is simply that this would avoid many sources of confusion, such as the one that prompted this thread, and it would make the transition to calculus on manifolds less annoying, which is often the first time that these symbols are given actual meanings.

    In the case of separable first-order ODEs, the general first-order equation is

    \frac{dy}{dx} = f(x,y)

    Any such equation can be rewritten in the form

    M(x,y) + N(x,y) \frac{dy}{dx} = 0

    Choose, for example, [tex]M = -f(x,y)[/tex] and [tex]N = 1[/tex]. However, if [tex]M[/tex] and [tex]N[/tex] turn out to be functions of only x and y, respectively, then we obtain

    M(x) + N(y)\frac{dy}{dx} = 0

    Now suppose that [tex]A[/tex] and [tex]B[/tex] are any antiderivatives of [tex]M[/tex] and [tex]N[/tex]. Then the equation is

    A'(x) + B'(y) \frac{dy}{dx} = 0

    By the chain rule,

    B'(y) \frac{dy}{dx} = \frac{d}{dx} B(y)

    Thus, the equation can be written as

    \frac{d}{dx} (A(x) + B(y)) = 0

    Integrating yields the implicit solution

    A(x) + B(y) = c
    Last edited: Jun 20, 2009
  9. Jun 22, 2009 #8
    thanks a lot for the description of the theory behind the method of separable ODE's zpconn, much appreciated.
  10. Jun 29, 2009 #9
    I don't understand why it is so difficult to understand the statement.

    Is the statement incorrect? Attempt to elaborate it further makes life more difficult.
  11. Jul 1, 2009 #10
    Is not exactly incorrect, but is an abuse of notation (as we say in my country).
  12. Jul 1, 2009 #11
    Um, which country would that be? (just curious . . . I know, I know, curiosity killed the cat :> *bites tongue*)
    I think in my country they say something like that too :P
  13. Jul 1, 2009 #12
    Well, as [itex]y = y(x)[/itex], then

    [tex]dy = \frac{dy}{dx} dx,[/tex]


    \int y^2 dy=\int y^2(x) y'(x) dx = \int \frac{d}{dx} \left(\frac{y^3(x)}{3}\right) dx = \frac{y^3(x)}{3} + C
  14. Jul 3, 2009 #13
    Oh it is the abuse of notation. Did you meant

    y2 dy = (x+1) dx ?

    I hate Machiavellian ( you know The End Justifies The Means). But I think I can tolerate this one. It is not a sin to be hypocrite in mathematics. :approve:
  15. Jul 3, 2009 #14
    Thats right, because if you don't specify what are x and y, then that equality is ambiguous (in the context of the ode you want to solve).

    P.S. You can also see separation of variables as an example of the implicit function theorem.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook