In certain situations a numerical relationship may follow one pattern of behavior for a while and then exhibit a different kind of behavior. In a situation such as this, it is helpful to use what is known as a piecewise defined function - a function that is defined in pieces.

In the above example of a piecewise defined function, we see that the (y) values for the negative values of (x) are defined differently than the (y) values for the positive values of (x)

Sometimes we are given a graph and need to write a piecewise description of the function it describes.

The piecewise function pictured above could be described as follows:**Exercises 4.6**

Sketch a graph for each of the piecewise functions described below.

Graph the piecewise-defined function shown below :

What are the domain and range ? Over what intervals is the function increasing or decreasing ?

Sketch the graph of y = 4x + 11 for values of x between -10 and -2.

We can consider the following points to sketch the graph of y = 4x + 11 :

* y = 4x + 11 is a linear equation. Then, its graph will be a straight line.

* y = 4x + 11 is in slope intercept form y = mx + b.

we get a positive slope m = 4.

So, the graph of y = 4x + 11 is a rising line.

Sketch the graph of y = x 2 - 1 for values of x between -2 and 2.

We can consider the following points to sketch the graph of y = x 2 - 1 :

* y = x 2 - 1 is a quadratic equation. Then, its graph will be a parabola.

* The sign of x 2 in y = x 2 - 1 is positive. So, the graph will be a open upward parabola.

* We can write y = x 2 - 1 in vertex form as shown below.

we get the vertex (h, k) = (0, -1)

So, the graph of y = x 2 - 1 is a open upward parabola with the vertex (0, -1).

Sketch the graph of y = x + 1 for values of x between 2 and 10.

We can consider the following points to sketch the graph of y = x + 1 :

* y = x + 1 is a linear equation. Then, its graph will be a straight line.

* y = x + 1 is in slope intercept form y = mx + b.

we get a positive slope m = 1.

So, the graph of y = x + 1 is a rising line.

To determine the range, calculate the y-values that correspond to the minimum and maximum x-values on the graph.

For this graph, these values occur at the endpoints of the domain of the piecewise function,

Evaluate y = 4x + 11 for x = -10 :

Evaluate y = x + 1 for x = 10 :

**Increasing and Decreasing Intervals : **

The function is increasing when

The function is decreasing when

The following notes and exercises include piecewise examples, graphing steps, and problems written in function notation.

Click to select (large) image.

Then, right click to view or copy to desktop.

Webcomic #223 - "Peace-wise Function" (1-12-16)

### More Information

- Finding f(x)

- Graphing functions

- Plotting points

- Piecewise (Split) Functions

- Continuous function

- Absolute values

#94 Math Masterpiece - Alfred Hitchock presents his 39 steps function (7-12-13)

"542: The Saddest Function" by Chris Burke (12/01/10) (Click lower right corner to view)

Read about "Maud Muller" by John Greenleaf Whittier (the source of the quote: *"For of all sad words of tongue or pen, the saddest are these: 'What might've been!'"*)

## Privacy Policy

#### Privacy Overview

Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

Cookie | Duration | Description |
---|---|---|

cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |

cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |

cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |

cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |

cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |

viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |

Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

## Piecewise Functions

*In mathematics, a piecewise-defined function (also called a piecewise function or a hybrid function) is a function which is defined by multiple sub-functions, each sub-function applying to a certain interval of the main function's domain (a sub-domain). Piecewise is actually a way of expressing the function, rather than a characteristic of the function itself, but with additional qualification, it can describe the nature of the function. For example, a piecewise polynomial function is a function that is a polynomial on each of its sub-domains, but possibly a different one on each.*

* *

*The word piecewise is also used to describe any property of a piecewise-defined function that holds for each piece but not necessarily hold for the whole domain of the function. A function is piecewise differentiable or piecewise continuously differentiable if each piece is differentiable throughout its subdomain, even though the whole function may not be differentiable at the points between the pieces. In convex analysis, the notion of a derivative may be replaced by that of the subderivative for piecewise functions. Although the "pieces" in a piecewise definition need not be intervals, a function is not called "piecewise linear" or "piecewise continuous" or "piecewise differentiable" unless the pieces are intervals. 1*

Maple is powerful software for exploring piecewise functions, and for analyzing, exploring, visualizing and solving virtually any mathematical problem. Student pricing available.

## 4.6: Piecewise-defined Functions - Mathematics

We can create new functions from existing ones in several ways.

When one creates a new function from existing functions in a "piecewise-defined" way, one breaks apart some domain into two or more disjoint pieces, using different functions to calculate the output for each $x$-value, where the function used is based upon the piece into which that particular $x$-value falls.

A simple example of a piecewise defined function is the absolute value function, $|x|$.

When $x ge 0$, the absolute value function doesn't really do anything -- it returns its input unchanged. So, for this piece $|x| = x$.

However, when $x lt 0$, the absolute value changes the sign of its input. Multiplying a value by negative one has the same effect -- so we can say that for this second piece $|x| = -x$.

Thus, we summarize how to calculate the output with the following "piecewise definition": $|x| = left< egin

Graphing a piecewise function can be accomplished by simply graphing the functions found in the respective "pieces", limiting the points drawn for each piece to the $x$-values that satisfy the appropriate condition.

For example, given the function $f(x) = left< egin

We find its graph by first graphing $y = sqrt<25-x^2>$ (a semi-circle with center at the origin and radius 5) and $y=2x-5$ (a line of slope 2 with $y$-intercept at $(0,-5)$), as shown at left below. Then, we discard those points that don't match the conditions provided (i.e., the dashed parts of the left graph below), to arrive at the graph of the piecewise-defined function on the right.

Note, that we use a filled-in point at $(3,4)$ to suggest that the output of the function at $x=3$ is determined by the semi-circular piece -- since the condition on this piece is true when $x=3$. Likewise, to indicate that the point where $x=3$ should be excluded from the linear piece (given the strict inequality), we place an open circle at $(3,1)$.

## 6.2: A Toy Rocket and a Drone (15 minutes)

### Activity

In this activity, students examine graphs of functions, identify and describe their key features, and connect these features to the situations represented. These key features include the horizontal and vertical intercepts, maximums and minimums, and intervals where a function is increasing or decreasing (or where a graph has a positive or a negative slope).

Neither the features nor the terms are likely new to students. The idea of intercepts was introduced in middle school and further developed in earlier units. Graphical features such as maximums and minimums have been considered intuitively in various cases. They are simply more precisely defined in here. In a later activity, students will distinguish between a maximum of a graph and the maximum of a function.

### Launch

Give students about 5 minutes of quiet work time. Follow with a whole-class discussion.

A toy rocket and a drone were launched at the same time.

Here are the graphs that represent the heights of two objects as a function of time since they were launched.

Height is measured in meters above the ground and time is measured in seconds since launch.

Expand Image

**Description:** <p>2 graphs. Horizontal axis, 0 to 7, time in seconds. Vertical axis, 0 to 50 by 10’s, height in meters. Graph R is parabolic and opens down. It starts at 0 comma 25. Its vertex is at 2 comma 45. It ends at 5 comma 0. Graph D is piecewise linear. It starts at 0 comma 0. Increases until 2 comma 20, horizontal until 5 comma 20, then decreases to 7 comma 0.</p>

Analyze the graphs and describe—as precisely as you can—what was happening with each object. Your descriptions should be complete and precise enough that someone who is not looking at the graph could visualize how the objects were behaving.

### Student Response

For access, consult one of our IM Certified Partners.

### Anticipated Misconceptions

When analyzing the graphs and describing what is happening with each object, some students may mistakenly think that the horizontal axis represents horizontal distance, neglecting to notice that it represents time. They may then describe how the objects were moving vertically as they traveled horizontally, rather than with respect to the number of seconds since they took off. Encourage these students to check the label of each axis and revisit their descriptions.

### Activity Synthesis

Select a few students to share their description of the graphs, and have each student describe the motion of one flying object.

Display a blank coordinate plane for all to see. As each student shares their response, sketch a graph to match what is being described.

Expand Image

For any gaps in their description, make assumptions and sketch accordingly. (For example, if a student states that the toy rocket reaches a height of 45 meters after 2 seconds but does not state its starting height, start the curve at ((0,0)) , ((0,40)) , or any other point besides ((0,25)) .) If requested, allow students to refine their descriptions and adjust the sketch accordingly.

Next, invite other students to share their response to the last question. On the graphs, highlight the features students noted. (See Student Response for an example.) Use the terms *vertical intercepts*, *horizontal intercepts*, *maximum*, and *minimum* to refer to those features and label them on the graphs.

- A point on the graph that is as high as or higher than all other points is called a
**maximum**of the graph (or a*relative maximum*, because its height is viewed in relation to other points shown on the graph). - A point on the graph that is as low as or lower than all other points is called a
**minimum**of the graph (or a*relative minimum*).

A graph could have more than one relative maximum or minimum. For instance, the points ((2,(D(2))) and ((5,D(5)) ) are both relative maximums, and ((0, D(0))) and ((7,D(7))) are both relative minimums.

If no students mentioned the intervals in which each function was increasing, staying constant, or decreasing, draw their attention to these features on the graphs and label them as such.

## Overview

#### Description

*For courses in precalculus.*

*This package includes MyLab Math.*

**Ties concepts together using a functions approach**

The ** Concepts Through Functions Series** introduces functions at the start of each text, and maintains a continuous theme by introducing/developing a new function in every chapter.

Known for their ability to connect with today’s students, acclaimed authors Sullivan and Sullivan focus on the fundamentals — **preparing for class, practice with homework, and reviewing key concepts —** encouraging students to master basic skills and develop the conceptual understanding needed for this and future courses. Graphing utility coverage is optional, and can be included at the discretion of each instructor based on course needs.

**Reach every student by pairing this text with MyLab Math**

MyLab™ Math is the teaching and learning platform that empowers you to reach *every* student. By combining trusted author content with digital tools and a flexible platform, MyLab personalizes the learning experience and improves results for each student. Learn more about MyLab Math.

## Piecewise-defined function

On this page you can get various actions with a piecewise-defined function, as well as for most services - get the detailed solution.

- Derivative of a piecewise
- Plot a graph
- Curve sketching
- Defined integral
- Indefined integral of similar functions
- Limit of piecewises
- Fourier series (In common there are piecewises for calculating a series in the examples)
- Taylor series

The above examples also contain:

- the modulus or absolute value: absolute(x) or |x|
- square roots sqrt(x),

cubic roots cbrt(x) - trigonometric functions:

sinus sin(x), cosine cos(x), tangent tan(x), cotangent ctan(x) - exponential functions and exponents exp(x)
- inverse trigonometric functions:

arcsine asin(x), arccosine acos(x), arctangent atan(x), arccotangent acot(x) - natural logarithms ln(x),

decimal logarithms log(x) - hyperbolic functions:

hyperbolic sine sh(x), hyperbolic cosine ch(x), hyperbolic tangent and cotangent tanh(x), ctanh(x) - inverse hyperbolic functions:

hyperbolic arcsine asinh(x), hyperbolic arccosinus acosh(x), hyperbolic arctangent atanh(x), hyperbolic arccotangent acoth(x) - other trigonometry and hyperbolic functions:

secant sec(x), cosecant csc(x), arcsecant asec(x), arccosecant acsc(x), hyperbolic secant sech(x), hyperbolic cosecant csch(x), hyperbolic arcsecant asech(x), hyperbolic arccosecant acsch(x) - rounding functions:

round down floor(x), round up ceiling(x) - the sign of a number:

sign(x) - for probability theory:

the error function erf(x) (integral of probability), Laplace function laplace(x) - Factorial of
**x**:**x!**or**factorial(x)** - Gamma function gamma(x)
- Lambert's function LambertW(x)

#### The insertion rules

The following operations can be performed

**2*x** - multiplication **3/x** - division **x^2** - squaring **x^3** - cubing **x^5** - raising to the power **x + 7** - addition **x - 6** - subtraction **Real numbers** insert as **7.5**, no **7,5**

## Lesson 6

This lesson has two aims. The first aim is to prompt students to write an equation of the form (y = a oldcdot b^x) to represent an exponential function without a context from limited information.

A second optional activity encourages students to look more closely at how different equivalent expressions can be written to highlight different aspects of a quantity. For example, we can write an expression that shows the growth factor of a bacteria population each week, or one that shows the daily growth factor.

In the first activity, to find (a) and (b) , students need to reason abstractly and make use of structure. Calculating the growth or decay factor, the (b) in (a oldcdot b^x) , from the coordinates of two points requires students to understand that exponential functions change by equal factors over equal intervals (MP7). In addition, because the first activity uses the Information Gap routine, students first must decide what information they need to solve the problem and why they need it. Obtaining useful information may take multiple rounds of questioning (MP1) and the use of increasingly precise language (MP6).