How to calculate this integral #int_-2^2 f(x)dx#?

Where #f(x) = {(x+2 if x \ge 0),(-x^2+2 if x<0):}#
Now I've calculated
#int_-2^0 -x^2+2dx# + #int_0^2 x+2dx# = #22/3#
Is the answer right?

Now let's call this function #g(x) = -x^2+2# and in the definition of #f(x)# is used only for #x < 0#, why we calculate #int_-2^(0) g(x)# and not #int_-2^(0^-) g(x)#?
I mean #0# is not included in the interval

1 Answer
Jan 23, 2018

Please see below.

Explanation:

I don't know what your notation on the upper limit of #0^-# means.

In any event, for this function we could have just as easily said

#f(x) = {(x+2,"if", x >= 0),(-x^2+2,"if", x <= 0):}#

because either rule makes #f(0) = 2#.

Moreover

As long as there is no vertical asymptote at the endpoint of the interval, the function need not be continuous on a closed interval in order to be integrable.

All necessary limits exist and are the same for

#F(x) = {(x+2,"if", x > 0),(9,"if",x = 0),(-x^2+2,"if", x < 0):}#

as for the function you asked about.

So #int_-2^2 F(x) dx = int_-2^2 f(x) dx#

And even

#G(x) = {(x+2,"if", x > 0),(9,"if",x = 0),(-x^2+5,"if", x < 0):}#

is integrable on #[-2,2]#. Because the limits needed for integrability do exist.