1

The simplest possible case is confusing to me. Namely: $$ \int |x| dx = \cases { \int x dx = x^2/2 + C & $x \ge 0$ \\ -\int x dx = -x^2/2 + C & $x < 0$ } $$

However, since $|x|$ is non-negative, by comparison theorem it's integral should also be non-negative, even for negative $x$, but the integral is negative for any non-empty negative interval. Do you know what I am missing?

Thanks!

S11n
  • 898
  • 1
    Once you evaluate it, it will be positive. – Randall Mar 26 '22 at 16:38
  • How come, when $-x^2$ is negative? – S11n Mar 26 '22 at 16:40
  • 1
    $\int_{-1}^0 -x \ dx = 0 - \frac{-1}{2}= + \frac{1}{2}$. – Randall Mar 26 '22 at 16:41
  • Think about $f(x)=\cos x$. This is non-negative over the interval $[-\pi/2,0]$ yet its integral is $\sin(x) + C$ which is "negative"* over the same interval. Does that bother you? *It shouldn't, since it makes no sense to call it "negative": with $C=10000$ it is actually not negative. – Randall Mar 26 '22 at 16:42
  • The point: $\sin x$ is indeed negative, but the general antiderivative $\sin (x) + C$ is not. In fact, it makes no sense to talk about it being "negative." – Randall Mar 26 '22 at 16:46
  • 1
    (i) The fact $|x|$ is non-negative means the antiderivative is increasing, not positive. (ii) FWIW, if $n \geq 0$ then $\int |x|x^{n-1}, dx = \frac{1}{n+1}|x|x^{n} + C$. – Andrew D. Hwang Mar 26 '22 at 21:42
  • Thank you, all! It seems like all of you covered the second part of the original question, so I kept that, and I split now the first part of the question into a new one https://math.stackexchange.com/questions/4414370/case-analysis-of-indefinite-integrals. I would prefer if any of you can now write the complete answer, so I can close this question. – S11n Mar 28 '22 at 09:00
  • I deleted because I thought I was making the wrong point. Maybe I'll revisit. – Randall Mar 28 '22 at 13:37

1 Answers1

1

Yes, integrals should be treated with care around points of discontinuity. For this reason, integrals should be treated independently on separate intervals where the integrand is continuous. However, in practice, this rarely matters. The Mean Value Theorem guarantees that any two antiderivatives of $f(x)$ will differ only by a constant across an interval. So, if you have to "jump" over a discontinuity this will cause you to work over two separate intervals. The good example is that the integral of $\frac{1}{x^2}$ should really look like $$ \int \frac{1}{x^2} \ dx = \begin{cases} -\frac{1}{x}+C_1, & x > 0 \\ -\frac{1}{x}+C_2, & x < 0.\end{cases} $$ However, we wouldn't integrate over an interval that crosses over $0$ anyway, so in practice you only need one of these cases, but they both have the exact same form. Hence, we get lazy about the distinction, but you are right, the most general form has an independent constant for each interval of continuity.

For the second question, the definite integral of a non-negative continuous function will, in fact, be non-negative. Key word: definite integral.

You are confounding the definite integral with the general antiderivative. In fact, you cannot say that a general antiderivative is "negative" (or positive, or non-negative) because it is not one function but an infinite class of functions "parameterized" by your choice of $C$. So, for some $C$ it could be negative, for others not, and for many choices, both. But it doesn't really matter, since you should really be asking about what the definite integral does.

Randall
  • 18,542
  • 2
  • 24
  • 47
  • Yes, thank you, that second part of the question is now clear. But could you also answer the first part of the question, so I can consider it answered (and close it)? – S11n Mar 26 '22 at 16:49
  • Sure, give me a sec. – Randall Mar 26 '22 at 16:50