If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Precalculus>Unit 10

Lesson 5: Determining limits using algebraic properties of limits: direct substitution

# Limits of piecewise functions

In this video, we explore limits of piecewise functions using algebraic properties of limits and direct substitution. We learn that to find one-sided and two-sided limits, we need to consider the function definition for the specific interval we're approaching and substitute the value of x accordingly.

## Want to join the conversation?

• What does piecewise mean?
• It means we've defined the function as a bunch of separate curve segments on different intervals.
• At is it not possible that the square root of 4 is also equal to -2, such that the limit of f(x) as x approaches 4 from the right does not exist? Or is the negative square root rejected?
• Hey there!

For your question, the negative square root is not rejected. It is simply because the functions asks for the principal square root; that is, the positive value of the square root. For your example, the function asks for the sqrt(x). This is interpreted as the principal square root of x. If we plug in 4, the principle square root would be positive 2.

For some additional context, if the function wanted both the positive and negative roots, we would write +/-sqrt(x), which if we plug in 4 would evaluate to both 2 and -2. Additionally, if we just want the negative roots, we could write -sqrt(x), which gives only -2 when we plug in 4.

Hope this clears some confusion!
• Hi, I am always wondering: What is the limit of the f(x) you give, while x is approaching 0? or it does not exist?
• One would use the appropriate one sided limit for such values at the endpoints of a domain. In this case the value approached by the function as x closes on 0 is, indeed, -2: lim x → 0+ = -2. However lim x → 0 does not exist because lim x → 0- does not exist as all values of x equal to or smaller than zero are not part of the domain of f(x).
• What background knowledge do I need to have before starting calculus? It will be nice to know what I need to know so I could learn this as clearly as possible.
• A calculus course will usually start from scratch with limits, so having previous experience with limits is helpful, but not strictly necessary.

You should be very comfortable with algebra and algebraic manipulations. Most calculus problems consist of many lines of algebra, and just a little calculus at the beginning or end. You should also be familiar with the trigonometric functions and have some basic trig identities easily available, like the Pythagorean and double-angle identities.

You'll need a grasp of series and sigma notation as well, and that should set you for Calculus 1 or AP Calculus AB.
• At , why when x tends to -1 isn't the result 1/2? -1 IS in the second interval which would give us 2^-1= 1/2. I get why the limit doesn't exist though. I just find it weird that the -1 belongs to the interval.
• That's because limits don't care about what the function's actual value is at that point, as they only ask what value the function is approaching from both sides (which is two different values, hence the limit is undefined).
• For f(x), what will be the limit as x approaches 1?
• Good question, the limit does not exist though. The easiest way to tell is to graph it, you will see there is a vertical asymptote, where it heads toward infinity from the right and negative infinity from the left.

The only way a limit would exist is if there was something to "cancel out" the x-1 in the denominator. So if you had something like [(x+2)(x-1)]/(x-1). Then there would be a hole at 1, but the limit would still exist, and it would be 3. This is how you have to handle most rational functions.
• Sorry but can anyone give the intuition behind why anything to the power 0(a^0) is 1.
(1 vote)
• We know that increasing the exponent by 1 represents a multiplication by 𝑎 (the base):
𝑎^(𝑛 + 1) = (𝑎^𝑛) ∙ 𝑎

By the same logic, decreasing the exponent by 1 represents a division by 𝑎:
𝑎^(𝑛 − 1) = (𝑎^𝑛)∕𝑎

Thereby, we can write
𝑎^0 = 𝑎^(1 − 1) = (𝑎^1)∕𝑎 = 𝑎∕𝑎 = 1, as long as 𝑎 ≠ 0 because otherwise we get 0∕0 which is an indeterminate expression.
• At Sal writes sin(-1+1)=0 . Shouldn't he have written (...)= 0+Pi*k?
Is there some rule that limits must have a single value?
(1 vote)
• There is a rule (and a theorem, not just a definition) that limits have at most one value, but it's not terribly relevant here. As the input of sin(x) approaches 0, sin(x) approaches 0 as well.

It's true that sin(x) approaches 0 around other x-values as well, but that's irrelevant here, because we're only looking at sin(x) around x=0 (or at sin(x+1) around x=-1).
• Before we leave tangent functions and limits... the graph of the tangent function at PI indicates the limit approaches -1. You are saying the limit approaches 0. Please advise the discrepancy.
(1 vote)
• You are likely looking at the graph of cos(x), which does evaluate as (pi,-1). tan evaluates as (pi,0).
• I did an exercise on Khan Academy but I wasn't sure why. So the problem is the following:
g(x):
(first equation): (x/3)-2 for 0<x<6
(second equation): cos(x∙π) for 6≤x≤10
Then, it's asked to find the limit of g(x) when x is approaching 6.
So what's the answer for this question and why?
(1 vote)
• This shows that when you graph the function g(x) from 0 to 6 the function would be (x/3)-2 and from 6 to 10 the function would be cos(x*pi).

From the left side on the number line you can plug in 6 to the function:

(6/3) - 2 gives you 0

From the right side when you plug in 6 you get

cos(6 pi) which is equal to 1

Since the limit of g(x) is different from where the function is approaching from the right and the left the limit does not exist.

Hope this helps, if you need a clarification let me know.