Q: Is there such a thing as half a derivative?

The original question was: Another one of those questions of the type “does this make sense”.  You have first derivatives and second derivatives.  f'(x), f”(x) or sometimes dy/dx and d^2y/dx^2. Is there any sensible definition of a something like a “half” derivative, or more generally an nth derivative for a non-integer n?

Physicist: There is!  For readers not already familiar with first year calculus, this post will be a lot of non-sense.

Strictly speaking, the derivative only makes sense in integer increments.  But that’s never stopped mathematicians from generalizing.  Heck, non-integer exponentiation doesn’t make much sense (I mean, 23.5 is “2 times itself three and a half times”.  What is that?), but with a little effort we can move past that.

The derivative of a function is the slope at every point along that function, and it tells you how fast that function is changing.  The “2nd derivative” is the derivative of the derivative, and it tells you how fast the slope is changing.

f(x) is a parabola.  f'(x) describes the fact that as you move to the right the parabola's slope increases.  Notice that a negative slope means "down hill".  f''(x) describes

f(x) is a parabola. f'(x) describes the fact that as you move to the right the parabola’s slope increases. Notice that a negative slope means “down hill”. f”(x) describes the slope of f'(x), which is constant.

When you want to generalize something like this to you basically need to “connect the dots” between those cases where the math actually makes sense.  For something like exponentiation by not-integers there’s a “correct” answer.  For not-integer derivatives there really isn’t.  One way is to use Fourier Transforms.  Another is to use Laplace Transforms.  Neither of these is ideal.  Just to be clear: non-integral derivatives are nothing more than a matter of choosing “what works” from a fairly short list of options that aren’t terrible.

It turns out (as used in both of those examples) that integrals are a great way of “connecting dots”.  When you integrate a function the result is more continuous and more smooth.  In order to get something out that’s discontinuous at a given point, the function you put in needs to be infinitely nasty at that point (technically, it has to be so nasty it’s not even a function).  So, integrals are a quick way of “connecting the dots”.

To get the idea, take a look at N!.  That excited looking N is “N factorial” and it’s defined as N!=1\cdot2\cdot3\cdots(N-1)\cdot N.  For example, 3!=1\cdot2\cdot3=6.  Clearly, it doesn’t make a lot of sense to write “3.5!” or, even worse, “π!”.  And yet there’s a cute way to smoothly connect the dots between 3! and 4!.

Gamma(x+1) is a fairly natural way of generalizing x! to non-natural numbers.

Γ(N+1) is a fairly natural way of generalizing N! to non-natural numbers.  The dotted lines correspond to 1!=1, 2!=2, and 3!=6.

The Gamma function, Γ(N),  (not to be confused with the gamma factor) is defined as: \Gamma(N+1) = \int_0^\infty t^{N} e^{-t}\,dt.  Before you ask, I don’t know why Euler decided to use “N+1” instead of “N”.  Sometimes decent-enough folk have good reasons for doing confusing things.  If you do a quick integration by parts, a pattern emerges:

\begin{array}{ll}\Gamma(N+1)\\[2mm]= \int_0^\infty t^{N} e^{-t}\,dt \\[2mm]=\left[-t^Ne^{-t}\right]_0^\infty + N\int_0^\infty t^{N-1} e^{-t}\,dt \\[2mm]=N\int_0^\infty t^{N-1} e^{-t}\,dt \\[2mm]=N\Gamma(N)\end{array}

So, Γ(N+1) has the same defining property that N! has: \Gamma(N+1) = N\cdot \Gamma(N) and N! = N\cdot (N-1)!.  Even better, \Gamma(1) = \int_0^\infty e^{-t}\,dt=-e^{-t}\big|_0^\infty = 0-(-1)=1, which is the other defining property of N!, 0!=1.  We now have a bizarre new way of writing N!.  For all natural numbers N, N! = Γ(N+1).  Unlike N!, which only makes sense for natural numbers, Γ(N+1) works for any positive real number since you can plug in whatever positive N you like into \int_0^\infty t^{N} e^{-t}\,dt.

Even better, this formulation is “analytic” which means it not only works for any positive real number, but (using analytic continuation) works for any complex number as well (with the exception of those poles at each negative integer where it jumps to infinity).

|Γ(N)|, where N can now take values in the complex plane.  The smooth area on the right corresponds to

|Γ(N)|, where N can now take values in the complex plane.

Long story short, with that integral formulation you can connect the dots between the integer values of N (where N! makes sense) to figure out the values between (where N! doesn’t make sense).

So, here comes a pretty decent way to talk about fractional derivatives: fractional integrals.

If “f ‘(x)=f(1)(x)” is the derivative of f, “f(N)(x)” is the Nth derivative of f, and “f(-1)(x)” is the anti-derivative, then by the fundamental theorem of calculus f^{(-1)}(x) = \int_0^x f(t)\,dt.  It turns out that f^{(-N)}(x)=\frac{1}{(N-1)!}\int_0^x (x-t)^{N-1}f(t)\,dt.  x-t runs over strictly positive values, so there’s no issue with non-integer powers, and it just so happens that we already have a cute way of dealing with non-integer factorials, so we may as well deal with that factorial cutely: f^{(-N)}(x)=\frac{1}{\Gamma(N)}\int_0^x (x-t)^{N-1}f(t)\,dt.

Holy crap!  We now have a way to describe fractional integrals that works pretty generally.  Finally, and this is very round-about, but it turns out that a really good way to do half a derivative is to do half an integral and then do a full derivative of the result:

f^{\left(\frac{1}{2}\right)}(x)=\frac{d}{dx}f^{\left(-\frac{1}{2}\right)}(x)=\frac{d}{dx}\left[\frac{1}{\Gamma\left(\frac{1}{2}\right)}\int_0^x (x-t)^{-\frac{1}{2}}f(t)\,dt\right]=\frac{d}{dx}\left[\frac{1}{\sqrt{\pi}}\int_0^x \frac{1}{\sqrt{x-t}}f(t)\,dt\right]

That “root pi” is just another math thing.  If you want to do, say, a third of a derivative, then you can first find f(-2/3)(x) and then differentiate that.  This isn’t the “correct” way to do fractional derivatives, just something that works while satisfying a short wishlist of properties and re-creating regular derivatives without making a big deal about it.

Answer Gravy: You can show that f^{(-N)}(x)=\frac{1}{(N-1)!}\int_0^x (x-t)^{N-1}f(t)\,dt (or even better, f^{(-N)}(x)=\frac{1}{\Gamma(N)}\int_0^x (x-t)^{N-1}f(t)\,dt) through induction.  The base case is f^{(-1)}(x)=\frac{1}{(1-1)!}\int_0^x (x-t)^{1-1}f(t)\,dt=\int_0^x f(t)\,dt.  This is true by the fundamental theorem of calculus, which says that the anti-derivative (the “-1” derivative) is just the integral.  So… check.

To show the equation in general, you demonstrate the (N+1)th case using the Nth case.

\begin{array}{ll}  f^{(-N-1)}(x)\\[2mm]    =\int_0^x f^{(-N)}(t)\,dt \\[2mm]  = \int_0^x \frac{1}{\Gamma(N)}\int_0^t (t-u)^{N-1}f(u) \,du\,dt \\[2mm]    = \frac{1}{\Gamma(N)}\int_0^x \int_0^t (t-u)^{N-1}f(u) \,du\,dt \\[2mm]  = \frac{1}{\Gamma(N)}\int_0^x \int_u^x (t-u)^{N-1}f(u) \,dt\,du \\[2mm]    = \frac{1}{\Gamma(N)}\int_0^x f(u)\int_u^x (t-u)^{N-1} \,dt\,du \\[2mm]    = \frac{1}{\Gamma(N)}\int_0^x f(u)\left[\frac{1}{N}(t-u)^{N}\right]_u^x\,du \\[2mm]    = \frac{1}{\Gamma(N)}\int_0^x f(u)\frac{1}{N}(x-u)^{N}\,du \\[2mm]    = \frac{1}{\Gamma(N+1)}\int_0^x f(u) (x-u)^{N}\,du \\[2mm]  \end{array}

Huzzah!  Using the formula for f(-N)(x) we get the formula for f(-N-1)(x).

There’s a subtlety that goes by really quick between the fourth and fifth lines.  When you switch the order of integration (dudt to dtdu) it messes up the limits.  Far and away the best way to deal with this is to draw a picture.  At first, for a given value of t, we integrate u from zero to t, and then integrating t from zero to x.  When switching the order we need to make sure we’re looking at the same region.  So for a given value of u, we integrate t from u to x and then integrate u from zero to x.

You can either

Integrating over the same region in two different orders.

So that’s what happened there.

This entry was posted in -- By the Physicist, Conventions, Equations, Math. Bookmark the permalink.

13 Responses to Q: Is there such a thing as half a derivative?

  1. Flavian Pop says:

    Thanks for the amazing explanations you gave, especially for the changing in order of du with dt! At first I got scared because my calculus memories are a bit rusty, but thanks Goodness I had the motivation to read all your article. Now thanks to you I understand multiple integral calculus and even this new concept of half derivatives much much better! A great week to you!

  2. The Physicist The Physicist says:

    @Flavian Pop
    Thanks kindly! I wasn’t sure anyone would get to the bottom of this one.

  3. XIAO Qi says:

    I wonder why Fourier and Laplace transforms were dismissed very early on? It is very tempting to generalize the the differentiation property to non-integer n and do a inverse transform to get any non-integer derivative. For instance, I would imagine that f^(1/2) = L^{-1}( sqrt(s) L(f) ). Is there a particular difficulty in doing the integral?

  4. scribu says:

    I also feel that I got a deeper understanding of derivatives and integrals after reading this. I also liked all the links to other interesting mathematical concepts. So thanks!

  5. Ismail says:

    This reminded me of doing vector calculus at uni. Good post, approachable maths with a bit of uni knowledge and some time to understand the maths here.

  6. Spirographer says:

    Thanks for the remarkably clear presentation. When I learned about the gamma function in high school I was blown away. It is fitting that it would play a prominent role in the definition of non integral derivatives, but I never even gave it any thought until I saw this post!

  7. Kshitij says:

    Feynman played with the following definition of a half-derivative: let D represent the derivative operator, so that D(f(x)) is f'(x).

    Then, the half-derivative operator H is such that H(H(f)) = D(f(x)) ie. the half-derivative should be something that you do twice to a function to get the regular derivative.

    Note that this is a wishlist property that may or may not be satisfied by any particular formulation of the half-derivative.

  8. Philipp Marek says:

    Could you please show a few graphics of half- and 2/3 derivatives? Eg of sin(), x^2 and sqrt(), perhaps along with the function and the first derivative, so that we can get a feeling or at least see that “in action”.

    Thanks a lot!

  9. Quais Taraki says:

    Great work! Now to find out why Euler chose to express Gamma functions with N+1 as the parameter for the function!

  10. David says:

    XIAO Qi: That’s a perfectly valid way of defining a fractional derivative. There’s a whole theory built up around the notion, actually. You should look up Sobolev spaces. They’re very useful in the study of existence and uniqueness of solutions to partial differential equations

  11. stefan says:

    In a similar vein, I was wondering how to integrate over integers. For example, the integral of |xdx from 10 to 0 calculates the area under the curve as a continuous function. What if I wanted to know the area under the curve just for the integers? or just for the even numbers? or (for extra credit) just for the primes?

  12. Eugen says:

    The N+1 in the Gamma function arises from a natural choice of measures on (0,infty). The measure dt is not the ‘right’ one, better is dt/t, which is invariant under multiplication (look up Haar measures).

  13. Marshall says:

    Stefan: Seeing as those are distinct sets integration would reduce to summation and there is no notion of area under a countable set of points. Still, certainly one can take sums over integers, evens, or even primed for the comparable notion.

    Great post, especially the introduction of the gamma function and hints to its usefulness.

Leave a Reply

Your email address will not be published. Required fields are marked *