Definite integral of piecewise function

Definite integral of piecewise function DEFAULT

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 * and * are unblocked.

Current time:0:00Total duration:6:14

Finding antiderivatives and indefinite integrals: basic rules and notation: definite integrals

Video transcript

AP® is a registered trademark of the College Board, which has not reviewed this resource.

Example 1

This first example shows a piecewise function:


In Example 1, for x < 1, the expression is 1 + x. For x ≥ 1, the expression is x2. We can integrate this function piecewise by using separate definite integrals with the corresponding expressions. Let's start by integrating Example 1 piecewise between − 1 and 3.

We start with a general expression for our definite integral, which you can see here:


We can break this into two separate integrals based on the boundaries of the definite integral. Let's use a number line to identify which expression applies based on the x-values:


Looking at the number line, we see how we can set up two integrals based on the x-boundaries. We're going to go from x = -1 to x = 1 for the first expression, then we continue to the next expression from x = 1 to x = 3. The piecewise integrals are as follows:


We evaluate these integrals and then add the results. Let's evaluate the first integral. We start by integrating the function in preparation for evaluating the result between − 1 and 1. This gives us the following:


Now, we evaluate the equation between the boundaries, ultimately resulting in 2:


Now we can complete the second integral in preparation to evaluate it between 1 and 3:


Evaluating this integral we get:


Now, we add both results together to get the final answer, which is:


Example 2

Let's work another example of piecewise integration. This time we will deal with a piecewise function involving two trigonometric functions. The piecewise function is shown in this next example appearing here:


Let's evaluate this function between -π and 2π. The general expression for this problem is as follows:


It can be really helpful to set up the number lines to see which function applies between the boundaries so we can break it up:


The piecewise integral setup is as follows:


Starting with the first integral, we get the following:


Evaluating this we get simply 0, as a result of subtracting sinπ minus sin-π

Now we're set to integrate the second function giving us the following results:


Evaluating this expression between the boundaries results in -cos2π minus -cosπ, which as you can see, simplifies down to -2.


Finally, we add the two results of 0 and -2, giving us -2:


Example 3

We'll do one more example of integrating a piecewise function, which is shown in this next image appearing here:


We'll evaluate this integral from -1 to 1. We start with the general expression, which is as follows:


Setting up the number line, showing which function applies between the boundaries, we get this linear arrangement:


Now, we can set up the piecewise integration expression, which is the following:


Now we integrate both of the integrals simultaneously. Remember that when we integrate ex, we're going to end up with an ex, so this results in the following:


Finally we evaluate both integrals resulting


which comes out to approximately 2.05. And that's it!

Lesson Summary

All right, let's take a moment to review the important information from this lesson. A piecewise function is a function that has different expressions based on where it's to be evaluated on the x-axis. When doing definite integrals of piecewise functions, you set up multiple integrals based on which expression are valid between the boundaries. It's helpful to sketch a number line showing the boundaries of the integral and which expression applies in each interval. From there, evaluate each integral and sum your results. As long as you pay careful attention to the ''pieces'' of a piecewise function, you should have smooth sailing!

  1. Swedish house mafia concert 2016
  2. Ranch homes for sale in
  3. Pet classifieds springfield, mo

Definite Integrals of Piecewise Functions

Imagine a graph with a function drawn on it, it can be a straight line or a curve or anything as long as it is a function. Now, this is just one function on the graph, can 2 functions simultaneously occur on the graph? Imagine two functions simultaneously occurring on the graph, say, a straight line and a curve, and the limits on the x-axis for which they occur are the same, can this be called a function? No. The two values of the function for a single input is not a Function. Then, how to arrange two functions on a graph? Simple, just make sure that the limits for which they both exist are different and not the same, these types of functions where either on function breaks on different x-axis values or two or more than two functions are defined at different limits are known as piecewise-functions.

Definite Integration

Integration is finding the area between the function and the axis (can be x-axis or y-axis based on the function). Integration can be finite or infinite, for infinite functions, that exist up to infinity or start from infinity, the area for such functions are known as indefinite integrals, whereas if some boundaries are applied to limit the function in some finite value present on the axis, it will be called as definite integrals.

Definite integration has start and end boundaries. Assume the extreme limits go from a to b. The function from a to b shall look like,

Integration is given by ⇢ \int^b_a{f(x)dx}

Example: Find the area under the graph of function y=4x, the boundaries are defined from 0 to 5 on x-axis. Solve both by integration and simply solving the area using formula.


The function on the graph shall look like,

The above graph shows exactly what area is to be measured,

Integral of y=4x from 0 to 5 = \int^5_0{4xdx}\\=4[\frac{x^2}{2}]^5_0\\=2[25-0]\\=50unit^2

The area looks like a triangle and hence, another way of solving this is by simply finding the area of the triangle.

For height of the triangle, at x = 5, y = 4 × 5 = 20 units.

Base = 5 units, Height = 20 units.

Area of the triangle = 1/2 × 5 × 20

= 10 × 5

= 50 units2

Definite Integrals of piecewise functions

In order to integrate functions piecewise, it is required to break the integration at the exact breakpoints. Breaking the integrals will give two different functions for different upper and lower limits, and it becomes easy to integrate them separately. The same can be done for more than two functions, the breakpoints and the number of integration will increase in such case. 

Piecewise-function’s can be represented as,

f(x)= \begin{cases} f_1(x), a\leq x \leq b\\ f_2(x), b<x \leq c \end{cases}

\int^c_af(x)dx= \int_a^bf_1(x)dx+ \int_b^cf_2(x)dx

Here, the limit has a break point at c, and the two functions are f1(x) and f2(x).

The above conditional function has definite integrals of fixed end points.

Function with fixed lower endpoints, variable upper endpoints

f(x)= \begin{cases} f_1(x), if x<a\\ f_2(x), if x>a \end{cases}

Application of Definite integrals of piecewise function

Below are some examples of piecewise functions that are very often seen in mathematics,

Modulus function are the functions that break at a point, and they are represented as,

|x|= \begin{cases} x, x\geq 0\\ -x, x<0 \end{cases}

  • Greater Integer Function, [x]

In definite integrals, if the value obtained is some decimal, the greater integer condition will bring out the integer part of the value, for example, [8.34] will give 8.

  • Fractional Part of Function, {x}

Fractional part of x is derived or obtained from greater integer of the function only.

It is defined as, {x} = x-[x]

Sample Problems

Question 1: A conditional function is given as, f(x)= \begin{cases} x, if x<2\\ x^2, if x>2 \end{cases}

Find the definite integral of \int_0^4f(x)dx


The above conditional function has two functions involved, one is a straight line and the other is a parabola, the break point of the limit is 2 and below 2, the function is a straight line x, above 2 or after 2, it is a parabola x2.

Keeping this in mind the definite integral can be easily broken as,

\int_0^4f(x)dx= \int_0^2xdx + \int_2^4x^2dx \\=[\frac{x^2}{2}]_0^2+[\frac{x^3}{3}]_2^4 \\=2+21.333-2.666\\=20.667

Question 2: Evaluate the definite integral \int_{-1}^1 f(x)dx, where f(x)= \begin{cases} 1, -1\leq x \leq0\\ 3+x^2, 0<x \leq 1 \end{cases}


The above function has two different functions involved on different limits, the breakpoint of the limit is 0, and before to -1, the function is 1, and after 0 to 1, the function is 3+x2.

Let’s solve,

\int_{-1}^1f(x)dx= \int_{-1}^01dx + \int_0^13+x^2dx\\=[x]_{-1}^0+[3x]_0^1+[\frac{x^3}{3}]_0^1\\=1+[3-0]+[1/3-0]\\=1+3+1/3\\=4+1/3\\=\frac{13}{3}

Question 3: Find the area of the function given below with the help of definite integration,


There are three different functions from -1 to 4, y=3, y=2+x, y=4. Let’s integrate these function with the help of piecewise integration of functions.

\int_{-1}^4f(x)dx= \int_{-1}^13dx + \int_1^22+xdx + \int_2^44dx\\=[3x]_{-1}^1+[2x]_1^2+[\frac{x^2}{2}]_1^2+[4x]_2^4\\=6+3+2-0.5+16-8\\=19-0.5\\=18.5

Question 4: Solve the integration \int_{-1}^1f(x)dx  when the function is given as, f(x)= |x|.


The integration for modulus of x or |x| can be solved only after knowing the meaning of |x|, |x| is defined as,

|x|= \begin{cases} x, x\geq 0\\ -x, x<0 \end{cases}

Hence, the function can be broken as,

f(x)= \begin{cases} x, x\geq 0\\ -x, x<0 \end{cases}

\int_{-1}^1f(x)dx= \int_{-1}^0-xdx+\int_{0}^1xdx\\=-[\frac{x^2}{2}]_{-1}^0+[\frac{x^2}{2}]_0^1\\=-[0-1/2]+[1/2]\\=1/2+1/2 \\=1

Question 5: Evaluate the given function, I= \int_0^3|2-x|dx


The above function is a modulus function and hence, it will have break point, lets find out the break point for |2-x|,

As it is known that the modulus function will have 2 values, one positive and one negative, but it is important to find out where the values or the function as a whole starts to change,

The lower limit is 0, if 0 is put, the value obtained is 2 which is positive, now put 1, value obtained is 1, but if any value above 2 is put, the value if negative, hence, the break point is 2.

f(x)= \begin{cases} 3-x, 0 \leq x \geq 2\\ x-3, 2<x \leq 3\end{cases}

\int_0^3|3-x|dx= \int_0^2(3-x)dx+\int_2^3(x-3)dx\\=[3x]_0^2-[\frac{x^2}{2}]_0^2+[\frac{x^2}{2}]_2^3-[3x]_2^3\\=6-2+9/2-2+9-6\\=9.5

Attention reader! All those who say programming isn’t for kids, just haven’t met the right mentors yet. Join the  Demo Class for First Step to Coding Course, specifically designed for students of class 8 to 12. 

The students will get to learn more about the world of programming in these free classes which will definitely help them in making a wise career choice in the future.

Limits - Piecewise Functions

There were no girls with us, Seryoga ran away with his last week, and somehow it didn't go well with me. In general, an ordinary summer evening. It was hot outside, so after taking a shower and grabbing a couple of bottles of cold beer from the refrigerator, we.

Of definite piecewise function integral

I like brave men. With these words, she approached the young man and hugged him by the neck with a gentle movement. Kiss me, the beauty demanded.

How to Find the Definite Integral of a Piecewise Function

Minute. That night she did not let me in. Her mother, Natalya Borisovna, divorced her husband 19 years ago, and apparently since then she hated all men.

You will also be interested:

And through Aunt Masha he whispers to me: This demoniac left, he was always eager to see you, and his face was red, even light a cigarette, he-he. But I drove him away again, they say the doctor can't cure you, Ill probably still have to finish you off. He already gritted his teeth, twirled around and left.

1848 1849 1850 1851 1852