Piecewise Function

A piecewise function is a common type of discontinuous function that uses a different function expression on different intervals. Understanding the discontinuity of piecewise functions is essential for mastering the concept of discontinuity.

Basic Concepts

A piecewise function is a function that uses different function expressions on different intervals. The discontinuity of a piecewise function shows up mainly at the breakpoints, so the continuity at those points has to be checked carefully.

Definition of a Piecewise Function

Definition of a Piecewise Function

A function of the form f(x)={f1(x),x∈I1f2(x),x∈I2⋮fn(x),x∈Inf(x) = \begin{cases} f_1(x), & x \in I_1 \\ f_2(x), & x \in I_2 \\ \vdots \\ f_n(x), & x \in I_n \end{cases} is called a piecewise function, where I1,I2,…,InI_1, I_2, \ldots, I_n are pairwise disjoint intervals.

Continuity Analysis of Piecewise Functions

Method for Determining Continuity

For a piecewise function, the continuity at the breakpoints has to be checked carefully:

  1. Compute the left limit: lim⁡x→x0−f(x)\lim_{x \to x_0^-} f(x)
  2. Compute the right limit: lim⁡x→x0+f(x)\lim_{x \to x_0^+} f(x)
  3. Compute the function value: f(x0)f(x_0)
  4. Compare all three: if the three are equal, the function is continuous at that point; otherwise it is discontinuous

Types of Point of Discontinuity

  1. Discontinuity of the first kind (jump discontinuity): both the left and the right limit exist but are not equal
  2. Discontinuity of the second kind: at least one one-sided limit does not exist

Common Examples of Piecewise Functions

1. A Continuous Piecewise Function

Example 1: f(x)={x2,x≤12x−1,x>1f(x) = \begin{cases} x^2, & x \leq 1 \\ 2x - 1, & x > 1 \end{cases}

Analysis:

  • Continuity has to be checked at x=1x = 1
  • Left limit: lim⁡x→1−f(x)=lim⁡x→1−x2=1\lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} x^2 = 1
  • Right limit: lim⁡x→1+f(x)=lim⁡x→1+(2x−1)=1\lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} (2x - 1) = 1
  • Function value: f(1)=12=1f(1) = 1^2 = 1
  • The three are equal, so the function is continuous at x=1x = 1

2. A Piecewise Function with a Jump Discontinuity

Example 2: f(x)={x2,x≤02x+1,x>0f(x) = \begin{cases} x^2, & x \leq 0 \\ 2x + 1, & x > 0 \end{cases}

Analysis:

  • Continuity has to be checked at x=0x = 0
  • Left limit: lim⁡x→0−f(x)=lim⁡x→0−x2=0\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} x^2 = 0
  • Right limit: lim⁡x→0+f(x)=lim⁡x→0+(2x+1)=1\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} (2x + 1) = 1
  • The left limit and the right limit are not equal, so the function is discontinuous at x=0x = 0
  • This is a discontinuity of the first kind (a jump discontinuity)

Example 3: f(x)={sin⁡x,x≤0x+1,x>0f(x) = \begin{cases} \sin x, & x \leq 0 \\ x + 1, & x > 0 \end{cases}

Analysis:

  • Continuity has to be checked at x=0x = 0
  • Left limit: lim⁡x→0−f(x)=lim⁡x→0−sin⁡x=0\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} \sin x = 0
  • Right limit: lim⁡x→0+f(x)=lim⁡x→0+(x+1)=1\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} (x + 1) = 1
  • Function value: f(0)=sin⁡0=0f(0) = \sin 0 = 0
  • The left limit and the right limit are not equal, so the function is discontinuous at x=0x = 0
  • This is a jump discontinuity

3. A Piecewise Function with a Discontinuity of the Second Kind

Example 4: f(x)={1x,x≠00,x=0f(x) = \begin{cases} \frac{1}{x}, & x \neq 0 \\ 0, & x = 0 \end{cases}

Analysis:

  • Continuity has to be checked at x=0x = 0
  • Left limit: lim⁡x→0−f(x)=lim⁡x→0−1x=−∞\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} \frac{1}{x} = -\infty
  • Right limit: lim⁡x→0+f(x)=lim⁡x→0+1x=+∞\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} \frac{1}{x} = +\infty
  • Neither the left nor the right limit exists (both tend to infinity), so the function is discontinuous at x=0x = 0
  • This is a discontinuity of the second kind

Exercises

Exercise 1

Determine the continuity of f(x)={x2,x≤23x−2,x>2f(x) = \begin{cases} x^2, & x \leq 2 \\ 3x - 2, & x > 2 \end{cases} at x=2x = 2.

discontinuous functionpoint of discontinuity

Approach: Compute the left limit, the right limit and the function value separately, and check whether the three are equal.

Steps:

  1. Left limit: lim⁡x→2−f(x)=lim⁡x→2−x2=4\lim_{x \to 2^-} f(x) = \lim_{x \to 2^-} x^2 = 4
  2. Right limit: lim⁡x→2+f(x)=lim⁡x→2+(3x−2)=4\lim_{x \to 2^+} f(x) = \lim_{x \to 2^+} (3x - 2) = 4
  3. Function value: f(2)=22=4f(2) = 2^2 = 4
  4. The three are equal, so the function is continuous at x=2x = 2

Answer: The function is continuous at x=2x = 2.

Exercise 2

Determine the continuity of f(x)={x3,x≤12x2−1,x>1f(x) = \begin{cases} x^3, & x \leq 1 \\ 2x^2 - 1, & x > 1 \end{cases} at x=1x = 1.

discontinuous functionpoint of discontinuity

Approach: Compute the left limit, the right limit and the function value separately, and check whether the three are equal.

Steps:

  1. Left limit: lim⁡x→1−f(x)=lim⁡x→1−x3=1\lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} x^3 = 1
  2. Right limit: lim⁡x→1+f(x)=lim⁡x→1+(2x2−1)=1\lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} (2x^2 - 1) = 1
  3. Function value: f(1)=13=1f(1) = 1^3 = 1
  4. The three are equal, so the function is continuous at x=1x = 1

Answer: The function is continuous at x=1x = 1.

Exercise 3

Determine the continuity of f(x)={cos⁡x,x≤0x2+1,x>0f(x) = \begin{cases} \cos x, & x \leq 0 \\ x^2 + 1, & x > 0 \end{cases} at x=0x = 0.

discontinuous functionpoint of discontinuity

Approach: Compute the left limit, the right limit and the function value separately, and check whether the three are equal.

Steps:

  1. Left limit: lim⁡x→0−f(x)=lim⁡x→0−cos⁡x=1\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} \cos x = 1
  2. Right limit: lim⁡x→0+f(x)=lim⁡x→0+(x2+1)=1\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} (x^2 + 1) = 1
  3. Function value: f(0)=cos⁡0=1f(0) = \cos 0 = 1
  4. The three are equal, so the function is continuous at x=0x = 0

Answer: The function is continuous at x=0x = 0.

Exercise 4

Let f(x)={x2,x≤02x+1,x>0f(x) = \begin{cases} x^2, & x \leq 0 \\ 2x + 1, & x > 0 \end{cases}. Determine the continuity of f(x)f(x) at x=0x = 0.

discontinuous functionpoint of discontinuity

Approach: Compute the left limit, the right limit and the function value separately, and check whether the three are equal.

Steps:

  1. Left limit: lim⁡x→0−f(x)=lim⁡x→0−x2=0\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} x^2 = 0
  2. Right limit: lim⁡x→0+f(x)=lim⁡x→0+(2x+1)=1\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} (2x + 1) = 1
  3. Function value: f(0)=02=0f(0) = 0^2 = 0
  4. The left limit and the right limit are not equal, so the function is discontinuous at x=0x = 0

Answer: The function is discontinuous at x=0x = 0.

Exercise 5

Let f(x)={x2−1x−1,x≠1a,x=1f(x) = \begin{cases} \frac{x^2 - 1}{x - 1}, & x \neq 1 \\ a, & x = 1 \end{cases}. Find the value of the constant aa that makes f(x)f(x) continuous at x=1x = 1.

discontinuous functionpoint of discontinuity

Approach: Use the definition of continuity so that the function value equals the limit value.

Steps:

  1. Compute the limit: lim⁡x→1x2−1x−1=lim⁡x→1(x−1)(x+1)x−1=lim⁡x→1(x+1)=2\lim_{x \to 1} \frac{x^2 - 1}{x - 1} = \lim_{x \to 1} \frac{(x-1)(x+1)}{x-1} = \lim_{x \to 1} (x+1) = 2
  2. By the definition of continuity: f(1)=lim⁡x→1f(x)f(1) = \lim_{x \to 1} f(x)
  3. Therefore a=2a = 2

Answer: a=2a = 2.

Exercise 6

Let f(x)={x3−1x−1,x≠1a,x=1f(x) = \begin{cases} \frac{x^3 - 1}{x - 1}, & x \neq 1 \\ a, & x = 1 \end{cases}. Find the value of the constant aa that makes f(x)f(x) continuous at x=1x = 1.

discontinuous functionpoint of discontinuity

Approach: Use the definition of continuity so that the function value equals the limit value.

Steps:

  1. Compute the limit: lim⁡x→1x3−1x−1=lim⁡x→1(x−1)(x2+x+1)x−1=lim⁡x→1(x2+x+1)=3\lim_{x \to 1} \frac{x^3 - 1}{x - 1} = \lim_{x \to 1} \frac{(x-1)(x^2+x+1)}{x-1} = \lim_{x \to 1} (x^2+x+1) = 3
  2. By the definition of continuity: f(1)=lim⁡x→1f(x)f(1) = \lim_{x \to 1} f(x)
  3. Therefore a=3a = 3

Answer: a=3a = 3.


Summary

Symbols Used in This Article

SymbolTypePronunciation/ExplanationMeaning in This Article
f(x)f(x)Mathematical symbolf of xThe piecewise function whose continuity at a breakpoint is checked
f1(x),f2(x),…,fn(x)f_1(x), f_2(x), \ldots, f_n(x)Mathematical symbolf-one of x, f-two of x, f-n of xThe branch expressions used on the different pieces
I1,I2,…,InI_1, I_2, \ldots, I_nIntervalI-one, I-two, I-nThe pairwise disjoint intervals on which the branches apply
x0x_0Mathematical symbolx-sub-zeroThe breakpoint at which continuity has to be checked
lim⁡x→x0−f(x)\lim_{x \to x_0^-} f(x)Mathematical symbolleft-hand limitThe value approached from the left of the breakpoint
lim⁡x→x0+f(x)\lim_{x \to x_0^+} f(x)Mathematical symbolright-hand limitThe value approached from the right of the breakpoint
f(x0)f(x_0)Mathematical symbolf of x-sub-zeroThe value the branch formula assigns at the breakpoint
aaConstantaThe constant that repairs continuity at a removable discontinuity
1x\frac{1}{x}Mathematical symbolone over xThe branch whose one-sided limits both blow up at the breakpoint
sin⁡x,cos⁡x\sin x, \cos xMathematical symbolsine of x, cosine of xTrigonometric branches used in the worked examples
∞\inftyMathematical symbolinfinityThe value the one-sided limits of 1x\frac{1}{x} tend to

Found an issue with this content?

Tell us what could be improved.