# Piecewise-Defined Function

A
**
piecewise-defined
**
function is one which is defined not by a single equation, but by two or more. Each equation is valid for some
interval
.

**
Example 1:
**

Consider the function defined as follows.

$y=\{\begin{array}{l}x+2\text{for}x0\\ 2\text{for}0\le x\le 1\\ -x+3\text{for}x1\end{array}$

The function in this example is piecewise-linear, because each of the three parts of the graph is a line.

Piecewise-defined functions can also have discontinuities ("jumps"). The function in the example below has discontinuities at $x=-2$ and $x=2$ .

**
Example 2:
**

Graph the function defined as shown.

$y=\{\begin{array}{l}\frac{1}{2}{x}^{2}\text{for}x-2\\ \text{0for}-2\le x2\\ \frac{1}{2}{x}^{2}\text{for}x\ge 2\end{array}$

Note that we use small white circles in the graph to indicate that the endpoint of a curve is not included in the graph, and solid dots to indicate endpoints that are included.

**
Example 3:
**

Graph the function defined below.

$y=\{\begin{array}{l}\mathrm{log}x\text{for}0x1\\ \frac{1}{x-2}\text{for}x\ge 1\end{array}$

Negative values of $x$ and $0$ are not included in the domain because the first function, $\mathrm{log}x$ , is undefined for those values. The value $x=2$ is not included in the domain because the second function is not defined for that value (it has a vertical asymptote there). Therefore the domain of this function is $\left\{x\text{\hspace{0.17em}}|\text{\hspace{0.17em}}0<x<2\right\}\cup \left\{x\text{\hspace{0.17em}}|\text{\hspace{0.17em}}x>2\right\}$ . This can be represented using interval notation as $\left(0,2\right)\cup \left(2,\infty \right)$ .

- SHSAT Courses & Classes
- Dragon Ball FighterZ Tutors
- German Lessons
- ACT Courses & Classes
- Alaska Bar Exam Courses & Classes
- AIS - Associate in Insurance Services Courses & Classes
- GRE Test Prep
- SAT Subject Test in French with Listening Tutors
- Series 9 Test Prep
- ARM - Associate in Risk Management Test Prep
- SBAC Tutors
- Series 65 Test Prep
- CDR Exam - Cardiovascular Disease Recertification Exam Test Prep
- WEST-E Test Prep
- SHRM-SCP - Society for Human Resource Management- Senior Certified Professional Test Prep
- CLEP Humanities Test Prep
- WEST-B Courses & Classes
- PARCC Test Prep
- CompTIA A+ Courses & Classes
- ASTB - Aviation Selection Test Battery Tutors

- French Tutors in Dallas Fort Worth
- Computer Science Tutors in San Francisco-Bay Area
- GMAT Tutors in Chicago
- English Tutors in Los Angeles
- Computer Science Tutors in Phoenix
- Statistics Tutors in Denver
- LSAT Tutors in San Francisco-Bay Area
- Physics Tutors in Dallas Fort Worth
- Reading Tutors in Houston
- English Tutors in New York City