How do you evaluate the definite integral #int abs(x^2-4)dx# from [0,3]?

2 Answers
Dec 2, 2016

# int_0^3 |x^2-4|dx = 23/3 #

Explanation:

This is the graph of #y=x^2-4#:
graph{x^2-4 [-10, 10, -5, 5]}
This is the graph of #y=|x^2-4|#:
graph{|x^2-4| [-10, 10, -5, 5]}

It should be clear that #|x^2-4|=0=>x^2=4=>x=+=2 #

So,
# \ \ \ \ \ int_0^3 |x^2-4|dx = int_0^2-(x^2-4)dx + int_2^3(x^2-4)dx #

#:. int_0^3 |x^2-4|dx = int_2^3(x^2-4)dx - int_0^2(x^2-4)dx #

#:. int_0^3 |x^2-4|dx = [1/3x^3-4x]_2^3 - [1/3x^3-4x]_0^2 #

#:. int_0^3 |x^2-4|dx = {(1/3*27-4*3)-(1/3*8-4*2)} - {(1/3*8-4*2)-0} #
#:. int_0^3 |x^2-4|dx = {(9-12)-(8/3-8)} - {(8/3-8)} #
#:. int_0^3 |x^2-4|dx = {(-3)-(-16/3)} - {(-16/3)} #
#:. int_0^3 |x^2-4|dx = -3 +16/3+16/3 #
#:. int_0^3 |x^2-4|dx = 23/3 #

Dec 2, 2016

Without considering the graph of the integrand, see below.

Explanation:

We are asked to evaluate #int_0^3 |x^2-4|dx#.

We know that

#|x^2-4| = {(x^2-4,if, x^2-4 >= 0),(-(x^2-4),if,x^2-4 < 0) :}#

Investigate the sign of ##(x^2-4)## on ##[0,3]##

#x^2-4= 0# at #x= +- 2# so we need #x = 2# (We are only interested in values of #x# between #0# and #3#)

A sign analysis reveals that #x^2-4# is negative on #[0,2]# and positive on #[2, 3]#.

Split up the integral

#int_0^3 |x^2-4|dx = int_0^2 -(x^2-4) dx +int_2^3 (x^2-4) dx#

# = (16/3) + (7/3)= 23/3#

I have a preference for the preceding method. As a student, I used a version of the following.

As soon as we learn that the zeros are #+-2# we can integrate from 0 to 2 and also integrate from 2 to 3. If we get a negative answer, we'll make it positive. Then add the positive numbers together.

Formally, we use

#int_0^3 |x^2-4|dx = abs(int_0^2 (x^2-4) dx) + abs(int_2^3 (x^2-4) dx)#

# = abs(-16/3)+abs(7/3) = 23/16#.