If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Class 12 math (India)>Unit 10

Lesson 8: Definite integrals of piecewise functions

# Definite integral of piecewise function

Sal evaluates definite integral of a piecewise function over an interval that goes through the two cases of the function.

## Want to join the conversation?

• hello,

I don't understand why we can split the integral in two distinct integral.

the first from -1 to 0 and the second from 0 to 1.

f(x) = x+1 for value of x < 0

so f(x) = x+1 is not defined for 0

what I am missing ?

thanks

best regards

please forgive my approximate English, I'm French.
• It is one of the properties of the definite integral. The definite integral is just the area under the function point x=a to x=b. Now if you pick a point x=c between (a,b) and draw a line there, wouldn't the area from a to b is the same as a to c plus c to b? It's easier to see with a graphical illustration. So try to do that.
• My apologies if this sounds like a stupid question, but since it is x<0, then why are we writing the integral from -1 to 0 if it is less than 0? We could have written it from -1 to 0 if it was x<or equal to zero. So, what am I doing wrong?
• Hi Oliver,

I don't think you really answered redsondeathstroke40's question ^^
I understand the principle of cutting two functions and glueing them back together.
However, what makes it possible to use F(-1) - F(0) as the area under the curve for the first equation, since this equation doesn't include 0 ?

Now, I think I get it : since the result of both equations for x=0 happens to be 0, it doesn't change the result to operate in this way. But wouldn't this lead to a mistake if it weren't the case ?
• At seconds, wouldn't it be better to take the limit as some arbitrary letter (I used "n") approaches zero for the top bound of the first definite integral in that pair? I ask because the way the function is defined says "x+1" is not defined for x=0, but cos(pix) is.
• At I am confused about why 1/π is used instead of of π . Please, help!
• My thinking is that we're looking for the anti-derivative of cos(pi x) but we don't know it, we only know the anti-derivative if we pretended pi were applied to x as part of the chain rule. But to do that we have to add a multiple pi. But, you can't just add something, you have to counteract it, so you multiply it by 1/pi. Now you know that the anti-derivative of pi cos(pi x) is sin(pi x) by the reverse chain rule, and you can apply it, and are left with 1/pi as a constant multiple. If you didn't have the constant multiple you wouldn't be able to assume a reverse chain rule. Not sure if that makes any sense..
(1 vote)
• At , x+1 is not define at x = 0, is it okay to take the integral of f(x) at the interval [-1, 0]?
• that's one of the properties of definite integrals.

it is easier to see if we visualize both parts of the function at x=0.

the limit of x+1 as x approach 0 is 1.

cos(πx)=1 when x=0.

this means we have a continuous function at x=0.

now, sal doesn't graph this, but you can do it to understand what's going on at x=0.

if we have 3 x'es a, b and c, we can see if a(integral)b+b(integral)c=a(integral)c.

in this case we have a=-1, b=0 and c=1.

so the integrals can be added together if the left limit of x+1 and the right limit of cos(πx) is equal at x=0.

i hope this was a little helpful!
• I saw in one of the videos the that when you are taking the definite integral from a to b, a and b are included. In this video Sal uses 0 for the upper bound for the first integral. If the piecewise function defines using x + 1 only for x < 0, why are we allowed to use 0 for the upper bound? Thanks in advance!
• We are allowed to use zero as the upperbound because the function is continuous at x = 0. The limit as the piecewise function approaches zero from the left is 0+1=1, and the limit as it approaches from the right is Cos(Pi*0)=Cos(0)=1. We separate the integral from -1 to 1 into two separate integrals at x=0 because the area under the curve from -1 to 0 is different than the are under the curve from 0 to 1. The functions evaluated at x=0 are the same, so adding the two definite integrals after we evaluate them at their A's & B's gives us the total area of the piecewise function from -1 to 1. I hope that helps!
• Would the definite integral of this piecewise function still be the same if the function weren't defined at x=0?
• It depends what happens at x=0. If there is a vertical asymptote, then you might still be able to find that area anyway... think about it again after you've studied convergent series. If it's a removable discontinuity, then removing one point from the function is subtracting an area of 0 from the total, and it should still be the same answer as if it were defined at 0.
• This may be a strange question, but it just came to me. If we split an integral up like this, evaluate them, and then add, are we evaluating at x=0 twice? In this example especially, our bounds would both include zero for two different functions, and we would evaluate at zero for the expression x+1 when zero isn't in its domain.

Thinking graphically, the expression x+1 wouldn't include 0, but we would still be finding the area under f(0) in two different spots. Maybe I'm just wrong or it's simply negligible. Or is it more true that the upper bound of the integral with integrand x+1 would be approaching zero, but not equal to it?