What's the error in this "proof"?

All right, I was working on a problem set yesterday, and I came up with the following proof of an absurd conclusion. Even though it’s not directly related to the homework, I was curious as to where the error is. I can’t find it, so I figure I’m being dense and the best thing to do is to put it to y’all.

First, I need some notation. Let f be a real-valued function which is integrable on the closed interval [a, b]. Let f[sub]+/sub be equal to f(x) if f(x) > 0, and 0 otherwise. Let f[sub]–/sub be equal to -f(x) if f(x) < 0, and 0 otherwise. Let J(f) be the integral of f over [a, b]. I would use I(f), but that doesn’t show up well in absolute value expressions, which I will be using extensively.

It follows that f[sub]+/sub > 0, and f[sub]–/sub > 0. Moreover, f(x) = f[sub]+/sub - f[sub]–/sub. These are pretty simple proofs, so I won’t bother including them.

So here’s my fallacious proof:

We consider the quantity |J(f)|. f = f[sub]+[/sub] - f[sub]–[/sub], so |J(f)| = |J(f[sub]+[/sub] - f[sub]–[/sub])|. J(f[sub]+[/sub] - f[sub]–[/sub]) = J(f[sub]+[/sub]) - J(f[sub]–[/sub]), so |J{f}| = |J(f[sub]+[/sub]) - J(f[sub]–[/sub])|. By the triangle inequality, |J(f[sub]+[/sub]) - J(f[sub]–[/sub])| < |J(f[sub]+[/sub])| - |J(f[sub]–[/sub])|. Both J(f[sub]+[/sub]) and J(f[sub]–[/sub]) are non-negative, so |J(f[sub]+[/sub])| - |J(f[sub]–[/sub])| = J(f[sub]+[/sub]) - J(f[sub]–[/sub]). Therefore, we have that |J(f)| < J(f[sub]+[/sub]) - J(f[sub]–[/sub]). But J(f[sub]+[/sub]) - J(f[sub]–[/sub]) = J(f[sub]+[/sub] - f[sub]–[/sub]), which is equal to J(f). Therefore, |J(f)| < J(f).

Clearly, this result is absurd, but I’ll be double-darned if I can spot the error in my logic. Anybody see it?

You got the triangle inequality backwards:

|a-b| >= |a| - |b|

I hope I’m not screwing up…

Not true! if it was, the following would be true:
2 = |1 - (-1)| < |1| - |-1| = 1 - 1 == 0

[sub] Nice code by the way![/sub]

Merde! beaten by a cabbage… (Spent too long previewing…)

Yeah, that would do it, wouldn’t it? Thanks so much (and you too, tc).

No problem. At times I’ve spent hours driving myself crazy, trying to spot a flaw in a proof, only to show it to someone else who immediately spots the obvious mistake. Happens to everyone, sometimes it helps to get “fresh eyes” to look at something. Glad to be of help. :slight_smile: