PIECEWISE FUNCTION: How to Graph Piecewise Defined Functions? Brief Introduction, Examples and Uses:-
- Introduction
- Examples: How to Graph Piecewise-Defined Function?
- How to use piecewise function calculator to sketch its graph?
- Learn how to use Desmos Graphing Calculator to sketch a piecewise function
- Uses/Applications of piecewise functions
- Conclusion
Introduction
Certain functions are defined differently on different parts of their domain and are thus more naturally expressed in terms of more than one formula. We refer to such function as piecewise function or piecewise-defined function. Piecewise functions will be useful to us in the study of limits, continuity, and the derivative as examples and counterexamples of functions having certain properties.
If you don’t find enough time to complete this article in a single read, make sure to BOOKMARK this page for future saturation if you don’t want to miss this useful content.
Examples: How to Graph Piecewise-Defined Function?
Example#1
Let f be the function defined by;
Determine the domain and range of f, and sketch its graph.
Solution:-
The domain of f is (-∞, +∞), the following figure shows the graph of ‘f’;

it consists of the portion of the line y=x-1 for which x<3, the point (3,5), and the portion of the line y = 2x+1 for which 3<x. The function values are either numbers less than 2, the number 5, or the numbers greater than 7. Therefore the range of f is the number 5 and the numbers (-∞, 2) ∪ (7, +∞).
Example#2
Let g be the function defined by;
Determine the domain and range of g, and sketch its piecewise graph.
Solution:-
The domain of g is (-∞, +∞), following is the graph of the function;

The graph contains the portion of the line y= 3x-2 for which x<1 and the portion of the parabola y = x2 for which 1 ≤ x. The range is (-∞, +∞).
Example#3
The H be the function defined by;
Determine the domain and range of H and sketch its graph.
Solution:-
As H is defined for all x, its domain is (-∞, +∞), the graph is sketched below;

The range is the set of all real numbers except 6, so in terms of set, we can express range as ℝ-{6}.
Example#4
The piecewise function f is defined by;
Determine the domain and range of f and sketch its graph.
Solution:-
Because f is defined for all x, the domain is (-∞, +∞). The graph appearing below;

consists of the point (2, 7) and all the points on the parabola y = x2 except (2, 4). The range is [0, +∞).
Example#5
Determine the domain and range of the absolute value function ‘f’ for which f(x) = |x| and sketch its graph.
Solution:-
From the definition of absolute value function |x|, f(x) is defined piecewise as below,
The domain is (-∞, +∞). The graph of ‘f’ consists of two half-lines through the origin and above the x-axis.

one has slope 1 and the other has slope -1. The range is [0, +∞).
Example#6
The piecewise function f is defined by;
Determine the domain and range of ‘f’ and sketch its graph.
Solution:-
The domain of g is (-∞, +∞), following is the graph of the function;

Example#7
A piecewise function f is defined by;
Determine the domain and range of ‘f’ and sketch its graph.
Solution:-
The domain of g is (-∞, +∞), following is the graph of the function;

This is a continuous graph having a range (-∞, +∞).
Example#8
A piecewise function f is defined by;
Determine the domain and range of ‘f’ and sketch its graph.
Solution:-
The domain of g is (-∞, +∞), following is the graph of the function;

The range is (-∞, 6).
Example#9
Sketch the graph of the signum function (or sign function), denoted by “sgn” and defined piecewise as below;
sgn x is read “signum of ‘x'”.
Solution:-
The domain of sgn x is (-∞, +∞). Following is the graph of sign (signum) function;

The range comprises mere three integers as mentioned in the question i.e. {-1, 0, 1}.
Example#10
Sketch the graph and determine the domain and range of the following piecewise function h(x):
Solution:-
The domain is (-∞, +∞), following is how we have sketched the graph;

And the range is (-∞, -2) ∪ [0, 5].
How to use piecewise function calculator to sketch its graph?
There are various online and downloadable graphing calculators available that facilitate users to sketch piecewise functions, few are as under;
- Desmos Graphing Calculator
- Symbolab
- TI-84
- Mathlab (Get it on google play)
Learn how to use Desmos Graphing Calculator to sketch a piecewise function
Here I am going to elaborate on how to sketch piecewise functions graph using Desmos graphing calculator?
In the above video, I have selected a few of the examples that were solved and sketched manually in this article, and input their piecewise definitions with corresponding domains in order to obtain their graph, I have picked Example#1 here and tried to substitute commands on Desmos interface, let’s try to understand step by step.
STEP#1
- Open Desmos graphing calculator
- Type first piecewise domain and then the particular function seperated by “:”
- Enclose this command in { } brackets.

STEP#2
As ‘3’ is not included in the first piecewise domain “x<3” this means that the subjective graph does not contain (3, 2), so we have to develop a “hole” there, for this purpose;
- Click on “+” icon at the top right, this will open next expression tab.
- Type (3, 2)

- Press on the colorful circle next to (3,2), you’ll get a panel from where you can select the hollow circle option.
- Click on the hollow-point icon.

First piecewise is now accomplished.
STEP#3
- Plot the point (3, 5), that was the second definition of given piecewise function.
- Keep it a solid point.

STEP#4
- Finally type y= {3<x : 2x+1}
- We will get another straight line representing the graph of f(x) = 2x+1 within the domain containing all values of x>3.

- As “3” is not included in the domain of f(x)= 2x+1, so we are not going to include (3, 7).
- Type (3,7) as another expression and make it a “hole”.

STEP#5
- Lets apply aforementioned strategies in Example#10

For more examples, you can watch my aforementioned video.
Uses/Applications of piecewise functions
Piecewise functions in addition to Calculus magnanimously contribute in mathematical modeling of various day-to-day real-life problems, which are later evaluated to get optimal and exact solutions. I have tried to compile some examples from the fields of Accounts, Physics, Biology, etc, which would help you to get an idea about the applications and significance of piecewise functions.
- In Denmark, income tax is assigned on the basis of income value, here f(x) is function that represents the percentage of income that is deducted as tax and ‘x’ defines the income value.
- I am willing to order caps for “My Maths Club” students from “The Ware House”, Warehouse has charged me with respect to following payment model which is expressed piecewisely below;
Where C(x) is the total cost of caps, and ‘x’ is the number of caps so-ordered.
- Most of the time there is just one copy of each gene in the early stage of growth of a eukaryotic cell, which is represented as Ni-1. Whereas, in bacterias, there are multiple DNA plasmids in each cell (more than 100). Now for the sake of simplicity, it is assumed that before cell division genes or DNAs including plasmid DNA are duplicated. Here we have symbolized the cycle period of cell division as “𝜏”, thus, the following piecewise function can be used to explain cell volume factor v(t).
- A heavy duty vehicle is moving on highway with a variable velocity defined piecewisely below;
Conclusion
Piecewise function is indeed a hallmark in the field of Calculus and is deeply involved in the concepts of limits, continuity, differential and integral calculus. Beyond doubt, piecewise functions have simplified many complex targets of
- Virtual strain fields
- Artificial intelligence
- Random field modelling
- Optical Science
- Pharmaceutical sciences (Pharmacokinetics)
- Laser scanning for environmental sciences
- Scientific computation in Electrical Engineering
- Sorting out issues in Geology and Mineralogy
- Business, social and life sciences
Everything, that we study in mathematics has its profound significance and substantial contribution in multifarious fields of real life, piecewise function is a clear example of this.
Related Articles:
Epsilon And Delta Definition Of Limit
Continuous Vs Discontinuous Functions
Squeeze Theorem & Continuity of Trigonometric Functions
Do you want to boost up your academic grades?
Feel free to contact us for qualitative and standardized online Mathematics tuition service
CLICK THE LINKS BELOW
For more swift and confident interaction, become a part of our WhatsApp community
Great web site you’ve got here.. It’s hard to find high-quality writing like yours nowadays. I really appreciate people like you! Take care!!
I have recently started a site, the info you offer on this web site has helped me greatly. Thanks for all of your time & work.
Informatіve article, totɑlly what I needed.
Thank you