Built on Facts

Sunday Function

Sine, cosine, and tangent are of course the workhorse functions of trigonometry. You learn ‘em in high school, and if you go on in math and science you never stop using them. Now on many occasions you might have the sine or cosine or tangent of some angle, and you want a way to invert those functions to recover the angle from those values. Let’s take a look at the inverse tangent function:


Now we’ll do one of those things were we skip any motivation and just do some stuff for reasons we’ll get to at the end. Let’s find the derivative of the arctangent function. To start, take the tangent of both sides of the above definition. The tangent undoes the arctangent, so we get:


Differentiate both sides. The derivative of tangent is secant squared, which we could prove if we felt like it, and since f is a function we have to use the chain rule. Doing thus, and recalling that the derivative of x is 1:


Solve for the derivative:


Which isn’t all that helpful except for the fact that there’s a basic trig identity which connects the secant and tangent functions: sec(x)^2 – tan(x)^2 = 1. Substituting:


Ah! But tangent(f) is x, so we can swap that in:


Ok, ok. What’s that good for? Well, if just write that down as our Sunday Function and graph it, we’ll have something to celebrate:


That is the graph of a function, 1/(1+x^2), which has nothing at all to do with circles or geometry in any obvious way. But we know it’s the derivative of the inverse tangent, and conversely the inverse tangent is the integral of that function, so we can easily plug in and see that the area under the curve is pi. Which is nice, because to day is Pi Day. Happy Pi Day!


  1. #1 Nachiket Gokhale
    March 14, 2010

    Which leads to an elegant series for (pi/4) …since

    f = arctan(x) = \int\frac{1}{1+x^2} = \int {1-x^2 + x^4 – x^6 +..}= x – x^/3 + x^5/5 – x^7/7 + …

    Using x=1

    (pi/4) = 1 – (1/3) + (1/5) – (1/7) + (1/9) + …

    I was amazed when I read about this many years ago, its pretty (I’m not sure if the math is technically correct – integrating infinite series etc).

  2. #2 csrster
    March 15, 2010

    This function is (an example of) the Lorentzian function or Cauchy-Lorentz distribution. Its shape is characteristic of the power spectrum of many forms of randomly excited and damped oscillators.

  3. #3 Keith Griffiths
    March 15, 2010

    This must sound like a naive question but it seems that quite different functions can be differentiated. What are we trying to do when we differentiate a function?

  4. #4 Gerry
    March 15, 2010

    It is interesting to note that arc tan can play an important role in the calculator implementation of all kinds of functions. See Chapter 9 on CORDIC in my book Inside Your Calculator.

  5. #5 ColonelFazackerley
    March 17, 2010

    Just tried that in GNU Octave (like Matlab, but libre)

    > quad(inline(“1/(1+x.^2)”),-Inf,Inf)
    ans = 3.1416


  6. #6 Kaleberg
    March 17, 2010

    This a particularly charming post for pi day.

    Keith Griffiths: When you differentiate a function you are finding a function that tells you the slope of the original function at each point. So, a straight line y=mx+b has a slope of m. It’s trickier for curved functions like arctan, but you can see from the plot in this post, at x=0, the slope of arctan is 1, and the slope gets shallower as x gets larger eventually approaching zero.

  7. #7 Arjen Dijksman
    April 5, 2010

    Nice function. This post made me wonder what the function 1/(1+x²) had to do with the circle.

The site is currently under maintenance. New comments have been disabled during this time, please check back soon.