On wolfram alpha, I searched for the series expansion of the integral

$$\int \frac{\cos(2x) - \cos(x)}{x} \mathrm dx$$


I am confused at the $\log(2)$ term in the series expansion at $x = 0$. I understand all the other terms come from integrating the expansion of $\frac{\cos(2x) - \cos(x)}{x}$. Where did $\log(2)$ come from? How was it evaluated? And how was the expansion at $ x = \infty$ evaluated?

  • $\begingroup$ Why do you treat yourself in such an inferior way? $\endgroup$ Mar 5 '17 at 1:19

Recall that




And subtracting these two:


Then divide by $x$:


Integrate term by term:

$$\int\frac{\cos(2x)-\cos(x)}x\ dx=\sum_{n=0}^\infty\frac{(-1)^n(4^n-1)}{(2n)!(2n)}x^{2n}$$

But wait! Constant of integration!

$$\int\frac{\cos(2x)-\cos(x)}x\ dx=\color{red}{c}+\sum_{n=0}^\infty\frac{(-1)^n(4^n-1)}{(2n)!(2n)}x^{2n}$$

That's where the $\log(2)$ came from, though I'm not sure why WolframAlpha chose $\log(2)$ in particular... actually, here's where it came from:

$$\int\frac{\cos(2x)-\cos(x)}x\ dx=c+\int_x^\infty\frac{\cos(2t)-\cos(t)}t\ dt=c+\operatorname{Ci}(2x)-\operatorname{Ci}(x)$$

where $\operatorname{Ci}$ is the cosine integral. And by setting $x=c=0$, we get

$$\int_0^\infty\frac{\cos(2t)-\cos(t)}t\ dt=\log(2)$$

which is where the $\log(2)$ came from.

The expansion at infinity may likewise be done by setting $x=1/t$.


And Taylor expanding at $t=0$ (much harder to do, also not sure how Wolfram did this step exactly)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.