Open In App

Definite Integrals of Piecewise Functions

Last Updated : 25 Oct, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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 ⇢ [Tex]\int^b_a{f(x)dx}[/Tex]

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.

Solution:

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 = [Tex]\int^5_0{4xdx}\\=4[\frac{x^2}{2}]^5_0\\=2[25-0]\\=50unit^2[/Tex]

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,

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

[Tex]\int^c_af(x)dx= \int_a^bf_1(x)dx+ \int_b^cf_2(x)dx[/Tex]

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

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

Application of Definite integrals of piecewise function

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

  • Modulus Function, |x|

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

[Tex]|x|= \begin{cases} x, x\geq 0\\ -x, x<0 \end{cases}[/Tex]

  • 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]

Solved Examples on Definite Integrals of Piecewise Functions

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

Find the definite integral of [Tex]\int_0^4f(x)dx[/Tex]

Solution:

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,

[Tex]\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[/Tex]

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

Solution:

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,

[Tex]\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}[/Tex]

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

Solution:

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.

[Tex]\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[/Tex]

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

Solution:

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

[Tex]|x|= \begin{cases} x, x\geq 0\\ -x, x<0 \end{cases}[/Tex]

Hence, the function can be broken as,

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

[Tex]\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[/Tex]

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

Solution:

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.

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

[Tex]\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[/Tex]

Practice Questions on Definite Integrals of Piecewise Functions

Question 1. Evaluate ∫[0 to 4] f(x)dx, where f(x) = {

x, 0 ≤ x < 2

4-x, 2 ≤ x ≤ 4

Question 2. Calculate ∫[-2 to 2] |x|dx

Question 3. Find ∫[-1 to 3] g(x)dx, where g(x) = {

x², x < 1

2x-1, 1 ≤ x ≤ 3

Question 4. Compute ∫[0 to 3] h(x)dx, where h(x) = {

sin(x), 0 ≤ x < π/2

1, π/2 ≤ x ≤ 3

Question 5. Evaluate ∫[-1 to 4] f(x)dx, where f(x) = {

x+1, x < 2

5-x, 2 ≤ x ≤ 4

Question 6. Find ∫[-2 to 2] g(x)dx, where g(x) = {

x², x < 0

√x, 0 ≤ x ≤ 2

Question 7. Calculate ∫[0 to 4] h(x)dx, where h(x) = {

x², 0 ≤ x < 2

4, 2 ≤ x ≤ 4

Question 8. Evaluate ∫[-1 to 3] f(x)dx, where f(x) = {

|x|, x < 1

x², 1 ≤ x ≤ 3

Question 9. Compute ∫[-2 to 4] g(x)dx, where g(x) = {

2, x < 0

x, 0 ≤ x < 2

4-x, 2 ≤ x ≤ 4

Question 10. Find ∫[0 to 2π] h(x)dx, where h(x) = {

sin(x), 0 ≤ x < π

cos(x), π ≤ x ≤ 2π

Conclusion

Definite integrals of piecewise functions require a systematic approach to calculate the area under curves that change their definition over different intervals. The key strategy involves breaking the integral at the function’s discontinuity points and evaluating each piece separately the process involves identifying all relevant boundaries (both from the integration limits and the piecewise function’s definition), sorting these points, and evaluating separate integrals for each resulting sub-interval using the appropriate piece of the function. The technique of breaking down complex piecewise integrals into simpler parts not only makes calculations manageable but also provides insights into the geometric interpretation of the areas being calculated.

Definite Integrals of Piecewise Functions – FAQs

How do you determine where to split the integral for a piecewise function?

Split the integral at points where the function definition changes and at the given integration limits. Sort all these points in ascending order and evaluate separate integrals for each resulting interval using the appropriate piece of the function.

What should you do when the integral bounds don’t align with the piecewise function’s intervals?

Create additional split points at the piecewise function’s transition points within the integration bounds. Evaluate separate integrals for each sub-interval, using the correct function piece for each.

How do you handle potential discontinuities in piecewise functions when integrating?

Discontinuities don’t affect the integration process directly; simply split the integral at discontinuity points. The definite integral will still give the correct signed area, even across discontinuous jumps.

Can absolute value functions be treated as piecewise functions for integration?

Yes, |x| can be rewritten as a piecewise function: x for x ≥ 0 and -x for x < 0. Split the integral at x=0 and integrate each piece separately.

What are common mistakes to avoid when integrating piecewise functions?

Common errors include forgetting to split the integral at all necessary points, using the wrong piece of the function for an interval, and incorrect signs when evaluating definite integrals.



Next Article

Similar Reads

three90RightbarBannerImg