# Converting a limit to integral form or vice-versa

1. May 6, 2015

### Raghav Gupta

What is the proof for this
$$\int_a^b f(x) dx = 1/n\lim_{n\to\infty} (f(a) + f(a+h) + f(a+2h) +...+ f( a+ (n-1)h))$$
h = (b-a)/n

Also I think there is some summation form which can be converted to integral form how?

Last edited by a moderator: May 6, 2015
2. May 6, 2015

### micromass

Staff Emeritus
What is your definition of the integral?

3. May 6, 2015

4. May 7, 2015

### Raghav Gupta

An integral is the area under a curve.
For any curve we can find it's area by putting infinitely small rectangles, trapezoids etc. shapes.
We can write $$\int_a^b f(x) dx = \lim_{n\to\infty} \sum_{i=1}^n f(x_{i-1}) Δx$$
Δx = (b-a)/n
But how do we get this

$$\int_a^b f(x) dx = 1/n\lim_{n\to\infty} (f(a) + f(a+h) + f(a+2h) +...+ f( a+ (n-1)h))$$
h = (b-a)/n
From above that I know?

5. May 7, 2015

### BvU

By setting x0 = a, x1 = a + h, etc. (you already have $\Delta x = h$) .

I think there is a small error in the lower formula: 1/n can't be outside the $\lim$ .
(It also doesn't fit dimensionwise)
(b-a) should be the factor in front and 1/n should be at the end (within the $\lim$ scope)

6. May 7, 2015

### Raghav Gupta

Okay, got that and yes 1/n should be inside lim scope.

Applying this how $$\lim_{n\to\infty}\frac{1}{n}\sum_{r=1}^n log(r/n) = \int_0^1 logx dx$$ ?

7. May 7, 2015

### BvU

Ah ! A new turn to this thread. We're going to derive Stirling's formula !

Your righthand side makes me feel uncomfortable. A primitive of $\log x$ is $x\log x - x$ and there is no $\log 0$, so I suppose this is to be continued. And yes:

If you take $f(x) = \log x$ and write out
$$\int_a^b f(x) dx = (b-a) \lim_{n\to\infty} ( f(a+h) + f(a+2h) +...+ f( a+ nh)) 1/n$$you see your summation appearing (b = 1, a = 0, h = 1/n).

Note that I sneakily shifted by h (starting from a+h instead of from a). So from lower sum to upper sum (which google) to avoid the $\log 0$).​

8. May 7, 2015

### Raghav Gupta

I saw that Stirling formula in Wikipedia and I am feeling uncomfortable with that. ( I think it is taught in university with a lot of basics first and I am in high school.)
I also googled lower to upper sum and don't know that things trapezoidal rule in details.( I think university will be fun.)

So, according to wolframalpha
Left hand side is 0 and Right hand side is coming -1
Is that true?
But someone was telling me that they are equal.
Also 1/∞ is not strictly zero, it may be 0.00000....1
So log 0 not comes in left hand side.

9. May 7, 2015

### micromass

Staff Emeritus
$1/\infty$ is undefined. It doesn't exist. And if you do want to define it, then it will be exactly 0.

10. May 7, 2015

### Raghav Gupta

Okay, so is this true?

$$\lim_{n\to\infty}\frac{1}{n}\sum_{r=1}^n log(r/n) = \int_0^1 logx dx$$

[Edit - added ] is 0 * log0 = 0 ?

Last edited: May 7, 2015
11. May 7, 2015

### BvU

No, but $\displaystyle \lim_{x\rightarrow 0} x\log x = 0$

Where do you see a zero appearing on the left hand side ? Try it on your calculator (mine goes up to n = 170 and no way it's going to 0).

So is Wolfram a dud ? No it's not. But you need to improve the incantation...

By the way, my deepest respect for the JEE level. I find it hard to believe they can ask so much of people wanting to get into university ! All (or almost) all the stuff I have to mobilize in order to help you, I learned after grammar school.​

Last edited: May 7, 2015
12. May 8, 2015

### Raghav Gupta

$\displaystyle \lim_{x\rightarrow 0} x\log x = 0$
Now how is this true?

Got the -1 in left hand side by improving incantation:)

13. May 8, 2015

### HallsofIvy

Staff Emeritus
As x goes to 0, log(x) along goes to -infinity so $\frac{1}{log(x)}$ goes to 0 and we can apply L'Hopital's rule to $\frac{x}{\frac{1}{log(x)}}$.

The derivative of x is, or course, 1 and the derivative of $\frac{1}{log(x)}= (log(x))^{-1}$ is $-(log(x))^{-2}\frac{1}{x}$ so that the limit is the limit of $\frac{1}{-\frac{1}{x}(log(x))^2}$$= -\frac{(log(x))^2}{x}= -\frac{xlog(x)}{x}$.

So if $\lim_{x\to 0} x log(x)$ is some finite number, A, then we must have $A= -A(\lim_{x\to 0} x)= 0$

14. May 8, 2015

### Raghav Gupta

Shouldn't that bold part have$(log(x))^{-2}$ in denominator ?
and I am also not getting what you are doing after that
How
$\frac{1}{-\frac{1}{x}(log(x))^2}$$= -\frac{(log(x))^2}{x}$

Last edited: May 8, 2015
15. May 9, 2015

### Raghav Gupta

16. May 9, 2015

### Raghav Gupta

HaHa, no problem,
Halls you took me in a complicated way,
Here see this,
$$xlogx = \frac{logx}{\frac{1}{x}}$$
Here limit x tends to zero and as we are getting num. and den -∞/∞ we can then also apply L Hopital rule.
Then
$$\frac{-x^2}{x} = -x$$
As here limit x tends to 0
We get 0.

Thanks BvU, Halls (although your way was very complicated but bringing L Hopital was crucial) and also thanks to μm .