Calculus Piecewise Functions Explained

I'm really trying to get my head around piecewise functions in calculus. They seem so confusing with different rules for different intervals, and I always get stuck graphing them or finding limits. I'm hoping someone can break it down in a way that finally clicks, maybe with some practical examples to make it easier.

1 Answers

✓ Best Answer

Piecewise Functions: A Comprehensive Guide 🧩

A piecewise function is a function defined by multiple sub-functions, each applying to a certain interval of the main function's domain. Think of it as a function that acts differently depending on the input value.

Definition 📝

A piecewise function is typically written as follows:


f(x) = 
\begin{cases}
  f_1(x) &\text{if } x \in I_1 \\
  f_2(x) &\text{if } x \in I_2 \\
  ... & ... \\
  f_n(x) &\text{if } x \in I_n
\end{cases}

Where:

  • $f_i(x)$ are the sub-functions.
  • $I_i$ are the intervals on which the sub-functions are defined.

Evaluating Piecewise Functions 🧮

To evaluate a piecewise function at a specific value of $x$, you must first determine which interval $x$ belongs to, and then use the corresponding sub-function.

Example:


f(x) = 
\begin{cases}
x^2 &\text{if } x < 0 \\
x + 1 &\text{if } 0 \le x \le 2 \\
3 &\text{if } x > 2
\end{cases}
  • To find $f(-1)$, since $-1 < 0$, use $f(x) = x^2$, so $f(-1) = (-1)^2 = 1$.
  • To find $f(1)$, since $0 \le 1 \le 2$, use $f(x) = x + 1$, so $f(1) = 1 + 1 = 2$.
  • To find $f(3)$, since $3 > 2$, use $f(x) = 3$, so $f(3) = 3$.

Continuity of Piecewise Functions 🔗

A piecewise function is continuous if each sub-function is continuous on its interval, and the function values match at the boundaries of the intervals.

To check continuity at a boundary point $c$ where two sub-functions meet, verify that:


\lim_{x \to c^-} f(x) = \lim_{x \to c^+} f(x) = f(c)

Example:


f(x) = 
\begin{cases}
x &\text{if } x < 1 \\
x^2 &\text{if } x \ge 1
\end{cases}

At $x = 1$:

  • $\lim_{x \to 1^-} f(x) = 1$
  • $\lim_{x \to 1^+} f(x) = 1^2 = 1$
  • $f(1) = 1^2 = 1$

Since all three values are equal, the function is continuous at $x = 1$.

Differentiability of Piecewise Functions 🔪

A piecewise function is differentiable if each sub-function is differentiable on its interval, and the derivatives match at the boundaries of the intervals.

To check differentiability at a boundary point $c$, verify that:


\lim_{x \to c^-} f'(x) = \lim_{x \to c^+} f'(x)

Example:


f(x) = 
\begin{cases}
x^2 &\text{if } x < 0 \\
x &\text{if } x \ge 0
\end{cases}

First, find the derivative:


f'(x) = 
\begin{cases}
2x &\text{if } x < 0 \\
1 &\text{if } x \ge 0
\end{cases}

At $x = 0$:

  • $\lim_{x \to 0^-} f'(x) = 2(0) = 0$
  • $\lim_{x \to 0^+} f'(x) = 1$

Since the limits are not equal, the function is not differentiable at $x = 0$.

Know the answer? Login to help.