Why don't terms in the summation expression for an integral (almost) cancel out?
up vote
5
down vote
favorite
If I think of an integral, $int_a^b f(x) dx$ as roughly $sum f(x)delta x$ where $delta x$ is very very small, then can't I write this sum as
$$
f(x)x - f(x)(x-delta x) + f(x-delta x)(x-delta x) +dots -f(a)a
$$
Then, since $delta x$ is so small, assuming $f(x)$ is "smooth" in some sense, shouldn't $f(x) approx f(x-delta x)$ so $$f(x)(x-delta x) approx f(x-delta x)(x-delta x)$$
and then all terms would cancel out except for $f(x)x$ and $f(a)a$?
I.e. wouldn't this give $int_a^b f(x)dx approx f(x) x - f(a)a$?
Why does this not give a decent approximation?
For example, I think this is always exact for a constant function. I would then think it should be pretty good for any function that doesn't change too quickly at any point.
but what is "too quickly"
I thought it would also be pretty good for a linear function, but this is not the case...
integration
add a comment |
up vote
5
down vote
favorite
If I think of an integral, $int_a^b f(x) dx$ as roughly $sum f(x)delta x$ where $delta x$ is very very small, then can't I write this sum as
$$
f(x)x - f(x)(x-delta x) + f(x-delta x)(x-delta x) +dots -f(a)a
$$
Then, since $delta x$ is so small, assuming $f(x)$ is "smooth" in some sense, shouldn't $f(x) approx f(x-delta x)$ so $$f(x)(x-delta x) approx f(x-delta x)(x-delta x)$$
and then all terms would cancel out except for $f(x)x$ and $f(a)a$?
I.e. wouldn't this give $int_a^b f(x)dx approx f(x) x - f(a)a$?
Why does this not give a decent approximation?
For example, I think this is always exact for a constant function. I would then think it should be pretty good for any function that doesn't change too quickly at any point.
but what is "too quickly"
I thought it would also be pretty good for a linear function, but this is not the case...
integration
How did you get to that sum?
– inavda
Nov 7 at 6:06
@inavda $sum_{i-a}a^b f(a) delta x$ is $f(a)delta x + f(a+delta x)delta x + dots + f(b-delta x) delta x + f(b)delta x$, but I can replace all $delta x$ with $x-(x-delta x)$. Then I can separate the $x$ and $x-delta x$ parts. (note the sum i am taking in $delta x$ increments)
– user106860
Nov 7 at 6:09
7
The error in your approximation looks like $f'(x) delta x$, but there are on the order of $frac{1}{delta x}$ terms in the sum, so you can't ignore it.
– Qiaochu Yuan
Nov 7 at 6:13
@QiaochuYuan If you could elaborate on why the error looks like that and the number of terms I would gladly accept that as an answer. If not, I am grateful for at least you comment. Thank you. (Also, intuitively it seems like you are saying "the error is not so big if the derivative is not large, but because the sum has many terms in the end it is not negligible. I was thinking something along those lines but was thinking if I could make "the error" small enough the number of terms shouldn't matter).
– user106860
Nov 7 at 6:16
@user106860 : $f(x - delta x)$ is approximately $f(x) - f'(x) delta x$ because the derivative of a function linearizes it there, or equivalently, it is the sensitivity to a vanishingly small change in the input, and $delta x$ is such a vanishing change.
– The_Sympathizer
Nov 7 at 7:41
add a comment |
up vote
5
down vote
favorite
up vote
5
down vote
favorite
If I think of an integral, $int_a^b f(x) dx$ as roughly $sum f(x)delta x$ where $delta x$ is very very small, then can't I write this sum as
$$
f(x)x - f(x)(x-delta x) + f(x-delta x)(x-delta x) +dots -f(a)a
$$
Then, since $delta x$ is so small, assuming $f(x)$ is "smooth" in some sense, shouldn't $f(x) approx f(x-delta x)$ so $$f(x)(x-delta x) approx f(x-delta x)(x-delta x)$$
and then all terms would cancel out except for $f(x)x$ and $f(a)a$?
I.e. wouldn't this give $int_a^b f(x)dx approx f(x) x - f(a)a$?
Why does this not give a decent approximation?
For example, I think this is always exact for a constant function. I would then think it should be pretty good for any function that doesn't change too quickly at any point.
but what is "too quickly"
I thought it would also be pretty good for a linear function, but this is not the case...
integration
If I think of an integral, $int_a^b f(x) dx$ as roughly $sum f(x)delta x$ where $delta x$ is very very small, then can't I write this sum as
$$
f(x)x - f(x)(x-delta x) + f(x-delta x)(x-delta x) +dots -f(a)a
$$
Then, since $delta x$ is so small, assuming $f(x)$ is "smooth" in some sense, shouldn't $f(x) approx f(x-delta x)$ so $$f(x)(x-delta x) approx f(x-delta x)(x-delta x)$$
and then all terms would cancel out except for $f(x)x$ and $f(a)a$?
I.e. wouldn't this give $int_a^b f(x)dx approx f(x) x - f(a)a$?
Why does this not give a decent approximation?
For example, I think this is always exact for a constant function. I would then think it should be pretty good for any function that doesn't change too quickly at any point.
but what is "too quickly"
I thought it would also be pretty good for a linear function, but this is not the case...
integration
integration
edited Nov 7 at 6:07
asked Nov 7 at 6:05
user106860
376214
376214
How did you get to that sum?
– inavda
Nov 7 at 6:06
@inavda $sum_{i-a}a^b f(a) delta x$ is $f(a)delta x + f(a+delta x)delta x + dots + f(b-delta x) delta x + f(b)delta x$, but I can replace all $delta x$ with $x-(x-delta x)$. Then I can separate the $x$ and $x-delta x$ parts. (note the sum i am taking in $delta x$ increments)
– user106860
Nov 7 at 6:09
7
The error in your approximation looks like $f'(x) delta x$, but there are on the order of $frac{1}{delta x}$ terms in the sum, so you can't ignore it.
– Qiaochu Yuan
Nov 7 at 6:13
@QiaochuYuan If you could elaborate on why the error looks like that and the number of terms I would gladly accept that as an answer. If not, I am grateful for at least you comment. Thank you. (Also, intuitively it seems like you are saying "the error is not so big if the derivative is not large, but because the sum has many terms in the end it is not negligible. I was thinking something along those lines but was thinking if I could make "the error" small enough the number of terms shouldn't matter).
– user106860
Nov 7 at 6:16
@user106860 : $f(x - delta x)$ is approximately $f(x) - f'(x) delta x$ because the derivative of a function linearizes it there, or equivalently, it is the sensitivity to a vanishingly small change in the input, and $delta x$ is such a vanishing change.
– The_Sympathizer
Nov 7 at 7:41
add a comment |
How did you get to that sum?
– inavda
Nov 7 at 6:06
@inavda $sum_{i-a}a^b f(a) delta x$ is $f(a)delta x + f(a+delta x)delta x + dots + f(b-delta x) delta x + f(b)delta x$, but I can replace all $delta x$ with $x-(x-delta x)$. Then I can separate the $x$ and $x-delta x$ parts. (note the sum i am taking in $delta x$ increments)
– user106860
Nov 7 at 6:09
7
The error in your approximation looks like $f'(x) delta x$, but there are on the order of $frac{1}{delta x}$ terms in the sum, so you can't ignore it.
– Qiaochu Yuan
Nov 7 at 6:13
@QiaochuYuan If you could elaborate on why the error looks like that and the number of terms I would gladly accept that as an answer. If not, I am grateful for at least you comment. Thank you. (Also, intuitively it seems like you are saying "the error is not so big if the derivative is not large, but because the sum has many terms in the end it is not negligible. I was thinking something along those lines but was thinking if I could make "the error" small enough the number of terms shouldn't matter).
– user106860
Nov 7 at 6:16
@user106860 : $f(x - delta x)$ is approximately $f(x) - f'(x) delta x$ because the derivative of a function linearizes it there, or equivalently, it is the sensitivity to a vanishingly small change in the input, and $delta x$ is such a vanishing change.
– The_Sympathizer
Nov 7 at 7:41
How did you get to that sum?
– inavda
Nov 7 at 6:06
How did you get to that sum?
– inavda
Nov 7 at 6:06
@inavda $sum_{i-a}a^b f(a) delta x$ is $f(a)delta x + f(a+delta x)delta x + dots + f(b-delta x) delta x + f(b)delta x$, but I can replace all $delta x$ with $x-(x-delta x)$. Then I can separate the $x$ and $x-delta x$ parts. (note the sum i am taking in $delta x$ increments)
– user106860
Nov 7 at 6:09
@inavda $sum_{i-a}a^b f(a) delta x$ is $f(a)delta x + f(a+delta x)delta x + dots + f(b-delta x) delta x + f(b)delta x$, but I can replace all $delta x$ with $x-(x-delta x)$. Then I can separate the $x$ and $x-delta x$ parts. (note the sum i am taking in $delta x$ increments)
– user106860
Nov 7 at 6:09
7
7
The error in your approximation looks like $f'(x) delta x$, but there are on the order of $frac{1}{delta x}$ terms in the sum, so you can't ignore it.
– Qiaochu Yuan
Nov 7 at 6:13
The error in your approximation looks like $f'(x) delta x$, but there are on the order of $frac{1}{delta x}$ terms in the sum, so you can't ignore it.
– Qiaochu Yuan
Nov 7 at 6:13
@QiaochuYuan If you could elaborate on why the error looks like that and the number of terms I would gladly accept that as an answer. If not, I am grateful for at least you comment. Thank you. (Also, intuitively it seems like you are saying "the error is not so big if the derivative is not large, but because the sum has many terms in the end it is not negligible. I was thinking something along those lines but was thinking if I could make "the error" small enough the number of terms shouldn't matter).
– user106860
Nov 7 at 6:16
@QiaochuYuan If you could elaborate on why the error looks like that and the number of terms I would gladly accept that as an answer. If not, I am grateful for at least you comment. Thank you. (Also, intuitively it seems like you are saying "the error is not so big if the derivative is not large, but because the sum has many terms in the end it is not negligible. I was thinking something along those lines but was thinking if I could make "the error" small enough the number of terms shouldn't matter).
– user106860
Nov 7 at 6:16
@user106860 : $f(x - delta x)$ is approximately $f(x) - f'(x) delta x$ because the derivative of a function linearizes it there, or equivalently, it is the sensitivity to a vanishingly small change in the input, and $delta x$ is such a vanishing change.
– The_Sympathizer
Nov 7 at 7:41
@user106860 : $f(x - delta x)$ is approximately $f(x) - f'(x) delta x$ because the derivative of a function linearizes it there, or equivalently, it is the sensitivity to a vanishingly small change in the input, and $delta x$ is such a vanishing change.
– The_Sympathizer
Nov 7 at 7:41
add a comment |
1 Answer
1
active
oldest
votes
up vote
16
down vote
accepted
Sure, $f(x) approx f(x-delta x)$, so you can pair off most of the terms in pairs that are approximately $0$. But they are only approximately zero, and there are a lot of them ($(b-a)/delta x$ of them, and $delta x$ is very small!). So, the total sum of them may still be non-negligible because there are so many of them.
Indeed, using the same reasoning, you could just say that in $sum f(x)delta x$ each term is very small, since $f(x)$ is bounded and $delta x$ is small. Your approach would then say that $0$ is a good approximation to the integral. Of course this is wrong, because although each term is small (roughly proportional to $delta x$), the number of terms is large in a way that cancels it out (proportional to $1/delta x$).
We can be more precise and say that $f(x)-f(x-delta x)approx f'(x) delta x$ if $f$ is differentiable. So, the errors in your terms are also roughly proportional to $delta x$, at least as long as $f'(x)$ is bounded and stays away from $0$. We can thus expect a non-negligible total error when we add up $(b-a)/delta x$ such errors.
To be even more precise, we can expect the error to be $int_a^b xf'(x), dx$, since each term of the error has the form $(x-delta x)(f(x)-f(delta x))approx xf'(x)delta x$. We can verify this rigorously: if you integrate $int_a^b f(x), dx$ by parts with $u=f(x)$ and $v=x$ (assuming $f$ is continuously differentiable) you get $$int_a^b f(x),dx=xf(x)bigg|_a^b-int_a^b xf'(x),dx=(bf(b)-af(a))-int_a^b xf'(x),dx.$$ The first term is exactly what you find with your approximation, so the error is indeed $int_a^b xf'(x),dx$. In this sense, then, the error you are making is akin to saying that the derivative of $xf(x)$ should be $f(x)$, which is what you get by differentiating just the $x$ factor but ignoring the fact that $f(x)$ may also be changing.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
16
down vote
accepted
Sure, $f(x) approx f(x-delta x)$, so you can pair off most of the terms in pairs that are approximately $0$. But they are only approximately zero, and there are a lot of them ($(b-a)/delta x$ of them, and $delta x$ is very small!). So, the total sum of them may still be non-negligible because there are so many of them.
Indeed, using the same reasoning, you could just say that in $sum f(x)delta x$ each term is very small, since $f(x)$ is bounded and $delta x$ is small. Your approach would then say that $0$ is a good approximation to the integral. Of course this is wrong, because although each term is small (roughly proportional to $delta x$), the number of terms is large in a way that cancels it out (proportional to $1/delta x$).
We can be more precise and say that $f(x)-f(x-delta x)approx f'(x) delta x$ if $f$ is differentiable. So, the errors in your terms are also roughly proportional to $delta x$, at least as long as $f'(x)$ is bounded and stays away from $0$. We can thus expect a non-negligible total error when we add up $(b-a)/delta x$ such errors.
To be even more precise, we can expect the error to be $int_a^b xf'(x), dx$, since each term of the error has the form $(x-delta x)(f(x)-f(delta x))approx xf'(x)delta x$. We can verify this rigorously: if you integrate $int_a^b f(x), dx$ by parts with $u=f(x)$ and $v=x$ (assuming $f$ is continuously differentiable) you get $$int_a^b f(x),dx=xf(x)bigg|_a^b-int_a^b xf'(x),dx=(bf(b)-af(a))-int_a^b xf'(x),dx.$$ The first term is exactly what you find with your approximation, so the error is indeed $int_a^b xf'(x),dx$. In this sense, then, the error you are making is akin to saying that the derivative of $xf(x)$ should be $f(x)$, which is what you get by differentiating just the $x$ factor but ignoring the fact that $f(x)$ may also be changing.
add a comment |
up vote
16
down vote
accepted
Sure, $f(x) approx f(x-delta x)$, so you can pair off most of the terms in pairs that are approximately $0$. But they are only approximately zero, and there are a lot of them ($(b-a)/delta x$ of them, and $delta x$ is very small!). So, the total sum of them may still be non-negligible because there are so many of them.
Indeed, using the same reasoning, you could just say that in $sum f(x)delta x$ each term is very small, since $f(x)$ is bounded and $delta x$ is small. Your approach would then say that $0$ is a good approximation to the integral. Of course this is wrong, because although each term is small (roughly proportional to $delta x$), the number of terms is large in a way that cancels it out (proportional to $1/delta x$).
We can be more precise and say that $f(x)-f(x-delta x)approx f'(x) delta x$ if $f$ is differentiable. So, the errors in your terms are also roughly proportional to $delta x$, at least as long as $f'(x)$ is bounded and stays away from $0$. We can thus expect a non-negligible total error when we add up $(b-a)/delta x$ such errors.
To be even more precise, we can expect the error to be $int_a^b xf'(x), dx$, since each term of the error has the form $(x-delta x)(f(x)-f(delta x))approx xf'(x)delta x$. We can verify this rigorously: if you integrate $int_a^b f(x), dx$ by parts with $u=f(x)$ and $v=x$ (assuming $f$ is continuously differentiable) you get $$int_a^b f(x),dx=xf(x)bigg|_a^b-int_a^b xf'(x),dx=(bf(b)-af(a))-int_a^b xf'(x),dx.$$ The first term is exactly what you find with your approximation, so the error is indeed $int_a^b xf'(x),dx$. In this sense, then, the error you are making is akin to saying that the derivative of $xf(x)$ should be $f(x)$, which is what you get by differentiating just the $x$ factor but ignoring the fact that $f(x)$ may also be changing.
add a comment |
up vote
16
down vote
accepted
up vote
16
down vote
accepted
Sure, $f(x) approx f(x-delta x)$, so you can pair off most of the terms in pairs that are approximately $0$. But they are only approximately zero, and there are a lot of them ($(b-a)/delta x$ of them, and $delta x$ is very small!). So, the total sum of them may still be non-negligible because there are so many of them.
Indeed, using the same reasoning, you could just say that in $sum f(x)delta x$ each term is very small, since $f(x)$ is bounded and $delta x$ is small. Your approach would then say that $0$ is a good approximation to the integral. Of course this is wrong, because although each term is small (roughly proportional to $delta x$), the number of terms is large in a way that cancels it out (proportional to $1/delta x$).
We can be more precise and say that $f(x)-f(x-delta x)approx f'(x) delta x$ if $f$ is differentiable. So, the errors in your terms are also roughly proportional to $delta x$, at least as long as $f'(x)$ is bounded and stays away from $0$. We can thus expect a non-negligible total error when we add up $(b-a)/delta x$ such errors.
To be even more precise, we can expect the error to be $int_a^b xf'(x), dx$, since each term of the error has the form $(x-delta x)(f(x)-f(delta x))approx xf'(x)delta x$. We can verify this rigorously: if you integrate $int_a^b f(x), dx$ by parts with $u=f(x)$ and $v=x$ (assuming $f$ is continuously differentiable) you get $$int_a^b f(x),dx=xf(x)bigg|_a^b-int_a^b xf'(x),dx=(bf(b)-af(a))-int_a^b xf'(x),dx.$$ The first term is exactly what you find with your approximation, so the error is indeed $int_a^b xf'(x),dx$. In this sense, then, the error you are making is akin to saying that the derivative of $xf(x)$ should be $f(x)$, which is what you get by differentiating just the $x$ factor but ignoring the fact that $f(x)$ may also be changing.
Sure, $f(x) approx f(x-delta x)$, so you can pair off most of the terms in pairs that are approximately $0$. But they are only approximately zero, and there are a lot of them ($(b-a)/delta x$ of them, and $delta x$ is very small!). So, the total sum of them may still be non-negligible because there are so many of them.
Indeed, using the same reasoning, you could just say that in $sum f(x)delta x$ each term is very small, since $f(x)$ is bounded and $delta x$ is small. Your approach would then say that $0$ is a good approximation to the integral. Of course this is wrong, because although each term is small (roughly proportional to $delta x$), the number of terms is large in a way that cancels it out (proportional to $1/delta x$).
We can be more precise and say that $f(x)-f(x-delta x)approx f'(x) delta x$ if $f$ is differentiable. So, the errors in your terms are also roughly proportional to $delta x$, at least as long as $f'(x)$ is bounded and stays away from $0$. We can thus expect a non-negligible total error when we add up $(b-a)/delta x$ such errors.
To be even more precise, we can expect the error to be $int_a^b xf'(x), dx$, since each term of the error has the form $(x-delta x)(f(x)-f(delta x))approx xf'(x)delta x$. We can verify this rigorously: if you integrate $int_a^b f(x), dx$ by parts with $u=f(x)$ and $v=x$ (assuming $f$ is continuously differentiable) you get $$int_a^b f(x),dx=xf(x)bigg|_a^b-int_a^b xf'(x),dx=(bf(b)-af(a))-int_a^b xf'(x),dx.$$ The first term is exactly what you find with your approximation, so the error is indeed $int_a^b xf'(x),dx$. In this sense, then, the error you are making is akin to saying that the derivative of $xf(x)$ should be $f(x)$, which is what you get by differentiating just the $x$ factor but ignoring the fact that $f(x)$ may also be changing.
edited Nov 7 at 6:42
answered Nov 7 at 6:18
Eric Wofsey
175k12202326
175k12202326
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2988194%2fwhy-dont-terms-in-the-summation-expression-for-an-integral-almost-cancel-out%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
How did you get to that sum?
– inavda
Nov 7 at 6:06
@inavda $sum_{i-a}a^b f(a) delta x$ is $f(a)delta x + f(a+delta x)delta x + dots + f(b-delta x) delta x + f(b)delta x$, but I can replace all $delta x$ with $x-(x-delta x)$. Then I can separate the $x$ and $x-delta x$ parts. (note the sum i am taking in $delta x$ increments)
– user106860
Nov 7 at 6:09
7
The error in your approximation looks like $f'(x) delta x$, but there are on the order of $frac{1}{delta x}$ terms in the sum, so you can't ignore it.
– Qiaochu Yuan
Nov 7 at 6:13
@QiaochuYuan If you could elaborate on why the error looks like that and the number of terms I would gladly accept that as an answer. If not, I am grateful for at least you comment. Thank you. (Also, intuitively it seems like you are saying "the error is not so big if the derivative is not large, but because the sum has many terms in the end it is not negligible. I was thinking something along those lines but was thinking if I could make "the error" small enough the number of terms shouldn't matter).
– user106860
Nov 7 at 6:16
@user106860 : $f(x - delta x)$ is approximately $f(x) - f'(x) delta x$ because the derivative of a function linearizes it there, or equivalently, it is the sensitivity to a vanishingly small change in the input, and $delta x$ is such a vanishing change.
– The_Sympathizer
Nov 7 at 7:41