# How to find the value of this integral: $\int_0^n\frac 1x dx$

I know that the function, $$f(x) = \frac 1x$$tends to infinity when $x$ approaches $0$, but I'm unable to figure out how to calculate this integral - $$\int_0^n\frac 1x dx$$where $n > 0$.

Help.

Edit: I wanted to put the limits from $0$ to $n$, but mistakenly I did the opposite initially, my bad. I've reversed it now though. So, answer would be multiplication by $(−1)$ to the answers based on $n$ to $0$ as limits.

## 1 Answer

You may observe that, for $n>0$, $$\int_n^0\frac 1x dx=-\lim_{b \to 0^+}\int_b^n\frac 1x dx=-\lim_{b \to 0^+}[\log x]_b^n=-\log n+\lim_{b \to 0^+}\log x=-\infty.$$

• What if $n$ is $\infty$? – Aditya Agarwal Aug 14 '15 at 15:03
• @Olivier: Thanks for the answer. – PalashV Aug 14 '15 at 15:06
• @PalashV You are welcome! – Olivier Oloa Aug 14 '15 at 15:07
• @AdityaAgarwal When one writes $n$ it can't be $\infty$. But one can let $n \to \infty$. – Olivier Oloa Aug 14 '15 at 15:08
• Yes, that is what I meant. – Aditya Agarwal Aug 14 '15 at 15:08