# Evaluating the integral of $\int_{0}^{\frac{\pi}{2}} \frac{\tan x}{x}~dx$

Here, I am calculating $$\int_{0}^{\frac{\pi}{2}} \frac{\tan x}{x}\,dx$$ by parts: $$\int_a^b u\,dv=uv|_a^b-\int_a^bv~~du$$, in which $$dv=\frac{1}{x},~v=\ln x ,~u=\tan x,~du=\sec^2 x$$.

I can derive that $$\tan x\ln x|_0^{\frac{\pi}{2}}-\int_0^\frac{\pi}{2}\ln x \sec^2 x\,dx.$$

But I can see that $$\tan x$$ is not defined at $$x=\frac{\pi}{2}$$ and $$\ln x$$ is not defined at $$x=0$$.

I cannot go further from here. So, I want to evaluate this integral problem. Any help is appreciated.

• This integral does not converge. – Euler....IS_ALIVE Oct 12 '18 at 11:33
• Yes, I realized that. Thanks @Euler....IS_ALIVE – kunarapu priyatham Oct 12 '18 at 12:13

$$\int_0^{\pi/2} \frac{\tan x}{x} \; dx >\int_1^{\pi/2} \frac{\tan x}{x} \; dx > \int_1^{\pi/2} \frac{\tan x}{1} \; dx.$$
$$I=\int_0^{\pi/2}\frac{\tan(x)}{x}dx$$ we know that: $$\tan(x)=\sum_{n=0}^\infty\frac{(-1)^n2^{2n+2}\left(2^{2n+2}-1\right)B_{2n+2}}{(2n+2)!}x^{2n+1}$$ so we can say that: $$\int\frac{\tan(x)}{x}=\int\sum_{n=0}^\infty\frac{(-1)^n2^{2n+2}\left(2^{2n+2}-1\right)B_{2n+2}}{(2n+2)!}x^{2n}dx$$ which can easily be solved. However, if you look at the $$\tan(\pi/2)$$ it diverges to $$\infty$$n as: $$\lim_{x\to(\pi/2)^+}\tan(x)=\infty$$ so for this value the integral is also not defined, and is divergent.