How to solve this differential equation?

How would you solve the differential equation

B'(x) = e^x B(x)

with the initial condition B(0) = 1? I know what the answer is supposed to be, but I don’t know how to directly solve it.

In case you’re wondering, B(x) is the exponential generating function for the Bell numbers, which count set partitions. The differential equation in question arises from noting that

\displaystyle B_{n+1} = \sum_{k=0}^n \binom n k B_{n-k}

(to make a partition of \{1, \dots, n+1\}, you can put anywhere from k = 0 to n elements in the same set with n+1; there are \binom n k ways to choose the k elements to include, and B_{n-k} ways to partition the rest).


About Brent

Associate Professor of Computer Science at Hendrix College. Functional programmer, mathematician, teacher, pianist, follower of Jesus.
This entry was posted in combinatorics, math and tagged , , , , . Bookmark the permalink.

15 Responses to How to solve this differential equation?

  1. Mark Dominus says:

    Doesn’t B(x) = c * exp(exp(x)) solve the equation, and then satisfying the initial condition is simple, you take c = 1/e? Or did I make some ridiculously simple error?

    • Brent says:

      Yes, that is the correct solution, but how did you arrive at it? Did you just stare at the equation and c * exp(exp(x)) popped into your head? I’m looking for a general method whereby one could solve this equation without having a magical flash of inspiration.

  2. zygoloid says:

    Substitute y = e^x.
    Then dy/dx = e^x = y.

    dB/dx = e^x B = y B
    => dB/dy = dB/dx * dx/dy = y B * dx/dy = B
    => B = k e^y = k e^(e^x)

    B|x=0 = 1 => k = 1 => B = e^(e^x).

  3. Xaositect says:

    B’ = e^x B
    \frac{B’}{B} = e^x
    (\ln B)’ = e^x
    \ln B = e^x + c
    B = C e^{e^x}
    B(0) = Ce => C = \frac{1}{e}

  4. zygoloid says:

    D’oh. Of course, I meant k = 1/e. B = e^(e^x – 1).

  5. Brent says:

    Ah! Thanks, I knew it was probably easy. I’ve forgotten way too much continuous math…

  6. Gregory Wright says:

    You already know how to solve this equation, but it is perhaps the presentation is slightly unusual. Divide both sides by B to get

    d log B / dx = e^x

    You can do this integral immediately. Looking at the
    solution you’ll be able to verify that division by B
    was justified (no singularities). The solution is

    log B = e^x + C

  7. Pseudonym says:

    The way I would have solved it is using Gregory Wright’s approach. I usually remember it this way:

    ∫ f’/f dx = log f

  8. jonas says:

    Can’t you use that general formula for single-variable linear ODEs? The one with the exp of an integral.

  9. Pingback: Solving a System Equation | Engineer Sphere

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.