Skip to content

Velocity equals position

Level: 201 · for anyone who has read the derivative is a velocity

One line: Start a point at 1 and let it always move with velocity equal to its position: where it is at time t is e^t, e is where it is at time 1, and the law e^(a+b) = eᵃ · eᵇ, the talk's "double" and its "flip and squish" all come out of that one rule.

The talk's first rule

The talk writes one equation in a box and draws it:

d/dt e^t  =  e^t          e⁰ = 1
velocity     position

In words: a point starts at 1, and at every moment its velocity is equal to its position. At 1 it moves at speed 1, at 2 at speed 2, at 10 at speed 10, so it runs away faster the farther it gets. That rule, and the starting point, are the whole definition of e^t. No base, no exponent, no multiplying e by itself: e^t is where the point is at time t, and the number e is where it is at time 1.

What the program prints

Verified output of velocity_equals_position.py — regenerated by tools/run_examples.py, never hand-typed.

1. START AT 1, AND ALWAYS MOVE AS FAST AS YOUR POSITION
   Over a short time dt the point moves by velocity . dt = position . dt,
   so each step multiplies the position by (1 + dt). Steps of 1/n up
   to t = 1 multiply 1 by (1 + 1/n), n times:
           1 steps   position 2          = 2.000000
           2 steps   position 9/4        = 2.250000
           3 steps   position 64/27      = 2.370370
           4 steps   position 625/256    = 2.441406
          10 steps   position            = 2.593742
         100 steps   position            = 2.704814
        1000 steps   position            = 2.716924
      100000 steps   position            = 2.718268
           e                             = 2.718282
   The steps are compounding, (1 + 1/n)^n, and they settle on e: e is
   where the point is at time 1. Its position at time t is called e^t.

2. THE POSITION AT OTHER TIMES
     t      10^5 steps     e^t, from math.exp
     0.0    1.000000       1.000000
     0.5    1.648719       1.648721
     1.0    2.718268       2.718282
     2.0    7.388908       7.389056
     -1.0   0.367878       0.367879
   At t = 0 the point has not moved: e^0 = 1. For t = -1 the steps run
   backwards in time and the point is at 1/e.

3. MEASURED: THE VELOCITY OF e^t IS e^t
   The average velocity over [t, t + 0.000001], and the position:
     t      velocity     position     velocity / position
     0.0    1.000000     1.000000     1.000000
     1.0    2.718283     2.718282     1.000000
     2.0    7.389060     7.389056     1.000001
     3.0    20.085547    20.085537    1.000001
   d/dt e^t = e^t. That is the whole definition, with e^0 = 1.

4. THE LAW OF EXPONENTS, FROM THE MOTION
   Every step multiplies the position by the same factor, wherever the
   point is, so a start twice as far gives a position twice as far at
   every time. Run for a time a, and the point is at e^a. The rest of
   the motion is the motion from 1, scaled by e^a, so after a further
   time b it is at e^a . e^b. It has run for a + b: e^(a+b) = e^a . e^b.
   Exactly, in steps of 1/10: 8 steps from 1 reach 214358881/100000000,
   3 steps then 5 more reach 214358881/100000000: equal: True.
   With math.exp: e^0.3 . e^0.5 = 2.225541, e^0.8 = 2.225541.
   Adding times multiplies positions. That is why e^x can be given
   inputs that are not whole numbers, and, in the complex-numbers
   chapter, inputs that are not real.

5. VELOCITY = k . POSITION: DOUBLE, OR FLIP AND SQUISH
   Let the velocity be k times the position. The motion is the same
   motion with the clock running k times as fast, so its position at
   time t is e^(kt), and every velocity is k times as large:
     k      t      position e^(kt)   measured velocity   velocity / position
     2      0.29   1.786038          3.572080            2.000002
     2      1.00   7.389056          14.778127           2.000002
     -0.5   0.60   0.740818          -0.370409           -0.500000
     -0.5   2.00   0.367879          -0.183940           -0.500000
   k = 2 doubles the velocity: the point runs away twice as fast. k = -0.5
   flips the velocity to point back toward 0 and squishes it to half the
   position: the point creeps toward 0 and never reaches it. The factor
   k in d/dt e^(kt) = k e^(kt) is the chain rule: speeding up the clock
   by k multiplies every velocity by k.

e is where the motion is at time 1

Section 1 moves the point by stepping with its velocity. Over a short time dt it moves by velocity · dt, which is position · dt, so each step multiplies the position by (1 + dt). Steps of 1/n from time 0 to time 1 multiply 1 by (1 + 1/n), n times: 2, 9/4, 64/27, 625/256, and then, in floats, 2.5937, 2.7048, 2.7169 and 2.71827, heading for e = 2.71828. The steps are exactly compound interest, (1 + 1/n)ⁿ, which is how Euler's identity and the precalculus reading guide's money example meet e. Money that earns interest at a rate equal to itself is a point whose velocity is its position.

Section 2 steps to other times: e^0.5 = 1.6487, e² = 7.389, and for t = −1 the steps run backwards to 1/e. At t = 0 the point has not moved, which is why e⁰ = 1 needs no argument here. Section 3 measures the velocity of math.exp directly, as an average over a millionth of a unit of time, and finds it equal to the position to six places at t = 0, 1, 2 and 3.

The law of exponents, from the motion

Every step multiplies the position by the same factor (1 + dt), wherever the point is. So a point started twice as far out is twice as far out at every later time: the motion scales. Section 4 turns that into the law of exponents:

Run the motion from 1 for a time a, and the point is at eᵃ. The rest of its motion is the motion from 1, scaled by eᵃ, so after a further time b it is at eᵃ · eᵇ. But it has run for a + b in all, so it is at e^(a+b). Therefore e^(a+b) = eᵃ · eᵇ.

The program checks it exactly on steps of 1/10, where eight steps from 1 and three steps followed by five more both give 1.1⁸ = 214358881/100000000, and with math.exp, where e^0.3 · e^0.5 and e^0.8 agree. Adding times multiplies positions. That is the law maps that keep the laws found in the logarithm, run the other way, and it is the only law of exponents Euler's identity needs. It is also why the motion, unlike "e multiplied by itself t times", makes sense for any t at all.

Double, or flip and squish

The talk's next slides change the rule: velocity = 2 · position, labelled Double, then velocity = −0.5 · position, labelled Flip and squish. The solution of velocity = k · position starting at 1 is e^(kt), and the reason is short: it is the same motion with the clock running k times as fast. At time t the fast clock reads kt, so the point is at e^(kt); and a clock k times as fast makes every velocity k times as large, so

d/dt e^(kt)  =  k · e^(kt)

That factor k is the chain rule, in the one case the talk needs: speeding up the clock by k multiplies every velocity by k. Section 5 measures it. For k = 2 the velocity is twice the position, at t = 0.29 where the talk stops at e^(2·0.29) = 1.786. For k = −0.5 the velocity points back toward 0 and is half as long as the position, so the point creeps toward 0 and never reaches it: e^(−0.5·0.60) = 0.741, the talk's 0.74….

The talk's last case is k = i: velocity = i · position, the position turned 90°. A velocity at right angles to the position cannot move the point toward 0 or away from it, only round it, and that is Euler's identity. It needs multiplication rotates to say what "i times an arrow" means, and radians to say how far round the point has gone.

Run it yourself

From the root of your clone of this repository:

python3 09_Calculus/velocity_equals_position/examples/velocity_equals_position.py

Po polsku, w skrócie

Punkt startuje z 1 i w każdej chwili porusza się z prędkością równą swojemu położeniu: w 1 z prędkością 1, w 2 z prędkością 2. To jest cała definicja e^t: e^t to miejsce, w którym punkt jest w chwili t, a liczba e to miejsce w chwili 1. Nie trzeba mnożyć e przez siebie t razy. Mały krok ruchu mnoży położenie przez (1 + dt), więc kroki co 1/n dają (1 + 1/n)ⁿ, procent składany, który dąży do e = 2,71828.

Każdy krok mnoży przez ten sam czynnik bez względu na to, gdzie jest punkt, więc ruch zaczęty dwa razy dalej jest w każdej chwili dwa razy dalej. Stąd prawo potęg: po czasie a punkt jest w eᵃ, reszta ruchu to ruch z 1 przeskalowany przez eᵃ, więc po dalszym czasie b jest w eᵃ · eᵇ, a razem minęło a + b. Prędkość k razy położenie to ten sam ruch na zegarze chodzącym k razy szybciej: e^(kt), a pochodna ma czynnik k (reguła łańcuchowa). k = 2 podwaja, k = −0,5 odwraca i ściska, a k = i obraca o 90° i prowadzi po okręgu, do tożsamości Eulera.

Auf Deutsch: Stichwörter

Die Bewegung, deren Geschwindigkeit ihr Ort ist, ist eˣ; die Zahl e und das Potenzgesetz e^{a+b} = eᵃ·eᵇ folgen aus der einen Regel.

Stichwörter: Exponentialfunktion, eulersche Zahl e, Differentialgleichung y′ = y, stetige Verzinsung, Euler-Verfahren, Potenzgesetz, Wachstum.

See also