Achievable logoAchievable logo
AP Calculus AB
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Limits
1.1 Tables and graphs
1.2 Analytical limits
1.3 Algebraic limits
1.3.1 Indeterminate forms
1.3.2 Absolute value functions
1.4 Limits and infinity
1.5 Special limits
1.6 Continuity
2. Derivative basics
3. Advanced differentiation
4. Contextual uses
5. Analytical uses
6. Integration
7. Differential equations
8. Applications of integrals
Wrapping up
Achievable logoAchievable logo
1.3.2 Absolute value functions
Achievable AP Calculus AB
1. Limits
1.3. Algebraic limits
Our AP Calculus AB course is now in "early access" - get 50% off for a limited time.

Absolute value functions

5 min read
Font
Discuss
Share
Feedback

What you’ll learn

  • Evaluating limits of piecewise-defined and absolute value functions with one-sided limits

Piecewise-defined functions

A piecewise function uses different formulas on different intervals of x. To evaluate a limit at a breakpoint (a value of x where the formula changes), find the one-sided limits.

The overall limit exists only if both one-sided limits are equal.

Example

Let f(x) be the piecewise function defined by

f(x)=⎩⎨⎧​x22x4​if x≤−1if −1<x≤2if x>2​

Evaluate:

a) x→−1lim​f(x)

b) x→2lim​f(x)

c) x→3lim​f(x)

Answers

(spoiler)

a) Does not exist
b) 4
c) 4

Solutions

a) x→−1lim​f(x)

(spoiler)

x approaches −1, which is a breakpoint. Comparing the one-sided limits,

  • Left-hand limit:

For x≤−1, the function is f(x)=x2, so

x→−1−lim​x2=1

  • Right-hand limit:

For −1<x≤2, the function is f(x)=2x, so

x→−1+lim​2x=−2

Since

x→−1−lim​f(x)=x→−1+lim​f(x)

the overall limit x→−1lim​f(x) does not exist.

b) x→2lim​f(x)

(spoiler)

Here, x approaches 2, which is also a breakpoint.

  • Left-hand limit:

For −1<x≤2, f(x)=2x, so

x→2−lim​2x=4

  • Right-hand limit:

For x>2, f(x)=4, so

x→2+lim​4=4

Both one-sided limits match, so

x→2lim​f(x)=4

c) x→3lim​f(x)

(spoiler)

Since x approaches 3 which is not a breakpoint, one-sided limits are not necessary.

As x approaches 3, f(x) is defined by the third branch, f(x)=4 for x≥2. Therefore,

x→3lim​4=4

Absolute value functions

When evaluating the limit of a rational expression with absolute values, direct substitution may result in the indeterminate form 00​. In these cases, rewriting the absolute value function as a piecewise-defined one helps evaluate the limit by considering each side separately.

For example, the absolute value function y=∣x∣ is defined piecewise as

∣x∣=⎩⎨⎧​x−x​if x≥0if x<0​

Rewrite

f(x)=∣3−x∣

as a piecewise function.

1. Find the breakpoint(s)

Set the expression inside the absolute value equal to 0:

3−xx​=0=3​

This divides the domain into two intervals: x<3 and x≥3.

2. Test the intervals

To determine how the expression behaves on each interval, test a value from each side:

  1. For x<3: Test x=2.

    • Since 3−2>0, use the positive version.
  2. For x>3: Test x=4.

    • Since 3−4<0, use the negative version.

At x=3, both pieces evaluate to 0. By convention, the equality is included with the greater than sign unless the problem states otherwise.

Therefore in piecewise form,

f(x)=⎩⎨⎧​3−x−(3−x)​if x<3if x≥3​

Examples

  1. Use the piecewise-defined function above to evaluate

x→3lim​x−3∣3−x∣​

Solution

(spoiler)

In piecewise form,

x−3∣3−x∣​=⎩⎨⎧​x−33−x​x−3−(3−x)​​if x<3if x≥3​

Next, consider the one-sided limits:

  • Left-hand limit:

==​x→3−lim​x−33−x​x→3−lim​−(3−x)(3−x)​−1​

  • Right-hand limit:

==​x→3+lim​x−3−(3−x)​x→3−lim​−(3−x)−(3−x)​ 1​

Since the one-sided limits don’t match, x→3lim​f(x) does not exist.

  1. Find

x→1lim​∣x−1∣x2−3x+2​

Solution

(spoiler)

In piecewise form,

f(x)=⎩⎨⎧​x−1x2−3x+2​−(x−1)x2−3x+2​​if x≥1if x<1​

Next, evaluate the one-sided limits.

  • Left-hand limit:

===​x→1−lim​x−1x2−3x+2​x→1−lim​(x−1)​(x−2)(x−1)​​x→1−lim​(x−2)−1​

  • Right-hand limit:

===​x→1+lim​−(x−1)x2−3x+2​x→1+lim​−(x−1)​(x−2)(x−1)​​x→1+lim​−1(x−2)​1​

Since the one-sided limits don’t match, x→1lim​f(x) does not exist.

Piecewise-defined functions

  • Use different formulas for different x intervals
  • At breakpoints, evaluate one-sided limits
  • Limit exists at breakpoint only if left- and right-hand limits are equal

Evaluating limits for piecewise functions

  • At breakpoints, check both one-sided limits:
    • If unequal: limit does not exist (DNE)
    • If equal: limit equals common value
  • Away from breakpoints, use the formula for that interval

Absolute value functions and limits

  • Rewrite ∣x∣ as piecewise:
    • x if x≥0
    • −x if x<0
  • For ∣a−x∣, breakpoint at x=a; split intervals at x=a

Limits involving absolute value expressions

  • Direct substitution may give 00​ (indeterminate)
  • Rewrite absolute value as piecewise, then evaluate one-sided limits
    • If one-sided limits differ: limit does not exist
    • If one-sided limits match: limit equals that value

Sign up for free to take 2 quiz questions on this topic

All rights reserved ©2016 - 2026 Achievable, Inc.

Absolute value functions

What you’ll learn

  • Evaluating limits of piecewise-defined and absolute value functions with one-sided limits

Piecewise-defined functions

A piecewise function uses different formulas on different intervals of x. To evaluate a limit at a breakpoint (a value of x where the formula changes), find the one-sided limits.

The overall limit exists only if both one-sided limits are equal.

Example

Let f(x) be the piecewise function defined by

f(x)=⎩⎨⎧​x22x4​if x≤−1if −1<x≤2if x>2​

Evaluate:

a) x→−1lim​f(x)

b) x→2lim​f(x)

c) x→3lim​f(x)

Answers

(spoiler)

a) Does not exist
b) 4
c) 4

Solutions

a) x→−1lim​f(x)

(spoiler)

x approaches −1, which is a breakpoint. Comparing the one-sided limits,

  • Left-hand limit:

For x≤−1, the function is f(x)=x2, so

x→−1−lim​x2=1

  • Right-hand limit:

For −1<x≤2, the function is f(x)=2x, so

x→−1+lim​2x=−2

Since

x→−1−lim​f(x)=x→−1+lim​f(x)

the overall limit x→−1lim​f(x) does not exist.

b) x→2lim​f(x)

(spoiler)

Here, x approaches 2, which is also a breakpoint.

  • Left-hand limit:

For −1<x≤2, f(x)=2x, so

x→2−lim​2x=4

  • Right-hand limit:

For x>2, f(x)=4, so

x→2+lim​4=4

Both one-sided limits match, so

x→2lim​f(x)=4

c) x→3lim​f(x)

(spoiler)

Since x approaches 3 which is not a breakpoint, one-sided limits are not necessary.

As x approaches 3, f(x) is defined by the third branch, f(x)=4 for x≥2. Therefore,

x→3lim​4=4

Absolute value functions

When evaluating the limit of a rational expression with absolute values, direct substitution may result in the indeterminate form 00​. In these cases, rewriting the absolute value function as a piecewise-defined one helps evaluate the limit by considering each side separately.

For example, the absolute value function y=∣x∣ is defined piecewise as

∣x∣=⎩⎨⎧​x−x​if x≥0if x<0​

Rewrite

f(x)=∣3−x∣

as a piecewise function.

1. Find the breakpoint(s)

Set the expression inside the absolute value equal to 0:

3−xx​=0=3​

This divides the domain into two intervals: x<3 and x≥3.

2. Test the intervals

To determine how the expression behaves on each interval, test a value from each side:

  1. For x<3: Test x=2.

    • Since 3−2>0, use the positive version.
  2. For x>3: Test x=4.

    • Since 3−4<0, use the negative version.

At x=3, both pieces evaluate to 0. By convention, the equality is included with the greater than sign unless the problem states otherwise.

Therefore in piecewise form,

f(x)=⎩⎨⎧​3−x−(3−x)​if x<3if x≥3​

Examples

  1. Use the piecewise-defined function above to evaluate

x→3lim​x−3∣3−x∣​

Solution

(spoiler)

In piecewise form,

x−3∣3−x∣​=⎩⎨⎧​x−33−x​x−3−(3−x)​​if x<3if x≥3​

Next, consider the one-sided limits:

  • Left-hand limit:

==​x→3−lim​x−33−x​x→3−lim​−(3−x)(3−x)​−1​

  • Right-hand limit:

==​x→3+lim​x−3−(3−x)​x→3−lim​−(3−x)−(3−x)​ 1​

Since the one-sided limits don’t match, x→3lim​f(x) does not exist.

  1. Find

x→1lim​∣x−1∣x2−3x+2​

Solution

(spoiler)

In piecewise form,

f(x)=⎩⎨⎧​x−1x2−3x+2​−(x−1)x2−3x+2​​if x≥1if x<1​

Next, evaluate the one-sided limits.

  • Left-hand limit:

===​x→1−lim​x−1x2−3x+2​x→1−lim​(x−1)​(x−2)(x−1)​​x→1−lim​(x−2)−1​

  • Right-hand limit:

===​x→1+lim​−(x−1)x2−3x+2​x→1+lim​−(x−1)​(x−2)(x−1)​​x→1+lim​−1(x−2)​1​

Since the one-sided limits don’t match, x→1lim​f(x) does not exist.

Key points

Piecewise-defined functions

  • Use different formulas for different x intervals
  • At breakpoints, evaluate one-sided limits
  • Limit exists at breakpoint only if left- and right-hand limits are equal

Evaluating limits for piecewise functions

  • At breakpoints, check both one-sided limits:
    • If unequal: limit does not exist (DNE)
    • If equal: limit equals common value
  • Away from breakpoints, use the formula for that interval

Absolute value functions and limits

  • Rewrite ∣x∣ as piecewise:
    • x if x≥0
    • −x if x<0
  • For ∣a−x∣, breakpoint at x=a; split intervals at x=a

Limits involving absolute value expressions

  • Direct substitution may give 00​ (indeterminate)
  • Rewrite absolute value as piecewise, then evaluate one-sided limits
    • If one-sided limits differ: limit does not exist
    • If one-sided limits match: limit equals that value

More from Algebraic limits

  • Indeterminate forms