Jump to content

# Denoting ∫ (f(x) + dy/2)dx as area under a curve?

## Recommended Posts

I have attached a picture below, and the thought of this idea is confusing me too much.

-> In the first graph, I have taken the area of a single rectangle (say, first rectangle) as M * Δx , where M represents the arithmetic mean of f(x) and f(x) + Δy ( Δy is f(x+Δx) - f(x) )  which i thought would givea better approximation of the area as opposed to directly taking area as f(x)Δx

So the question,(please see the pic first) why dont we take the area under a curve as ∫ (f(x) + dy/2)dx? because when Δx is big, the expression of area under a curve as ∫ (f(x) + Δy/2)Δx  would give a more precise result. will it give the same as Δx approaches 0?

Please tell where am i going wrong.

p.s. - I am a newbie at calculus, so bear with me if my question is stupid

##### Share on other sites

The result of the integral doesn't depend on which approximation you use. The second one is called the lower Riemann sum. There is another one with  starts with what you would call $$f\left(x_{0}+\triangle x\right)$$ instead of $$f\left(x_{0}\right)$$, and ends with $$f\left(x_{1}\right)$$ instead of $$f\left(x_{1}-\triangle x\right)$$ It's called the upper Riemann sum. Your expression differs only in a second-order term in $$\triangle x$$. You only see a big difference because your $$\triangle x$$ is enormous in the image.

You can actually do an even better fit by taking a polygonal approach to the curve (for the same step $$\triangle x$$.)

Sorry. This is the applet that I meant to show you. You must play with the n=10. Take it up to n=24, for example, and you'll see what I mean.

Edited by joigus
##### Share on other sites

10 hours ago, Magnetar said:

-> In the first graph, I have taken the area of a single rectangle (say, first rectangle) as M * Δx , where M represents the arithmetic mean of f(x) and f(x) + Δy ( Δy is f(x+Δx) - f(x) )  which i thought would give a better approximation of the area as opposed to directly taking area as f(x)Δx

I would like to rephrase. By saying that i took the area of the rectangle as (f(x)+Δy/2)Δx in the first graph , i meant to say that i took the height of an individual rectangle as [f(x)+f(x+Δx)]/2 ( not as f(x), neither as f(x+Δx) )to get the mean height, or when Δx is big, a better approximation of the area as Σ [{f(x)+f(x+Δx)}/2]*Δx

10 hours ago, Magnetar said:

So the question,(please see the pic first) why dont we take the area under a curve as ∫ (f(x) + dy/2)dx? because when Δx is big, the expression of area under a curve as ∫ (f(x) + Δy/2)Δx  would give a more precise result. will it give the same as Δx approaches 0?

Again rephrasing, why dont we take the area under a curve as ∫ {f(x)+f(x+dx)}/2*dx? because when Δx is big, the expression for area under a curve as Σ [{f(x)+f(x+Δx)}/2]*Δx would give a more precise result. Will it give the same as Δx approaches zero?

##### Share on other sites

Yes, both methods approach the same limit. In this case, you can explicitly write that down: Assume you integrate from 0 to 1, and you split the range into N intervals of equal length. In the first case, your integral approximates as
$I_{1, N} = \frac 1N \sum_{i=0}^{N-1} f(i/N) = \frac 1N \left( f(0) + f(1/N) + f(2/N) + \dots + f((N-1)/N) \right)$.
In the second case, your integral approximates as
$I_{2, N} = \frac 1N \sum_{i=0}^{N-1} \frac 12 \left( f(i/N) + f((i+1)/N) \right) = \frac 1N \left( \frac 12 f(0) + f(1/N) + f(2/N) + \dots + f((N-1)/N) + \frac 12 f(1) \right)$.
If you compare the terms, you notice that
$I_{1, N} - I_{2, N} = \frac 1N \frac 12 (f(0) - f(1) ) = \frac{f(0) - f(1)}{2N}.$
So whatever finite numbers f(0) and f(1) are, the difference between the two ways to approximate the integral becomes tiny when N becomes large enough.

Btw: This editor is horrible: Preview should preview the rendered tex, not show me the raw tex I typed for different screen sizes. I want my editor from ten years ago back.

Edited by timo
##### Share on other sites

ok thanks i understood ! I always thought why isnt the integral calculated in the first way, but now I understood

##### Share on other sites

Joigus already mentioned is implicitly, but I think it's worth pointing it out explicitly:

When it comes to the exact integral, the different methods with equal-width rectangles that approach dx->0 do approach the same limit (with some exceptions that are not relevant here). And this common limit is called "the integral". For many important functions, e.g. polynomials, we know how to compute the limit exactly. And we don't even care about the rectangle construction in these cases, and just jump to the known solution - which does not depend on the exact rectangle-method that has been used.

Now: When it comes to functions for which we do not have a known solution, we often have to fall back to what is called "numerical integration". In this case, we use a single, small dx, but we do not take the limit dx->0. Then, we brute-force the approximation by summing up all the individual rectangle results (computers are very good at doing stupid, repetitive tasks very quickly). In this case, the method you propose (f(x0)/2 + f(x1)/2) is indeed considered superior over the simplest approximation (f(x0)). The calculation I showed in my previous post still holds, but N now is a fixed number that does not become arbitrarily large. In practice, the method you proposed is usually the simplest choice for numerical integration that someone with a bit of knowledge about numerical integration will use. Numerical integration routines integrated in programming languages or software libraries will often use even more complicated rules to calculate each rectangle (arguably not even a rectangle, but still dx-sized segments and a representative mean function value for each segment).

Bottom line: Don't worry if you don't understand everything in this post. My point is: Your idea about improving the rule to calculate the integral is actually very good. It does not matter much for the definition of the integral (well .. it does in the sense that the definition of the integral would be broken if it gave a different result). But for numerical integration on a computer, your idea is actually very relevant.

Edited by timo
##### Share on other sites

• 1 month later...

The notation doesn't make sense to me!    $$\int (f(x)+ dy/2)dx= \int f(x)dx+ \frac{1}{2}\int dydx$$. The first, $$\int f(x)dx$$, makes sense but the second, $$\frac{1}{2}\int dydx$$, looks like it should be a double integral, not a single integral.

##### Share on other sites

56 minutes ago, Country Boy said:

The notation doesn't make sense to me!    $$\int (f(x)+ dy/2)dx= \int f(x)dx+ \frac{1}{2}\int dydx$$. The first, $$\int f(x)dx$$, makes sense but the second, $$\frac{1}{2}\int dydx$$, looks like it should be a double integral, not a single integral.

You mean,

$\int (f(x)+ dy/2)dx= \int f(x)dx+ \frac{1}{2}\int dydx$

$\frac{1}{2}\int dydx$

Yes you're right it looks like that, but it's not a double integral, as $$dy\left( x \right) = y'\left( x \right) dx$$. But the whole point is OP mistakenly thought the second-order differential made a difference in the evaluation of the integral, while it doesn't.

##### Share on other sites

On 5/29/2021 at 12:32 PM, Magnetar said:

I have attached a picture below, and the thought of this idea is confusing me too much.

-> In the first graph, I have taken the area of a single rectangle (say, first rectangle) as M * Δx , where M represents the arithmetic mean of f(x) and f(x) + Δy ( Δy is f(x+Δx) - f(x) )  which i thought would givea better approximation of the area as opposed to directly taking area as f(x)Δx

So the question,(please see the pic first) why dont we take the area under a curve as ∫ (f(x) + dy/2)dx? because when Δx is big, the expression of area under a curve as ∫ (f(x) + Δy/2)Δx  would give a more precise result. will it give the same as Δx approaches 0?

Please tell where am i going wrong.

p.s. - I am a newbie at calculus, so bear with me if my question is stupid

Get this book (this specific edition), it explains in some detail, patiently, how and why the rules are what they are.

The writer knew how to teach and you'll pick that up as you begin to read it, like all good teaches he anticipates the questions his readers might ask or be asking themselves:

I have many books on introductory calculus and this one covers this specific area (no pun intended) better than the others.

Edited by Holmes
##### Share on other sites

2 hours ago, Holmes said:

Get this book (this specific edition), it explains in some detail, patiently, how and why the rules are what they are.

The writer knew how to teach and you'll pick that up as you begin to read it, like all good teaches he anticipates the questions his readers might ask or be asking themselves:

I have many books on introductory calculus and this one covers this specific area (no pun intended) better than the others.

Suprising how much ground such an old book (1912) covers in such a very modern (if elementary) fashion).

Certainly gives a beginner a feel for the use of calculus.

But I don't think it addresses Magnetar's basic problem in that he has mixed up the different sums involved in integration.

However this is probably moot since he ahs not been back for a month.

The book can be downloaded for free as a pdf

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

## Sign in

Already have an account? Sign in here.

Sign In Now
×

• #### Activity

• Leaderboard
×
• Create New...

## Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.