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 Advanced algebraic limits
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
9. Testing details tag
Wrapping up
Achievable logoAchievable logo
1.2 Analytical limits
Achievable AP Calculus AB
1. Limits
Our AP Calculus AB course is currently in development and is a work-in-progress.

Analytical limits

10 min read
Font
Discuss
Share
Feedback

What you’ll learn:

  • Using direct substitution to find limits
  • Applying limit laws to simplify expressions
  • Evaluating limits of piecewise-defined functions with one-sided limits
  • Handling composite functions

Evaluating limits analytically

Graphs and tables are usually used when algebraic methods are hard to apply, or as a way to double-check your work. Many limits can be found analytically (using algebra or calculus) with straightforward techniques such as direct substitution and the basic limit laws. Here, you’ll find limits of several types of functions - including piecewise-defined and composite functions - using these analytical methods.

Direct substitution

The simplest way to evaluate a limit is direct substitution. If plugging in x=a into f(x) gives a finite number, then that number is the limit.

Always try direct substitution first.

Examples

  1. Evaluate

x→3lim​x2

Substitute x=3 into x2:

​x→3lim​x2=(3)2=9​​

Let’s try another one:

  1. Evaluate

x→3π​lim​xtan(x)−3​​

Solution

(spoiler)

Substitute x=3π​ into the expression:

​x→3π​lim​xtan(x)−3​​=π/3tan(π/3)−3​​=π/33​−3​​=0​​

Limit properties

Direct substitution works in many cases because limits follow a set of rules (limit laws). These laws let you break a complicated expression into simpler pieces.

Let x→alim​f(x)=F and x→alim​g(x)=G. Then,

  1. Constant multiple:

x→alim​[bf(x)]=b⋅F

  1. Sum or difference:

x→alim​[f(x)±g(x)]=F±G

  1. Product:

x→alim​[f(x)⋅g(x)]=F⋅G

  1. Quotient:

x→alim​g(x)f(x)​=GF​,G=0

  1. Power:

x→alim​[f(x)]n=Fn

  1. Root:

x→alim​nf(x)​=nF​,n>0

Some AP-style problems expect you to apply these laws without being given explicit formulas for f and g. For example:

  1. Given:
  • x→5lim​f(x)=2
  • x→5lim​g(x)=4

Evaluate:

x→5lim​[f(x)−3g(x)]2

Use the constant multiple law, the difference law, and the power law to move the limit inside step by step:

(x→5lim​f(x)−3⋅x→5lim​g(x))2

​=(2−3⋅4)2=(2−12)2=(−10)2=100​​

Piecewise-defined functions

A piecewise function uses different formulas on different intervals of x. When you take a limit at a breakpoint (a value of x where the formula changes), you need one-sided limits:

  • the left-hand limit (approaching from smaller x values)
  • the right-hand limit (approaching from larger x values)

The overall limit exists only if the two 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 (DNE)
b)4
c)4

Solutions

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

(spoiler)

Here, x approaches −1, which is a breakpoint. So we compare the one-sided limits.

  • Left-hand limit: (x→−1−)

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

x→−1−lim​x2=1

  • Right-hand limit: (x→−1+)

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: (x→2−)

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

x→2−lim​2x=4

  • Right-hand limit: (x→2+)

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 and 3 is not a breakpoint, you don’t need one-sided limits. You just need the correct branch.

Because 3>2, we use the third branch, f(x)=4. Therefore,

x→3lim​4=4​

Sidenote
Piecewise in Desmos

You can define piecewise functions in Desmos using curly braces. Each piece is written as an inequality followed by a colon and the corresponding expression.

Using the same function as an example:

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

This would be entered into Desmos as:

f(x)={x≤−1:x2,−1<x≤2:2x,x>2:4}

Composite functions

A composite function is a function inside another function: (f∘g)(x), also written f(g(x)).

When the outer function behaves nicely (is continuous) at the value the inner function approaches, you can evaluate the limit by working from the inside out.

If f(x) is continuous at x=G and x→alim​g(x)=G, then

x→alim​f(g(x))=f(x→alim​g(x))=f(G)

So the process is:

  1. Find the limit of the inner function g(x).
  2. Plug that result into the outer function f.

Examples

Let f(x)=3x+1 and g(x)=2x2.

Evaluate:

a) x→0lim​f(g(x)) b) x→0lim​g(f(x))

Solutions

a) x→0lim​f(g(x))

(spoiler)

First, evaluate the inner limit:

x→0lim​g(x)=x→0lim​2x2=0

Now apply f to that value:

f(0)=3(0)+1=1​

b) x→0lim​g(f(x))

(spoiler)

First, evaluate the inner limit:

x→0lim​f(x)=x→0lim​(3x+1)=1

Now apply g to that value:

g(1)=2(1)2=2​

You can confirm this visually in Desmos by defining f(x)=3x+1 and g(x)=2x2, then graphing f(g(x)) and g(f(x)) to see what y-value each composite approaches as x→0.

Challenge problems

The composite-function limit law works when the outer function f(x) is continuous at the value approached by the inner function g(x) (more on continuity will be covered later).

But what if x→alim​g(x) doesn’t exist, or what if f(x) has breaks?

In some cases, finding x→alim​f(g(x)) requires you to evaluate x→Glim​f(x) (which may not equal f(G)) when x→alim​g(x)=G. The multi-part problem below includes several of the trickier cases that can appear on the AP exam (though they’re rare).

Shown below are the graphs of g(x) and f(x):

Composite function limit
Composite function limit

Evaluate:

a) x→4lim​f(g(x))
b)x→1lim​g(f(x))
c)x→−2lim​f(f(x))
d)x→−1lim​g(g(x))

Answers

(spoiler)

a) DNE
b)∞(DNE)
c)2
d) DNE

Solutions

a)x→4lim​f(g(x))

(spoiler)

Start with the inner function:

There is a vertical asymptote at x=4, and both one-sided limits of g(x) approach +∞. So x→4lim​g(x) does not approach a finite number.

Also, from the graph, the outer function f(x) is only defined on the domain (−5,8]. That means the composite f(g(x)) can only be evaluated when the output of g(x) lands inside that domain.

Since there is no meaningful value for “f(∞),” the overall limit does not exist.

b) x→1lim​g(f(x))

(spoiler)

First, evaluate the inner limit:

x→1lim​f(x)=4.

At x=4, the graph of g has a vertical asymptote, so it’s reasonable to say the composite limit does not exist.

To be more specific about the behavior:

  • As x→1−, the graph shows f(x)→4 from below (values like 3.99, 3.999, …).
  • Feeding those into g, the values g(3.99), g(3.999), … grow without bound, consistent with

    x→4lim​g(x)=∞.

The same behavior occurs as x→1+.

So

x→1lim​g(f(x))=∞,

which also means the limit does not exist as a finite value.

You can visualize this in Desmos by plotting sample functions with the same local behavior:

  1. f(x)=x+3, since x→1lim​f(x)=4
  2. g(x)=(x−4)21​, since the graph shoots up to ∞ on both sides of x=4
  3. g(f(x)), which will have a vertical asymptote at x=1, so

x→1lim​g(f(x))=∞ (DNE)​

c) x→−2lim​f(f(x))

(spoiler)

First, evaluate the inner limit:

x→−2lim​f(x)=3.

Because f has breaks, you can’t automatically replace the outer limit with f(3). You need to know how f(x) approaches 3.

From the graph, as x→−2 from either side, f(x) approaches 3 from above (values like 3.01, 3.02, …).

That means the input to the outer f approaches 3 from the right, so we need

x→3+lim​f(x)=2​.

d) x→−1lim​g(g(x))

(spoiler)

First, evaluate the inner limit:

x→−1lim​g(x)=−4.

Now we need to understand what happens to g(x) as its input approaches −4. The key detail is that the inner g(x) approaches −4 from different sides depending on whether x approaches −1 from the left or the right.

  • If x→−1−, then g(x)→−4 from below (for example, g(−1.01)≈−4.01). That makes the outer input approach −4−, and the graph shows g(x)→−1.
  • If x→−1+, then g(x)→−4 from above (for example, g(−0.99)≈−3.99). That makes the outer input approach −4+, and the graph shows g(x)→−2.

Because these two one-sided results don’t match, the overall limit does not exist:

x→−1lim​g(g(x)) does not exist​

  • For composite functions: to find x→alim​f(g(x)), find x→alim​g(x)=G and evaluate f(G) (if f is continuous).

  • If a limit involves the breakpoint of a piecewise function, use one-sided limits.

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

All rights reserved ©2016 - 2026 Achievable, Inc.

Analytical limits

What you’ll learn:

  • Using direct substitution to find limits
  • Applying limit laws to simplify expressions
  • Evaluating limits of piecewise-defined functions with one-sided limits
  • Handling composite functions

Evaluating limits analytically

Graphs and tables are usually used when algebraic methods are hard to apply, or as a way to double-check your work. Many limits can be found analytically (using algebra or calculus) with straightforward techniques such as direct substitution and the basic limit laws. Here, you’ll find limits of several types of functions - including piecewise-defined and composite functions - using these analytical methods.

Direct substitution

The simplest way to evaluate a limit is direct substitution. If plugging in x=a into f(x) gives a finite number, then that number is the limit.

Always try direct substitution first.

Examples

  1. Evaluate

x→3lim​x2

Substitute x=3 into x2:

​x→3lim​x2=(3)2=9​​

Let’s try another one:

  1. Evaluate

x→3π​lim​xtan(x)−3​​

Solution

(spoiler)

Substitute x=3π​ into the expression:

​x→3π​lim​xtan(x)−3​​=π/3tan(π/3)−3​​=π/33​−3​​=0​​

Limit properties

Direct substitution works in many cases because limits follow a set of rules (limit laws). These laws let you break a complicated expression into simpler pieces.

Let x→alim​f(x)=F and x→alim​g(x)=G. Then,

  1. Constant multiple:

x→alim​[bf(x)]=b⋅F

  1. Sum or difference:

x→alim​[f(x)±g(x)]=F±G

  1. Product:

x→alim​[f(x)⋅g(x)]=F⋅G

  1. Quotient:

x→alim​g(x)f(x)​=GF​,G=0

  1. Power:

x→alim​[f(x)]n=Fn

  1. Root:

x→alim​nf(x)​=nF​,n>0

Some AP-style problems expect you to apply these laws without being given explicit formulas for f and g. For example:

  1. Given:
  • x→5lim​f(x)=2
  • x→5lim​g(x)=4

Evaluate:

x→5lim​[f(x)−3g(x)]2

Use the constant multiple law, the difference law, and the power law to move the limit inside step by step:

(x→5lim​f(x)−3⋅x→5lim​g(x))2

​=(2−3⋅4)2=(2−12)2=(−10)2=100​​

Piecewise-defined functions

A piecewise function uses different formulas on different intervals of x. When you take a limit at a breakpoint (a value of x where the formula changes), you need one-sided limits:

  • the left-hand limit (approaching from smaller x values)
  • the right-hand limit (approaching from larger x values)

The overall limit exists only if the two 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 (DNE)
b)4
c)4

Solutions

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

(spoiler)

Here, x approaches −1, which is a breakpoint. So we compare the one-sided limits.

  • Left-hand limit: (x→−1−)

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

x→−1−lim​x2=1

  • Right-hand limit: (x→−1+)

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: (x→2−)

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

x→2−lim​2x=4

  • Right-hand limit: (x→2+)

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 and 3 is not a breakpoint, you don’t need one-sided limits. You just need the correct branch.

Because 3>2, we use the third branch, f(x)=4. Therefore,

x→3lim​4=4​

Sidenote
Piecewise in Desmos

You can define piecewise functions in Desmos using curly braces. Each piece is written as an inequality followed by a colon and the corresponding expression.

Using the same function as an example:

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

This would be entered into Desmos as:

f(x)={x≤−1:x2,−1<x≤2:2x,x>2:4}

Composite functions

A composite function is a function inside another function: (f∘g)(x), also written f(g(x)).

When the outer function behaves nicely (is continuous) at the value the inner function approaches, you can evaluate the limit by working from the inside out.

If f(x) is continuous at x=G and x→alim​g(x)=G, then

x→alim​f(g(x))=f(x→alim​g(x))=f(G)

So the process is:

  1. Find the limit of the inner function g(x).
  2. Plug that result into the outer function f.

Examples

Let f(x)=3x+1 and g(x)=2x2.

Evaluate:

a) x→0lim​f(g(x)) b) x→0lim​g(f(x))

Solutions

a) x→0lim​f(g(x))

(spoiler)

First, evaluate the inner limit:

x→0lim​g(x)=x→0lim​2x2=0

Now apply f to that value:

f(0)=3(0)+1=1​

b) x→0lim​g(f(x))

(spoiler)

First, evaluate the inner limit:

x→0lim​f(x)=x→0lim​(3x+1)=1

Now apply g to that value:

g(1)=2(1)2=2​

You can confirm this visually in Desmos by defining f(x)=3x+1 and g(x)=2x2, then graphing f(g(x)) and g(f(x)) to see what y-value each composite approaches as x→0.

Challenge problems

The composite-function limit law works when the outer function f(x) is continuous at the value approached by the inner function g(x) (more on continuity will be covered later).

But what if x→alim​g(x) doesn’t exist, or what if f(x) has breaks?

In some cases, finding x→alim​f(g(x)) requires you to evaluate x→Glim​f(x) (which may not equal f(G)) when x→alim​g(x)=G. The multi-part problem below includes several of the trickier cases that can appear on the AP exam (though they’re rare).

Shown below are the graphs of g(x) and f(x):

Evaluate:

a) x→4lim​f(g(x))
b)x→1lim​g(f(x))
c)x→−2lim​f(f(x))
d)x→−1lim​g(g(x))

Answers

(spoiler)

a) DNE
b)∞(DNE)
c)2
d) DNE

Solutions

a)x→4lim​f(g(x))

(spoiler)

Start with the inner function:

There is a vertical asymptote at x=4, and both one-sided limits of g(x) approach +∞. So x→4lim​g(x) does not approach a finite number.

Also, from the graph, the outer function f(x) is only defined on the domain (−5,8]. That means the composite f(g(x)) can only be evaluated when the output of g(x) lands inside that domain.

Since there is no meaningful value for “f(∞),” the overall limit does not exist.

b) x→1lim​g(f(x))

(spoiler)

First, evaluate the inner limit:

x→1lim​f(x)=4.

At x=4, the graph of g has a vertical asymptote, so it’s reasonable to say the composite limit does not exist.

To be more specific about the behavior:

  • As x→1−, the graph shows f(x)→4 from below (values like 3.99, 3.999, …).
  • Feeding those into g, the values g(3.99), g(3.999), … grow without bound, consistent with

    x→4lim​g(x)=∞.

The same behavior occurs as x→1+.

So

x→1lim​g(f(x))=∞,

which also means the limit does not exist as a finite value.

You can visualize this in Desmos by plotting sample functions with the same local behavior:

  1. f(x)=x+3, since x→1lim​f(x)=4
  2. g(x)=(x−4)21​, since the graph shoots up to ∞ on both sides of x=4
  3. g(f(x)), which will have a vertical asymptote at x=1, so

x→1lim​g(f(x))=∞ (DNE)​

c) x→−2lim​f(f(x))

(spoiler)

First, evaluate the inner limit:

x→−2lim​f(x)=3.

Because f has breaks, you can’t automatically replace the outer limit with f(3). You need to know how f(x) approaches 3.

From the graph, as x→−2 from either side, f(x) approaches 3 from above (values like 3.01, 3.02, …).

That means the input to the outer f approaches 3 from the right, so we need

x→3+lim​f(x)=2​.

d) x→−1lim​g(g(x))

(spoiler)

First, evaluate the inner limit:

x→−1lim​g(x)=−4.

Now we need to understand what happens to g(x) as its input approaches −4. The key detail is that the inner g(x) approaches −4 from different sides depending on whether x approaches −1 from the left or the right.

  • If x→−1−, then g(x)→−4 from below (for example, g(−1.01)≈−4.01). That makes the outer input approach −4−, and the graph shows g(x)→−1.
  • If x→−1+, then g(x)→−4 from above (for example, g(−0.99)≈−3.99). That makes the outer input approach −4+, and the graph shows g(x)→−2.

Because these two one-sided results don’t match, the overall limit does not exist:

x→−1lim​g(g(x)) does not exist​

Key points
  • For composite functions: to find x→alim​f(g(x)), find x→alim​g(x)=G and evaluate f(G) (if f is continuous).

  • If a limit involves the breakpoint of a piecewise function, use one-sided limits.