## YAKC: Differential (One) Forms

In my previous post in this series, I introduced the idea of a derivative, and we realized a number of rules regarding them. In this post, we’re going to give some thought as to what derivatives are, look at them from from a rather different perspective, and realize several more rules regarding them.

When we talk about rates, we mean ratios. Think about the units of the examples we’ve used so far. Meters per second. Gallons per second. Movie seconds per real seconds…

If Bob was to tell you that he traveled 100 meters in 2 minutes, you’d be able to tell me that, on average, he was moving at 50 meters a minute or about 0.83 meters a second. So walking speed. But he might have ran for the first 50 seconds at 2m/s and then stood still for the remainder! The derivative is different from the average rate in that it is instantaneous. It’s how fast Bob’s going at a give point in time! To get this we take the value we get as we shrink the range we’re averaging around.

Now we traditionally represent change in a variable $x$ as $\Delta x$. For example, change in distance is represented $\Delta s$, change in time $\Delta t$ and so on. So average speed is $\Delta s/\Delta t$. Since the derivative is the tiny instantaneous changes being divided, we write it as $ds/dt$.

We can say that mathematically: the derivative of $y(x)$ with respect to $x$, $dy(x)/dx$ is:

$\frac{dy(x)}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y _{\Delta x}}{ \Delta x} = \lim_{\Delta x \to 0} \frac{y(x+\Delta x) - y(x) }{ \Delta x}$

(h always seemed like a silly variable to use here :) )

The lim part is a limit. They allow us to look at the value as some variable goes to a certain value. In this case, it just means “look at what happens as $\Delta x$ becomes small.”

A lot can be said about limits. They’re closely tied to the idea of continuity and are very important in analysis, which is the area of higher mathematics that is built around calculus, providing its foundations and extending it in many interesting ways.

But I don’t think it makes sense to talk about limits at an introductory level. (In particular, I don’t think that it makes sense to talk about limits if you aren’t going to use the words epsilon’ and delta’.) So I’ll leave the topic here.

Instead, suppose the derivative of y(x) with respect to x is described by a function f(x). So, $\frac{dy(x)}{dx} = f(x)$. But we could rewrite that as:

$dy(x) = f(x)dx$

Meaning that the change in $y$ at $x$ is the value of $f(x)$ times the tiny change in $x$. This is called a differential form. Let’s express the rules we’ve come up with in this manner:

Sum rule: $d(a+b) = da + db$

Difference rule: $d(a-b) = da - db$

Chain rule: $df(g(x)) = \frac{df(g(x))}{dg(x)}dg(x)$

Constant Multiple Rule: $d(af(x))$ = $adf(x)$

Constant rule: $dk = 0$

Trigonometric Derivatives: $d\sin(x) = \cos(x)dx; ~ d\cos(x) = -\sin(x)dx$

That may seem a bit cumbersome, but it is actually very nice to work with. As an example, lets determine $d(3\sin(2x)+x)$

By sum rule: $d(3\sin(2x)+x) = d3\sin(2x)+dx$

By constant multiple rule: $d3\sin(2x)+dx = 3d\sin(2x)+dx$

By chain rule and the trigonometric derivative identity: $3d\sin(2x)+dx = 3\cos(2x)d2x+dx$

And by constant multiple rule again: $3d\sin(2x)+dx = 6\cos(2x)dx+dx$

Yay! And if we divide by $dx$, we get the derivative (instead of the differential), $6\cos(2x)+1$.

Now let’s get back to our “derivative rules” from the differential form perspective.

We can imagine variable $a$ as a line and the differential $da$ as a dot on the end:

Consider sum rule.We can visualize it as:

The little change in $a$ and $b$ is the sum of their changes, as seen by moving the dots.

In general, you can visualize the differential of a function by imagine that function with the input pushed forward by a dot (representing the differential) and then subtracting the function without the dot.

Let’s consider $uv$:

So, $duv = udv + vdu$.

What about division? Let $u = \frac{a}{v}$. Then

$d\frac{a}{v}v = \frac{a}{v}dv + vd\frac{a}{v}$

$da - \frac{a}{v}dv = vd\frac{a}{v}$

$\frac{da}{v} - \frac{adv}{v^2} = d\frac{a}{v}$

$d\frac{u}{v} = \frac{vdu - udv}{v^2}$

Now, going back to product rule ($duv = udv+vdu$), if you consider the scenario where both $u$ and $v$ are $x$, it is clear that $dx^2 = 2xdx$, but similar results work in higher dimensions:

The obvious generalization is power rule: $dx^n = nx^{n-1}dx$

Now the final “traditional rule” is the fact that the derivative of $e^x$ is itself. Let’s step back for a second.

Imagine a function that is 1 at 0 and is its own derivative. If you walk backwards, you approach but never touch 0, because the derivative goes to 0 as the function does. On the other hand, the function gets steeper and stepper going forward. If you know what $e^x$ looks like, you know it looks similar to this.

And in fact, lets consider an intuitive example of something that decreases at a rate proportional to itself: the decay of radioactive elements. We all know that they have a half-life, a period of time in which half of the will decay. It is clear the derivative is a negative multiple of the present value, $\frac{dy}{dx} = -kx$, since the number you loose is proportional to the number you have.  And if you think about it in terms of half-life, you realize that half life is an exponential function, something of the form $b^x$.

But it is very difficult to see that the base of the exponential that is its own derivative is e. I recommend just accepting that as the definition of $e$, or perhaps even the function $e^x$. Still, if you want to convince yourself of it, consider $e^x$ as $e^x =\lim_{n \to \infty} \left(1+\frac{x}{n}\right)^n$; from here you can apply an argument similar to the one for power rule.

And that’s it! We’re done with derivatives. That’s the content of half a course in Calculus, right there! Let’s do an example of it: calculate $d(1+e^x)^2$. Try and do it by yourself, with out looking at the solution! Feel free to look back at the rules.

First we apply “power rule”, $dx^n = nx^{n-1}dx$ (and also chain rule):

$d(1+e^x)^2 = 2(1+e^x)^{2-1}d(1+e^x)$

Now by sum rule:

$d(1+e^x)^2 = 2(1+e^x)^{2-1}(d1+de^x)$

Then by constant rule

$d(1+e^x)^2 = 2(1+e^x)^{2-1}(0+de^x)$

Now let’s take a minute to simplify

$d(1+e^x)^2 = 2(1+e^x)de^x$

And since the derivative of the exponential function is itself:

$d(1+e^x)^2 = 2(1+e^x)e^xdx$

And we’re done!

In the next post in this series, we’ll talk about doing the opposite of differentiation: integration.

I’m really not happy with how I handled exponentials, but I think otherwise this post was pretty good.

### 3 Responses to “YAKC: Differential (One) Forms”

1. Ethan Jaffe Says:

+1 for using Δx instead of h. Makes much more sense. I’m interested in how you’re going to treat p-forms and (general) Stoke’s theorem. If you stick to R_3, things may be ok but how are you going to treat general calculus on manifolds?

2. Vitalik Buterin Says:

Great, we’ve independently thought up of the exact same way of showing the derivative of squares and cubes geometrically!

For exponential functions, the definition of an exponential function is that f(x + k) = cf(x) – an additive increment in x causes a multiplicative increase in f(x). Consider multiplying rabbits: year 1, you have 100 rabbits. Year 2 (simplifying here and making rabbits immortal and instantly adult for the sake of example) each rabbit pair has 2 children (ie. 1 child per rabbit), so 100 rabbits get added and you have 200 rabbits. Year three, add 200, get 400. The pattern is that the rate of growth is clearly a multiple of the population itself (in our case 1x, for dogs we might make it 0.1x), and an increment of 1 year doubles the population (or, in dogs, increases it by 1.1x).

• christopherolah Says:

Great minds think a like!

That’s a really good explanation for the exponential function. I think I’ll update the post and add it when I have a bit more time.