Introduction to Calculus: Background You’ll Need 2

  • Evaluate piecewise functions given its equation

Evaluating Piecewise Functions from Equations

Piecewise functions can also be defined using equations that include multiple rules. Each rule applies only when its corresponding condition is met.

To evaluate a piecewise function given its equation, determine which condition the input satisfies and then use the appropriate rule.

Piecewise-defined equation

A piecewise-defined equation lists multiple formulas, each with a condition that specifies when it should be used.

A piecewise function is commonly written in the following form:
[latex]\\[/latex]
[latex]f(x)= \begin{cases} \text{expression}_1 & \text{condition}_1 \\ \text{expression}_2 & \text{condition}_2 \\ \text{expression}_3 & \text{condition}_3 \end{cases}[/latex]

Consider the piecewise-defined function below.[latex]f(x)= \begin{cases} x+2 & x<0 \\ x^2 & 0\le x<2 \\ 5 & x\ge2 \end{cases}[/latex] Evaluate the function at each input value:
  1. [latex]f(-1)[/latex]
  2. [latex]f(0)[/latex]
  3. [latex]f(3)[/latex]