How would you evaluate the following indefinite integral? In fact, I did evaluate $\int \frac{\cos{t}}{t} dt$ by parametric integration and then I thought of this variant. $$\int \frac{t}{\cos{t}} dt$$

Here you may find the result given by W|A.

  • $\begingroup$ Did you evaluated the primitive of $\cos t/t$? $\endgroup$ – enzotib Aug 13 '12 at 14:43
  • $\begingroup$ @enzotib, that's actually easier, since it's just the cosine integral. This one will require the inverse tangent integral. $\endgroup$ – J. M. is a poor mathematician Aug 13 '12 at 15:12
  • $\begingroup$ @J.M.: yes, but by definition of cosine integral, not actually evaluating something, like the OP claims. $\endgroup$ – enzotib Aug 13 '12 at 15:15
  • $\begingroup$ @enzotib, maybe OP went further and expressed it in terms of the incomplete gamma function... :D $\endgroup$ – J. M. is a poor mathematician Aug 13 '12 at 15:20
  • $\begingroup$ @enzotib: In fact, I did try it. $\endgroup$ – user 1357113 Aug 14 '12 at 7:18

Let's start with $\ \displaystyle f(x):=\log(\tan(x/2))\ $ then : $$f'(x)=\frac{\tan(x/2)^2+1}{2\tan(x/2)}=\frac{\sin(x/2)^2+\cos(x/2)^2}{2\cos(x/2)^2\tan(x/2)}=\frac 1{\sin(x)}$$

so that $\ f'\left(t+\frac {\pi}2\right)=\dfrac 1{\cos(t)}$.

We want (ignoring integration constants up to the end) : $$\int \dfrac t{\cos(t)}\,dt=\int tf'\left(t+\frac {\pi}2\right) dt=\left[tf\left(t+\frac {\pi}2\right)\right]-\int f\left(t+\frac {\pi}2\right)\,dt$$ Setting $\ u:=\tan\bigl(\frac x2\bigr)\ $ so that $\ dx=\dfrac {2\;du}{1+u^2}$ we rewrite the integral of $f$ as : $$\int f(x)\;dx=\int \log\left(\tan\left(\frac x2\right)\right)\;dx=2\int \frac{\log(u)}{1+u^2}\;du$$ $$=\left[2\log(u)\arctan(u)\right]-2\int \frac {\arctan(u)}u\,du=2\left[\log(u)\arctan(u)-\rm{Ti}_2(u)\right]$$ with $\rm{Ti}_2$ the inverse tangent integral proposed by J.M. (see Lewin 1981 "Polylogarithms and associated functions" ch. 2 for more information). $\rm{Ti}_2$ may be rewritten as Clausen functions or as complex polylogarithms.

We want $\ \int f\bigl(t+\frac {\pi}2\bigr)\,dt\ $ so that $\ u:=\tan\bigl(\frac t2+\frac {\pi}4\bigr)\ $ and $$\int f\left(t+\frac {\pi}2\right)\,dt=2\left[\log\left(\tan\left(\frac t2+\frac {\pi}4\right)\right)\left(\frac t2+\frac {\pi}4\right)-\rm{Ti}_2\left(\tan\left(\frac t2+\frac {\pi}4\right)\right)\right]$$

getting : $$\int \dfrac t{\cos(t)}\,dt=t\left[\log\left(\tan\left(\frac t2+\frac {\pi}4\right)\right)\right]-2\left[\log\left(\tan\left(\frac t2+\frac {\pi}4\right)\right)\left(\frac t2+\frac {\pi}4\right)-\rm{Ti}_2\left(\tan\left(\frac t2+\frac {\pi}4\right)\right)\right]$$

and finally : $$\int_0^t \dfrac x{\cos(x)}\,dx=-\frac {\pi}2\log\left(\tan\left(\frac t2+\frac {\pi}4\right)\right)+2\rm{Ti}_2\left(\tan\left(\frac t2+\frac {\pi}4\right)\right)+C$$ where the additional constant $\ C=-2\;\rm{Ti}_2(1)=-2K\quad$ ($K$ is the Catalan constant).

To rewrite this with Clausen functions we may use (4.31) of Lewin's reference : $$\rm{Ti}_2(\tan \theta)=\theta\log(\tan\theta)+\frac 12\left(\rm{Cl}_2(2\theta)-\rm{Cl}_2(\pi-2\theta)\right)$$

  • $\begingroup$ Thanks for following through, again. :) I had forgotten about the Clausen function... good thing you mentioned it too, for the benefit of those who want to avoid using complex numbers in real results. $\endgroup$ – J. M. is a poor mathematician Aug 14 '12 at 5:19
  • $\begingroup$ @Raymond Manzoni: Clausen functions? I didn't know they have a name. :-) Thanks. $\endgroup$ – user 1357113 Aug 14 '12 at 7:13
  • $\begingroup$ @Chris'sister: Glad you liked my 'all real' solution ! Clausen functions are indeed interesting since you may write them as $\displaystyle \rm{Cl}_{2n}(\theta)=\sum_{n=1}^\infty \frac {\sin(n\theta)}{n^{2n}}$ and $\displaystyle \rm{Cl}_{2n+1}(\theta)=\sum_{n=1}^\infty \frac {\cos(n\theta)}{n^{2n+1}}$as found at Mathworld (I think that wikipedia's 'General definition' should rather be something like ... $\endgroup$ – Raymond Manzoni Aug 14 '12 at 8:51
  • $\begingroup$ $\displaystyle \rm{Cl}_s(\theta)=\sum_{n=1}^\infty \frac {\sin(n\theta+s\pi/2)}{n^s}$ if we accept to change some signs !). These series are frequent in Fourier series and the other half of the cases is handled by the Bernoulli polynomials. $\endgroup$ – Raymond Manzoni Aug 14 '12 at 8:52
  • 1
    $\begingroup$ @Raymond Manzoni: I usually like the solutions from which I have something to learn as this solution is. $\endgroup$ – user 1357113 Aug 14 '12 at 8:55

Note that $$ \frac{1}{\cos t}= \frac{2}{e^{it}+e^{-it}}= \frac{2e^{it}}{1+e^{2it}} $$ so integration by parts gives $$ \int\frac{t}{\cos t}dt= \int 2t\frac{e^{it}}{1+e^{2it}}dt= \int 2t\frac{(-i)d(e^{it})}{1+e^{2it}}= \int -2itd(\arctan(e^{it}))= $$ $$ -2it\arctan(e^{it})-\int\arctan(e^{it})d(-2it)= -2it\arctan(e^{it})+2i\int\arctan(e^{it})dt $$ It is remains to compute the last integral $$ \int\arctan(e^{it})dt= \int\sum\limits_{k=1}^\infty \frac{(-1)^k(e^{it})^{2k+1}}{2k+1}dt= \int\sum\limits_{k=1}^\infty \frac{(ie^{it})^{2k+1}}{i(2k+1)}dt= \int\frac{1}{2i}\left(\sum\limits_{k=1}^\infty\frac{(ie^{it})^k}{k}- \sum\limits_{k=1}^\infty\frac{(-ie^{it})^k}{k}\right)dt= \frac{1}{2i}\sum\limits_{k=1}^\infty\int\frac{(ie^{it})^k}{k}dt- \frac{1}{2i}\sum\limits_{k=1}^\infty\int\frac{(-ie^{it})^k}{k}dt= $$ $$ \frac{1}{2i}\sum\limits_{k=1}^\infty\frac{(ie^{it})^k}{ik^2}- \frac{1}{2i}\sum\limits_{k=1}^\infty\frac{(-ie^{it})^k}{ik^2}= \frac{1}{2}\left(\mathrm{Li}_2(-ie^{it})-\mathrm{Li}_2(ie^{it})\right) $$ The final result is $$ \int\frac{t}{\cos t}=-2it\arctan(e^{it})+i(\mathrm{Li}_2(-ie^{it})-\mathrm{Li}_2(ie^{it})) $$

  • $\begingroup$ As I've already noted, one might choose to use the inverse tangent integral instead of the dilogarithm in this case... $\endgroup$ – J. M. is a poor mathematician Aug 13 '12 at 16:07
  • $\begingroup$ I saw your comment after I finished writing this answer $\endgroup$ – Norbert Aug 13 '12 at 16:34
  • $\begingroup$ @Norbert: thanks for your answer. $\endgroup$ – user 1357113 Aug 14 '12 at 7:12
  • $\begingroup$ I like all your provided answers. (+1) $\endgroup$ – user 1357113 Aug 14 '12 at 9:17
  • $\begingroup$ Thanks @Chris'sister, glad to see nice questions $\endgroup$ – Norbert Aug 14 '12 at 9:45

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.