I read this quote attributed to VI Arnold.

"Who can't calculate the average value of the one hundredth power of the sine function within five minutes, doesn't understand mathematics - even if he studied supermanifolds, non-standard calculus or embedding theorems."

EDIT Source is "A mathematical trivium" A book of 100 problems that university students "should be able to solve". The statement asks for calculation within 10% accuracy.

So the average value over the entire domain should be the same as the average value over $[0,\pi/2]$

$$\langle\sin^{100} (x)\rangle= \frac{\int_0^{\pi/2} \sin^{100}(x) dx}{\int_0^{\pi/2} dx}.$$

So here's what I did:

First, this graph would be a train of highly sharp peaks. The integrand would assume values close to zero a up till before it sharply rises to 1.

So up till some $\epsilon \in [0,\pi/2]$ we will have $\sin x \approx x$ and for the remaining $\pi/2 - \epsilon$ interval I could find the area of triangle with base $\pi/2 - \epsilon$ and height $1$

$$\langle \sin^{100} (x)\rangle \approx \frac{2}{\pi} \left(\int_0^\epsilon x^{100} dx + .5 (\frac{\pi}{2}-\epsilon)\right).$$

I believe in principal it should be possible to find an $\epsilon$ such that the above expression yields the exact answer. So I try to approximate it, no good. Then I try mathematica and it is looking like there is no $\epsilon$ for which the value I am expecting is even close to the actual value. I plot the original and find that my approximation is hopeless.

Not to mention that my 5 minutes were over. So I admit I do not understand mathematics and humbly ask if someone could:

  1. Point out my mistake (Other than that $\epsilon$ is probably incomputable within 5 mins)
  2. How the hell is this done in 5 minutes?enter image description here

The picture below has the $\sin^{100} x$ in blue (bottom) and my approximation of it plotted against $\epsilon$ (pink). Although there is no reason for them to be together, the upper graph has a minima quite above the exact value of the integral.

EDIT Just realized

Let $$u=\cos x.$$

$$\int_0^{\pi/2} \sin^{100}(x) dx = \int_0^1 (1-u^2)^{99/2}du\approx \int_0^1 \left(1 - \frac{99}{2} u^2\right) du $$

  • 11
    $\begingroup$ You could use integration by parts to calculate $\int\sin^n(x)\,dx$ in terms of $\int\sin^{n-2}(x)\,dx$ and use induction on $n$. $\endgroup$ Commented Mar 2, 2011 at 2:35
  • 7
    $\begingroup$ ...and the approximation in your edit will not be accurate. $(1-u^2)^{\frac{n}{2}}$ will be approximated well by $e^{-\frac{n}{2}u^2}$, not by $1-\frac{n}{2}u^2$. $\endgroup$ Commented Mar 2, 2011 at 2:55
  • 3
    $\begingroup$ math.stackexchange.com/questions/20397/… $\endgroup$
    – user17762
    Commented Mar 2, 2011 at 2:59
  • 66
    $\begingroup$ Is no one going to mention that Arnold's quote is presumably meant to be at least somewhat provocative and is, in any case, far from being universally true? Rather than divulge whether or not I could meet this challenge (well, okay: I certainly didn't meet it; I had no interest in spending even one second trying to calculate this integral) let me say that by all accounts Alexander Grothendieck, for instance, would have trouble with it, and if he didn't/doesn't understand mathematics, there is not much hope for the rest of us. $\endgroup$ Commented Mar 2, 2011 at 11:23
  • 10
    $\begingroup$ @Oliver: Using a reduction formula to solve this problem by hand will take a lot more than five minutes. It is a "standard anecdote" that Grothendieck once in a conversation professed amazement about the identity $\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$: in particular, he had never heard it before. This suggests a mathematical mind that is not trained in the standard tricks of computational calculus. That was the foundation for my remark: it may or may not apply to Grothendieck specifically, but I would not think less of any mathematician who couldn't solve this problem. $\endgroup$ Commented May 15, 2014 at 3:39

11 Answers 11


Since $$\sin x=\frac{e^{ix}-e^{-ix}}{2i} $$ and, for $k\in\mathbb Z $, $$\int_0^{2\pi}e^{ikx}\,dx=\left\{\begin{array}{cl}0&k\ne0\\ 2\pi&k=0\end{array}\right.,$$ we have $$\int_0^{2\pi}\sin^{100}x\,dx=\frac1{2^{100}}\sum_{k=0}^{100}\binom{100}{k}\int_0^{2\pi}e^{ikx}(-1)^{100-k}e^{-i(100-k)x}\,dx=\frac{\binom{100}{50}}{2^{100}}2\pi,$$ and the average value is $$\frac{\binom{100}{50}}{2^{100}}.$$

  • 14
    $\begingroup$ +1. Looking at the way you have written the final answer, it begs for a combinatorial/probabilistic argument for the integral. Unfortunately, I am unable to think of a combinatorial/probabilistic immediately. $\endgroup$
    – user17762
    Commented Mar 2, 2011 at 21:06
  • 3
    $\begingroup$ @Sivaram: did you see my answer? $\endgroup$ Commented Mar 18, 2011 at 11:57
  • $\begingroup$ By Maple: $$evalf(2*(Int(sin(x)^{100}, x = 0 .. (1/2)*Pi))/Pi, 20) $$ $$0.079589237387178761494. $$ $\endgroup$
    – user64494
    Commented Jun 9, 2014 at 12:32
  • $\begingroup$ You can use Stirling's approximation to find that this is approximately $\frac{1}{\sqrt{50\pi}}\approx\frac{1}{13}\approx0.08$, which is very close to the correct value. $\endgroup$ Commented Jun 23, 2017 at 11:35
  • $\begingroup$ @Andrés E. Caicedo Great answer, include 'where $k$ is an integer' please. +1 $\endgroup$
    – BLAZE
    Commented Dec 19, 2017 at 13:49

I suspect Michael Lugo's answer was the intended one, but for what it's worth, Andres Caicedo's combinatorial answer has a combinatorial proof. The Riemann sum

$$\frac{1}{n} \sum_{k=0}^{n-1} \cos^{100} \frac{2 \pi k}{n}$$

counts the probability that you return to where you started in a random walk of length $100$ on $\mathbb{Z}/n\mathbb{Z}$ (where adjacent residues are connected by an edge); this is because the adjacency matrix is $P + P^{-1}$ where $P$ is a permutation matrix describing an $n$-cycle, so the eigenvalues of the adjacency matrix are $e^{ \frac{2 \pi i k}{n} } + e^{- \frac{2 \pi i k}{n} } = 2 \cos \frac{2 \pi k}{n}$.

For $n > 100$ this probability is clearly just $\frac{1}{2^{100}} {100 \choose 50}$, and taking the limit as $n \to \infty$ we obtain our result. And combinatorialists know that ${2n \choose n} \approx \frac{4^n}{\sqrt{\pi n}}$ by one of various methods (Stirling's formula, singularity analysis, the central limit theorem...).

Actually (I had forgotten that I knew this) one can get the integral directly without looking at a Riemann sum. The key is that $\mathbb{Z}$ (the graph where adjacent integers are connected by an edge) is the representation graph of $\text{SO}(2)$ acting on its standard representation $V$, so

$$\int_0^{2\pi} (2 \cos x)^{100} \, dx$$

is precisely the multiplicity of the trivial representation in $V^{\otimes 100}$, which is precisely the number of walks of length $100$ from the origin to itself on $\mathbb{Z}$.

  • $\begingroup$ I didn't see your combinatorial answer before. Nice one. $\endgroup$
    – user17762
    Commented Mar 20, 2011 at 2:45

Assuming Arnold means to find an approximate value -- I'd do this as follows: first, we may as well find the average of $\cos^{100} x$. I'll do this over a half-period, $-\pi/2 \le x \le \pi/2$. But $\cos x \approx 1-x^2/2$, so $\cos^{100} x \approx (1-x^2/2)^{100}$. If $x$ is small -- which it will have to be for $\cos x$ to be large (i. e. near 1) -- then $1-x^2/2 \approx e^{-x^2/2}$. So $\cos^{100} x \approx e^{-50x^2}$.

So the number we're looking for is about $$ {1 \over \pi} \int_{-\pi/2}^{\pi/2} e^{-50x^2} \: dx. $$ But the integrand is so small far from zero that the limits of integration can be replaced with $-\infty$ and $\infty$ without changing much. That gives $$ {1 \over \pi} \int_{-\infty}^\infty e^{-50x^2} \: dx. $$ Change variables, $u = x/\sqrt{50}$, to get $$ {1 \over \pi \sqrt{50}} \int_{-\infty}^\infty e^{-u^2} \: du. $$ Finally, that integral is well-known to be $\sqrt{\pi}$; the approximate answer is $1/\sqrt{50\pi}$.

This method has the advantage that it works for high powers of any function and isn't specialized to the trig functions. One source that explains this trick (and uses it to approximate the same integral) is Sanjoy Mahajan's book Street-Fighting Mathematics (link goes to Creative-Commons downloadable version of the book).

  • 14
    $\begingroup$ If instead of the 100th power we had any even power $n$, this method would give $1/\sqrt{n\pi}$. Andres Caicedo's method for finding the exact answer would give {n \choose n/2}/2^n. Applying Stirling's approximation for the factorial to Andres' answer gives my approximate answer. $\endgroup$ Commented Mar 2, 2011 at 5:13
  • 11
    $\begingroup$ For what it's worth: Andres's [exact answer](wolframalpha.com/input/?i=(100+choose+50)/(2%5E(100)%29) is about 0.079589… and this approximation is about 0.079788…, reasonably close. $\endgroup$ Commented Mar 2, 2011 at 7:12
  • $\begingroup$ This is an application of Laplace's Method $\endgroup$ Commented May 23, 2017 at 10:34

If you do an integration by parts, writing $\sin^{100}x$ as $\sin(x)\sin^{99}(x)$ you get:

$$\int_{-a}^a \sin^{100}x dx = \frac{99}{100} \int_{-a}^a \sin^{98}x dx$$

So I think that argument gives you an induction, and you get something like:

$$\int_{-\pi}^{\pi} \sin^{100}x dx = \frac{99\cdot 97 \cdots 1}{100 \cdot 98 \cdots 2} 2\pi$$

FYI: I've never studied supermanifolds. I am a professional mathematician and I think the problem took me maybe 2 minutes, once I had finished reading your question.

FYI number 2: A decent approximation to the average of $\sin^n(x)$ over $[-\pi,\pi]$ would be $\frac{1}{\sqrt{n}}$. You get this from the above argument, using the approximation that $\ln(1+x) \simeq x$ for $x$ small, together with the approximation that the sum $1+1/2+1/3+\cdots+1/n \simeq \ln(n)$.

  • $\begingroup$ Actually, to leading order, it is approximated by $\sqrt{\frac{2}{n\pi}}$. So you seem to be out by a constant factor in the last paragraph. $\endgroup$ Commented Mar 2, 2011 at 3:19
  • $\begingroup$ I don't know what "leading order" means. You can see what approximations I'm using so it's certainly not meant to be terribly good. $\endgroup$ Commented Mar 2, 2011 at 4:03
  • 2
    $\begingroup$ You can give an asymptotic expansion in powers of $n$, for which $\sqrt{\frac{2}{n\pi}}$ is the dominant term for large $n$, which is what I mean by the "leading order term". So, the average is asymtotically equal to $\sqrt{\frac{2}{n\pi}}$. $\endgroup$ Commented Mar 2, 2011 at 20:28

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ \begin{align} \color{#00f}{\large\int_{0}^{2\pi}\sin^{100}\pars{x}\,{\dd x \over 2\pi}}&= \oint_{\verts{z}\ = \ 1}{\pars{z^{2} - 1 \over 2\ic z}}^{100} \,{\dd z/\pars{\ic z} \over 2\pi} \\[5mm] & ={1 \over 2^{100}}\,{\rm Res}\bracks{% {\pars{1 - z^{2}}^{100} \over z^{\color{#c00000}{\large 100} + 1}}}_{\,z\ =\ 0} \end{align}

The residue 'arises' from the power $\ds{z^{100} = \pars{-z^{2}}^{\color{#c00000}{\large 50}}}$ in the numerator binomial expansion. Result: $\color{#00f}{\large\ds{{1 \over 2^{100}}\,{100 \choose 50}}}$.


Note that $$\int_{0}^{\pi/2}\sin^{100}(x) \ dx=\frac{1}{2}\beta\left(\frac{101}{2},\frac{1}{2}\right)=\frac{\Gamma\left(\frac{101}{2}\right)\Gamma\left(\frac{1}{2}\right)}{2\Gamma(51)}=\frac{\binom{100}{50}}{2^{100}}\cdot \frac{\pi}{2}.$$ (You can take more than five minutes to write the answer here in Latex, but surely, it will take less than 2 minutes with a calculator)

  • $\begingroup$ Didn't you lose a $\pi/2$ constant somewhere along the way? $\endgroup$
    – KT.
    Commented Dec 4, 2018 at 19:11
  • $\begingroup$ Oh sure @KT. Edited. Thanks. $\endgroup$ Commented Dec 6, 2018 at 7:58

Average value of $\sin^{2n}(x)$ on $[0,\pi/2]$ is the coefficient of $x^n$ in the series expansion of $(1-x)^{-\frac{1}{2}}$, which is $\binom {2n}{n}2^{-2n}$. This is asypmtotically $1/\sqrt{n\pi}$.

  • 2
    $\begingroup$ Can you be more specifoc? $\endgroup$
    – Dave
    Commented Jan 9, 2018 at 21:50
  • $\begingroup$ This looks to be a great answer, but I can't see why it is true! $\endgroup$
    – Blitzer
    Commented Sep 4, 2023 at 16:21

According to a computer algebra package I'm using, which are pretty powerful these days, $\int_{0}^{\pi/2} \frac{2\sin^{100}(x)}{\pi} dx = \frac{126114180XXXXXX24166851562157}{158456325028528675187087900672}$ (the point here being that even if one is not so great on methods of integration, computer algebra systems have come quite far in the past few decades). It's also worth pointing out that this answer is conceptually much less satisfying than either Andres or Ryan's answer. (six of the characters of the answer have been replaced by "X"s, because I don't want to just give you the answer).

Moreover, there's the question of the intent of VI Arnold's quote, which is difficult to understand without his full biography. If you could perhaps provide a reference to the quote so the context is available, then it may be possible to explicate it, but that's kind of soft-questiony.

  • $\begingroup$ Added the source in an edit. $\endgroup$
    – Please Delete Account
    Commented Mar 2, 2011 at 16:07

OK, I'm going to go out on a limb with a naïve answer because I don't understand what's wrong with it. In that sense this is also a question - is there anything wrong with my analysis? Please be gentle if I am making a stupid mistake -- it just doesn't seem as complicated as all these answers appear.

In order to be "within 10% accuracy", doesn't it suffice to simply estimate the average value to be zero?

Here's my reasoning...

  • The function $\sin(x)$, $x \in \mathbb{R}$, is bounded by $-1$ and $1$.
  • The functions $\sin^n(x)$, $x \in \mathbb{R}$, $n \in \mathbb{N}$, are also bounded by $-1$ and $1$. Additionally, as $n$ gets bigger the value of the functions approach zero everywhere except where $\sin(x)$ is exactly equal to $-1$ or $1$, i.e. the limit of this sequence of functions is a function that equals zero "almost everywhere" (I may not be stating that exactly correctly, but I think you get the idea).
  • Over the whole real line, the average of $\sin^n(x)$ approaches zero as $n$ gets bigger. In fact, I think it equals zero for all odd $n$ (and approaches zero from above for even $n$).
  • $n = 100$ is a reasonably big exponent in this context and so it is reasonable to conclude that the average of $\sin^{100}(x)$ is a small positive number (positive because $100$ is even) and estimate it as zero.

So, did I make everything as simple as it can be or did I screw up and make it simpler? (sorry, Einstein)

  • 7
    $\begingroup$ The problem statement requires 10% accuracy. Estimating any positive number by zero, however small, is not an estimate within 10%. $\endgroup$
    – 40 votes
    Commented Jul 24, 2013 at 4:57
  • $\begingroup$ @40 votes I thought you would use $\lvert estimate - actual \rvert$ divided by the size of some range. I further took the range to be the range of the function $\sin^{100}(x)$ or $[0,1]$. The actual values in the other answers are less than $0.08$, so I concluded that an estimate of zero was within $\frac{\lvert 0 - 0.08 \rvert}{\lvert 0 - 1 \rvert} = 0.08$ or $8\%$. $\endgroup$
    – joeA
    Commented Jul 24, 2013 at 12:08
  • 3
    $\begingroup$ @joeA (Old post, sorry.) I would use $|e-a|/|a|$ where $e$ is the estimate and $a$ is the actual value. That is, I think the question is referring to the size of the relative error in the estimate being at most 10%. $\endgroup$ Commented Jan 20, 2014 at 5:02

I tended to the five minutes side, less the accuracy. As shown by others, if you are on top of your complex variables the exact answer (unevaluated) can be found in under five minutes, and computers can handle the problem in a whiz.

It was fun to consider the intuitive shape of the equation. The average over a large region is simply $1/2$; near zero, it is essentially zero. However, an accuracy to a percent takes a little bit of work.

Approximate the integral as an area of height 1 and width from where $ \sin^{100} (x)=.5$ to $ \pi /2 $. In the region of interest, $$\sin(x)=1-(\pi/2-x)^2/2 $$ Sure, the sloping curve does not quite have rotational symmetry, but at 10% a rectangle should be fine.

If $\sin^{100}(z)=.5$, then $\sin(z)=\sqrt[100]{.5} $, which I am not used to finding without a calculator. I took $\sqrt{.49}=.7$ and $\sqrt{.7} \approx 1-.3/2 -.01 = .84$ because I was not quite near enough to one to assume the number was constant, that is, $(1-a)^n \approx 1-n\cdot a$,

Similarly, $\sqrt[25]{.84} \approx 1-\dfrac{\frac{16}{100}}{25}$, and for the width of my rectangle, y, $$\frac{1}{2} y^2 = \dfrac{\frac{16}{100}}{25}$$ $$(10 y)^2 = \frac{32}{25}$$ $$10y\approx 1+ \frac{1}{2} \frac{7}{25}$$ $$10y\approx 1+.04\cdot 3.5$$ or $y\approx .114$, giving an average of $1\cdot y\frac{2}{\pi}\approx .075$

I assume the primary error comes from the approximation finding the 25th root, which should be less than the estimate, so $y$ should be larger than found. I partially accommodated this in my lazy division by $\pi$ in my head.


Arnold expects any proficient student to solve this to 10% accuracy within 5 minutes. He's clearly not expecting them to realize the connection to Gaussian (and if he did, you get closer to 0.5% accuracy).

But it can be calculated using standard numeric methods, to within 10% accuracy, in a few minutes, if you just use a little insight. See How did Feynman produce solutions in under a minute? :

Notice that $\cos^{100}x$ is nearly always either close to $1$ or very close to $0$. We can therefore treat it as a square pulse which begins at $0$ and ends when $\cos^{100} x$ crosses $\frac 1 2$.

To find this threshold $x$, first solve $t^{100} = \frac 1 2$, $$100 \log t \approx -0.69 \\ t \approx \exp (-0.0069) \approx 0.9931$$ and then $$\arccos x = t \approx 0.9931 \\ x^2/2 \approx 0.0069 \\ x \approx 0.12$$ which is within about 4% of the true value [of $\int_0^{\pi/2}\cos^{100} x \ dx$] $0.12502...$.


You must log in to answer this question.