Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the following function: $$f(x)=\begin{cases} 7-x, &\: 0 \leqslant x \leqslant 7 \\ x-7, &\: 7 \lt x \leqslant 14 \end{cases}.$$ Find the exact value of $\int_0^{14}f(x)\,\mathrm dx$.

I answered 0 because I separated them into two integrals, and I got in both of the integrals 24.5. Therefore, i subtracted them and the answer was 0.

What's the right way to answer this question ?

share|cite|improve this question
You shouldn't have subtracted them but added them instead. – Cameron Williams Jul 9 '14 at 1:02
Can you explain why you subtracted? And how do you determine which one subtract which one? – Gina Jul 9 '14 at 7:09

Hint. The easiest way is to draw the graph of the function and use geometry, not calculus.

share|cite|improve this answer

You're supposed to add the integrals, which would give you a value of 49. To see why, just graph the function and you'll see that the area under the function is always positive (above the x-axis).

share|cite|improve this answer


$$\int_0^{14} f(x) \, dx=\int_0^7 (7-x)\,dx+\int_7^{14} \, (x-7) \, dx.$$

share|cite|improve this answer

$$\int_0^{14} f(x) \,\mathrm{d}x=\int_0^7 f(x) \,\mathrm{d}x+\int_7^{14} f(x) \,\mathrm{d}x$$

$$=\int_0^7 (7-x)\,\mathrm{d}x+\int_7^{14} (x-7)\,\mathrm{d}x$$

$$=\left[7x-\frac{x^2}{2} \right]_0^7+\left[\frac{x^2}{2}-7x \right]_7^{14}$$

$$=\left[\frac{49}{2}-0 \right]+\left[0--\frac{49}{2} \right]$$

$$\therefore 49$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.