This collection offers 20 practice problems on right-hand and left-hand limits, arranged in order of increasing difficulty. The opening problems deal with the most straightforward right-hand and left-hand limits; the discussion then turns to the formal definitions, to piecewise-defined functions, to infinite right-hand and left-hand limits, to the part played by the domain, and to continuity from the right and from the left.
Every solution states explicitly from which side the point is approached, which expression for the function is to be used, and why the limit obtained does, or does not, entail the existence of the two-sided limit.
Problem 1 — level ★☆☆☆☆
Evaluate the following right-hand limit:
\[ \lim_{x\to 2^+}(3x-1). \]
Answer
\[ \lim_{x\to 2^+}(3x-1)=5. \]
Solution
The notation \(x\to 2^+\) indicates that \(x\) approaches \(2\) through values greater than \(2\) only.
The function
\[ f(x)=3x-1 \]
is affine and exhibits no irregularity at the point \(x=2\). The limit may therefore be evaluated by substituting \(x=2\) directly:
\[ 3\cdot 2-1=6-1=5. \]
Hence
\[ \lim_{x\to 2^+}(3x-1)=5. \]
That the approach takes place from the right does not affect the result, since one and the same expression \(3x-1\) is defined and well behaved both to the right and to the left of \(2\).
Problem 2 — level ★☆☆☆☆
Evaluate the following left-hand limit:
\[ \lim_{x\to -1^-}(x^2+2x). \]
Answer
\[ \lim_{x\to -1^-}(x^2+2x)=-1. \]
Solution
The notation \(x\to -1^-\) means that \(x\) approaches \(-1\) through values smaller than \(-1\).
The function
\[ f(x)=x^2+2x \]
is a polynomial and may be evaluated directly at the point \(x=-1\). We obtain:
\[ (-1)^2+2(-1)=1-2=-1. \]
Consequently,
\[ \lim_{x\to -1^-}(x^2+2x)=-1. \]
Here too the side from which the point is approached does not alter the value of the limit, since the polynomial is given by the same expression throughout a whole neighbourhood of \(-1\).
Problem 3 — level ★★☆☆☆
Prove, directly from the \(\varepsilon\)-\(\delta\) definition, that
\[ \lim_{x\to 2^+}(3x-1)=5. \]
Answer
The definition is satisfied by the choice
\[ \delta=\frac{\varepsilon}{3}. \]
Solution
We must show that to every \(\varepsilon>0\) there corresponds a \(\delta>0\) such that
\[ 2<x<2+\delta \implies |(3x-1)-5|<\varepsilon. \]
We begin with the expression that has to be made smaller than \(\varepsilon\):
\[ |(3x-1)-5|. \]
Simplifying inside the absolute value, we obtain
\[ |3x-6|=|3(x-2)|=3|x-2|. \]
We therefore require
\[ 3|x-2|<\varepsilon. \]
For this it is enough to impose
\[ |x-2|<\frac{\varepsilon}{3}. \]
Accordingly we choose
\[ \delta=\frac{\varepsilon}{3}. \]
If \(2<x<2+\delta\), then
\[ 0<x-2<\delta, \]
and hence
\[ |x-2|<\delta. \]
It follows that
\[ |(3x-1)-5| =3|x-2| <3\delta =3\cdot\frac{\varepsilon}{3} =\varepsilon. \]
The definition of the right-hand limit is thus satisfied, and we may conclude that
\[ \lim_{x\to 2^+}(3x-1)=5. \]
Problem 4 — level ★★☆☆☆
Prove, directly from the \(\varepsilon\)-\(\delta\) definition, that
\[ \lim_{x\to 1^-}x^2=1. \]
Answer
The definition is satisfied by the choice
\[ \delta=\min\left\{1,\frac{\varepsilon}{2}\right\}. \]
Solution
We must show that to every \(\varepsilon>0\) there corresponds a \(\delta>0\) such that
\[ 1-\delta<x<1 \implies |x^2-1|<\varepsilon. \]
We factorise the difference of two squares:
\[ |x^2-1|=|(x-1)(x+1)|=|x-1||x+1|. \]
The factor \(|x-1|\) is controlled directly by \(\delta\). It remains to find a simple upper bound for \(|x+1|\).
We first impose \(\delta\le 1\). The condition
\[ 1-\delta<x<1 \]
then yields
\[ 0<x<1. \]
Hence
\[ 1<x+1<2, \]
and in particular
\[ |x+1|<2. \]
Consequently,
\[ |x^2-1|=|x-1||x+1|<2|x-1|. \]
To make this last quantity smaller than \(\varepsilon\) it is enough to require
\[ |x-1|<\frac{\varepsilon}{2}. \]
We may therefore choose
\[ \delta=\min\left\{1,\frac{\varepsilon}{2}\right\}. \]
If \(1-\delta<x<1\), then \(|x-1|<\delta\), and therefore
\[ |x^2-1| <2|x-1| <2\delta \le\varepsilon. \]
The definition of the left-hand limit is thus verified:
\[ \lim_{x\to 1^-}x^2=1. \]
Problem 5 — level ★★☆☆☆
Determine the right-hand limit of the function
\[ f(x)=\sqrt{x} \]
at the point \(x_0=0\). Decide, in addition, whether the left-hand limit is meaningful.
Answer
\[ \lim_{x\to 0^+}\sqrt{x}=0. \]
The left-hand limit at \(0\) is not defined relative to the real domain of the function.
Solution
The function
\[ f(x)=\sqrt{x} \]
is defined, within the real numbers, only when
\[ x\ge 0. \]
Its domain is therefore
\[ D=[0,+\infty). \]
There are points of the domain arbitrarily close to \(0\) and greater than \(0\). The right-hand limit is thus meaningful.
As \(x\) approaches \(0\) from the right, \(\sqrt{x}\) approaches \(0\) as well. Hence
\[ \lim_{x\to 0^+}\sqrt{x}=0. \]
There are, on the other hand, no points of the domain smaller than \(0\) and arbitrarily close to \(0\). For this reason the left-hand limit
\[ \lim_{x\to 0^-}\sqrt{x} \]
is not defined relative to the domain of the given function.
Problem 6 — level ★★☆☆☆
Determine the left-hand limit of the function
\[ f(x)=\sqrt{4-x} \]
at the point \(x_0=4\). Decide, in addition, whether the right-hand limit is meaningful.
Answer
\[ \lim_{x\to 4^-}\sqrt{4-x}=0. \]
The right-hand limit at \(4\) is not defined relative to the real domain of the function.
Solution
For the square root to be defined, its argument must be non-negative:
\[ 4-x\ge 0. \]
Solving this inequality, we obtain
\[ x\le 4. \]
The domain of the function is therefore
\[ D=(-\infty,4]. \]
There are points of the domain arbitrarily close to \(4\) and smaller than \(4\). The left-hand limit may thus be computed.
As \(x\to 4^-\), the quantity \(4-x\) is positive and tends to \(0\). Consequently,
\[ \sqrt{4-x}\to 0. \]
Hence
\[ \lim_{x\to 4^-}\sqrt{4-x}=0. \]
There are, on the other hand, no points of the domain greater than \(4\). The right-hand limit at \(4\) is therefore not defined relative to the domain of the function.
Problem 7 — level ★★☆☆☆
Evaluate the two one-sided limits and decide whether the two-sided limit exists:
\[ \lim_{x\to 1}\frac{x^2-1}{x-1}. \]
Answer
\[ \lim_{x\to 1^-}\frac{x^2-1}{x-1} = \lim_{x\to 1^+}\frac{x^2-1}{x-1} =2. \]
Hence
\[ \lim_{x\to 1}\frac{x^2-1}{x-1}=2. \]
Solution
Substituting \(x=1\) directly, we obtain
\[ \frac{1^2-1}{1-1}=\frac{0}{0}, \]
which is an indeterminate form. The expression must therefore be transformed.
The numerator is a difference of two squares:
\[ x^2-1=(x-1)(x+1). \]
For every \(x\neq 1\) the factor \(x-1\) may be cancelled:
\[ \frac{x^2-1}{x-1} = \frac{(x-1)(x+1)}{x-1} = x+1. \]
In computing a limit as \(x\to 1\) one considers values of \(x\) near \(1\) but distinct from \(1\). The cancellation is therefore legitimate both to the left and to the right of the point.
For the left-hand limit:
\[ \lim_{x\to 1^-}\frac{x^2-1}{x-1} = \lim_{x\to 1^-}(x+1) =2. \]
For the right-hand limit:
\[ \lim_{x\to 1^+}\frac{x^2-1}{x-1} = \lim_{x\to 1^+}(x+1) =2. \]
Both one-sided limits exist and agree. Consequently,
\[ \lim_{x\to 1}\frac{x^2-1}{x-1}=2. \]
Problem 8 — level ★★☆☆☆
Consider the function
\[ f(x)= \begin{cases} x+2, & x<1,\\ 5, & x=1,\\ 3x, & x>1. \end{cases} \]
Evaluate the one-sided limits at \(x_0=1\), decide whether the limit as \(x\to 1\) exists, and determine whether the function is continuous at \(1\).
Answer
\[ \lim_{x\to 1^-}f(x)=3, \qquad \lim_{x\to 1^+}f(x)=3. \]
Hence
\[ \lim_{x\to 1}f(x)=3. \]
The function is not continuous at \(1\), since \(f(1)=5\neq 3\).
Solution
The function is given by different expressions to the left of \(1\), at the point \(1\) itself, and to the right of \(1\).
To compute the left-hand limit we must use the branch valid for \(x<1\):
\[ f(x)=x+2. \]
Hence
\[ \lim_{x\to 1^-}f(x) = \lim_{x\to 1^-}(x+2) = 1+2 = 3. \]
To compute the right-hand limit we must use instead the branch valid for \(x>1\):
\[ f(x)=3x. \]
We thus obtain
\[ \lim_{x\to 1^+}f(x) = \lim_{x\to 1^+}3x = 3. \]
Both one-sided limits exist and are equal. The two-sided limit therefore exists:
\[ \lim_{x\to 1}f(x)=3. \]
To test continuity we must compare the limit with the value of the function at the point. The piecewise definition gives
\[ f(1)=5. \]
Since
\[ \lim_{x\to 1}f(x)=3\neq 5=f(1), \]
the function is not continuous at \(1\).
This example shows that a limit may exist even when the value assigned to the function at the point differs from it.
Problem 9 — level ★★☆☆☆
Consider the function
\[ f(x)= \begin{cases} 2x+1, & x<0,\\ x^2+2, & x\ge 0. \end{cases} \]
Evaluate the one-sided limits at \(0\), decide whether the limit as \(x\to 0\) exists, and determine whether the function is continuous from the right or from the left.
Answer
\[ \lim_{x\to 0^-}f(x)=1, \qquad \lim_{x\to 0^+}f(x)=2. \]
The limit as \(x\to 0\) does not exist. The function is continuous from the right, but not from the left.
Solution
For the left-hand limit we must use the branch valid when \(x<0\):
\[ f(x)=2x+1. \]
Hence
\[ \lim_{x\to 0^-}f(x) = \lim_{x\to 0^-}(2x+1) = 1. \]
For the right-hand limit we must use the branch valid when \(x\ge 0\). In computing a right-hand limit one considers values \(x>0\), so that the expression to be used is
\[ f(x)=x^2+2. \]
It follows that
\[ \lim_{x\to 0^+}f(x) = \lim_{x\to 0^+}(x^2+2) = 2. \]
The two one-sided limits differ:
\[ 1\neq 2. \]
Consequently, the limit as \(x\to 0\) does not exist.
We now compute the value of the function at the point. Since the second branch includes \(x=0\),
\[ f(0)=0^2+2=2. \]
The right-hand limit agrees with the value of the function:
\[ \lim_{x\to 0^+}f(x)=2=f(0). \]
The function is therefore continuous from the right at \(0\).
The left-hand limit, on the other hand, equals \(1\), so that
\[ \lim_{x\to 0^-}f(x)\neq f(0). \]
The function is not continuous from the left.
Problem 10 — level ★★★☆☆
Evaluate the one-sided limits of the function
\[ f(x)=\frac{x}{|x|} \]
at the point \(x_0=0\) and decide whether the limit as \(x\to 0\) exists.
Answer
\[ \lim_{x\to 0^-}\frac{x}{|x|}=-1, \qquad \lim_{x\to 0^+}\frac{x}{|x|}=1. \]
The limit as \(x\to 0\) does not exist.
Solution
The behaviour of the absolute value depends on the sign of \(x\).
When \(x<0\) we have
\[ |x|=-x. \]
Hence, for \(x<0\),
\[ \frac{x}{|x|} = \frac{x}{-x} = -1. \]
Consequently,
\[ \lim_{x\to 0^-}\frac{x}{|x|}=-1. \]
When, on the other hand, \(x>0\), we have
\[ |x|=x. \]
Hence
\[ \frac{x}{|x|} = \frac{x}{x} = 1. \]
It follows that
\[ \lim_{x\to 0^+}\frac{x}{|x|}=1. \]
Since
\[ -1\neq 1, \]
the two one-sided limits do not agree. The limit as \(x\to 0\) does not exist.
Problem 11 — level ★★★☆☆
Evaluate the one-sided limits of the function
\[ f(x)=\frac{1}{x-3} \]
at the point \(x_0=3\).
Answer
\[ \lim_{x\to 3^-}\frac{1}{x-3}=-\infty, \qquad \lim_{x\to 3^+}\frac{1}{x-3}=+\infty. \]
The two-sided limit as \(x\to 3\) does not exist.
Solution
As \(x\to 3\), the denominator \(x-3\) tends to \(0\). To determine the behaviour of the quotient it is essential to examine the sign of the denominator on each side.
If \(x\to 3^-\), then \(x<3\). Consequently,
\[ x-3<0. \]
The denominator is negative and its absolute value becomes ever smaller. The reciprocal therefore takes negative values whose absolute value grows ever larger:
\[ \lim_{x\to 3^-}\frac{1}{x-3}=-\infty. \]
If instead \(x\to 3^+\), then \(x>3\), so that
\[ x-3>0. \]
The denominator is positive and tends to \(0\). The reciprocal therefore takes arbitrarily large positive values:
\[ \lim_{x\to 3^+}\frac{1}{x-3}=+\infty. \]
The two one-sided limits describe opposite behaviour. Hence no single limit exists as \(x\to 3\).
Problem 12 — level ★★★☆☆
Evaluate the one-sided limits of the function
\[ f(x)=-\frac{2}{x+1} \]
at the point \(x_0=-1\).
Answer
\[ \lim_{x\to -1^-}\left(-\frac{2}{x+1}\right)=+\infty, \qquad \lim_{x\to -1^+}\left(-\frac{2}{x+1}\right)=-\infty. \]
Solution
The numerator is identically equal to \(-2\). The sign of the function therefore depends on the sign of the denominator \(x+1\).
When \(x\to -1^-\) we have \(x<-1\), so that
\[ x+1<0. \]
Numerator and denominator are both negative, and the quotient is therefore positive. Moreover the denominator tends to \(0\) through negative values, so that the value of the quotient increases without bound:
\[ \lim_{x\to -1^-}\left(-\frac{2}{x+1}\right)=+\infty. \]
When instead \(x\to -1^+\) we have \(x>-1\), so that
\[ x+1>0. \]
The numerator is negative and the denominator positive; the quotient is therefore negative. Since the denominator tends to \(0\), the absolute value of the quotient increases without bound:
\[ \lim_{x\to -1^+}\left(-\frac{2}{x+1}\right)=-\infty. \]
Here too the two one-sided behaviours are incompatible, so the two-sided limit does not exist.
Problem 13 — level ★★★☆☆
Evaluate the one-sided limits and the two-sided limit:
\[ \lim_{x\to 2}\frac{1}{(x-2)^2}. \]
Answer
\[ \lim_{x\to 2^-}\frac{1}{(x-2)^2} = \lim_{x\to 2^+}\frac{1}{(x-2)^2} =+\infty. \]
Hence
\[ \lim_{x\to 2}\frac{1}{(x-2)^2}=+\infty. \]
Solution
As \(x\to 2\), the difference \(x-2\) tends to \(0\).
The denominator, however, is the square of this difference:
\[ (x-2)^2. \]
For every \(x\neq 2\) the square is strictly positive:
\[ (x-2)^2>0. \]
If \(x\to 2^-\), the quantity \(x-2\) is negative, but its square is positive and tends to \(0\). Consequently,
\[ \lim_{x\to 2^-}\frac{1}{(x-2)^2}=+\infty. \]
If \(x\to 2^+\), the quantity \(x-2\) is positive and its square again tends to \(0\) through positive values. Hence,
\[ \lim_{x\to 2^+}\frac{1}{(x-2)^2}=+\infty. \]
The two one-sided limits agree and are both equal to \(+\infty\). We may therefore write
\[ \lim_{x\to 2}\frac{1}{(x-2)^2}=+\infty. \]
Problem 14 — level ★★★★☆
Prove, directly from the \(M\)-\(\delta\) definition, that
\[ \lim_{x\to 0^+}\frac{1}{x}=+\infty. \]
Answer
The definition is satisfied by the choice
\[ \delta=\frac{1}{M}. \]
Solution
In order to prove that
\[ \lim_{x\to 0^+}\frac{1}{x}=+\infty, \]
we must verify that to every \(M>0\) there corresponds a \(\delta>0\) such that
\[ 0<x<\delta \implies \frac{1}{x}>M. \]
We start from the inequality we wish to obtain:
\[ \frac{1}{x}>M. \]
Since we are considering \(x>0\) and \(M>0\), we may multiply both sides by \(x\) without reversing the inequality:
\[ 1>Mx. \]
Dividing by \(M>0\), we obtain
\[ x<\frac{1}{M}. \]
It is therefore natural to choose
\[ \delta=\frac{1}{M}. \]
If
\[ 0<x<\delta=\frac{1}{M}, \]
then, on passing to reciprocals of positive quantities, the inequality is reversed:
\[ \frac{1}{x}>M. \]
The definition of an infinite right-hand limit is thus verified. Hence
\[ \lim_{x\to 0^+}\frac{1}{x}=+\infty. \]
Problem 15 — level ★★★☆☆
Given the function
\[ f(x)=\sqrt{2-x}, \]
decide which one-sided limits are meaningful at the point \(x_0=2\) and evaluate those that exist.
Answer
\[ \lim_{x\to 2^-}\sqrt{2-x}=0. \]
The right-hand limit at \(2\) is not defined relative to the real domain of the function.
Solution
To determine the domain we require the argument of the square root to be non-negative:
\[ 2-x\ge 0. \]
Solving, we obtain
\[ x\le 2. \]
The domain is therefore
\[ D=(-\infty,2]. \]
There are points of the domain arbitrarily close to \(2\) and smaller than \(2\). The left-hand limit is thus meaningful.
As \(x\to 2^-\), the difference \(2-x\) is positive and tends to \(0\). Hence
\[ \lim_{x\to 2^-}\sqrt{2-x}=0. \]
There are, on the other hand, no points of the domain greater than \(2\). In particular, no values \(x\in D\) can be found for which
\[ 2<x<2+\delta. \]
The right-hand limit at \(2\) is therefore not defined relative to the domain of the function.
Problem 16 — level ★★★☆☆
Let
\[ f:[0,4]\to\mathbb{R},\qquad f(x)=x^2. \]
Verify that \(f\) is continuous from the right at \(0\) and continuous from the left at \(4\).
Answer
\[ \lim_{x\to 0^+}f(x)=f(0)=0, \qquad \lim_{x\to 4^-}f(x)=f(4)=16. \]
Solution
The domain of the function is the closed interval \([0,4]\).
At the point \(0\) there are points of the domain arbitrarily close to it on the right only. The natural continuity condition relative to the domain is therefore continuity from the right.
We compute:
\[ \lim_{x\to 0^+}f(x) = \lim_{x\to 0^+}x^2 = 0. \]
The value of the function at the point is
\[ f(0)=0^2=0. \]
Since
\[ \lim_{x\to 0^+}f(x)=f(0), \]
the function is continuous from the right at \(0\).
At the point \(4\), on the other hand, there are points of the domain arbitrarily close to it on the left only. We compute:
\[ \lim_{x\to 4^-}f(x) = \lim_{x\to 4^-}x^2 = 16. \]
Moreover
\[ f(4)=4^2=16. \]
Hence
\[ \lim_{x\to 4^-}f(x)=f(4), \]
and the function is continuous from the left at \(4\).
Problem 17 — level ★★★☆☆
Consider the function
\[ f(x)= \begin{cases} 1, & x<0,\\ 2, & x=0,\\ x+2, & x>0. \end{cases} \]
Decide whether the function is continuous from the right or from the left at the point \(x_0=0\).
Answer
The function is continuous from the right at \(0\), but not from the left.
Solution
The value of the function at the point is assigned directly:
\[ f(0)=2. \]
To compute the left-hand limit we must use the branch valid for \(x<0\):
\[ f(x)=1. \]
Hence
\[ \lim_{x\to 0^-}f(x)=1. \]
Since
\[ 1\neq 2=f(0), \]
the function is not continuous from the left at \(0\).
For the right-hand limit we must use instead the branch valid for \(x>0\):
\[ f(x)=x+2. \]
We compute:
\[ \lim_{x\to 0^+}f(x) = \lim_{x\to 0^+}(x+2) = 2. \]
The right-hand limit agrees with the value of the function:
\[ \lim_{x\to 0^+}f(x)=2=f(0). \]
The function is therefore continuous from the right at \(0\).
Since the left-hand and right-hand limits differ, the function is not continuous at \(0\).
Problem 18 — level ★★★★☆
Determine the value of the real parameter \(a\) for which the limit as \(x\to 2\) of the function
\[ f_a(x)= \begin{cases} ax+1, & x<2,\\ x^2-a, & x>2. \end{cases} \]
exists. Evaluate the limit as well.
Answer
The limit exists if and only if
\[ a=1. \]
For \(a=1\),
\[ \lim_{x\to 2}f_a(x)=3. \]
Solution
For the limit as \(x\to 2\) to exist, the left-hand and right-hand limits must both exist and agree.
For \(x<2\) the function is given by
\[ f_a(x)=ax+1. \]
The left-hand limit is therefore
\[ \lim_{x\to 2^-}f_a(x) = \lim_{x\to 2^-}(ax+1) = 2a+1. \]
For \(x>2\) the function is given by
\[ f_a(x)=x^2-a. \]
The right-hand limit equals
\[ \lim_{x\to 2^+}f_a(x) = \lim_{x\to 2^+}(x^2-a) = 4-a. \]
For the two limits to agree we must have
\[ 2a+1=4-a. \]
We solve the equation:
\[ 2a+a=4-1, \]
so that
\[ 3a=3 \]
and finally
\[ a=1. \]
Substituting \(a=1\) into either one-sided limit, we obtain
\[ 2a+1=2\cdot 1+1=3. \]
The right-hand limit likewise equals
\[ 4-a=4-1=3. \]
Hence, for \(a=1\),
\[ \lim_{x\to 2}f_a(x)=3. \]
The function is not defined at the point \(x=2\), but this does not prevent the limit from existing, since a limit depends on the behaviour of the function at points near \(2\) and not on the value taken at the point itself.
Problem 19 — level ★★★★☆
Determine all values of the real parameters \(a\) and \(b\) for which the function
\[ f_{a,b}(x)= \begin{cases} ax+b, & x<1,\\ 5, & x=1,\\ 2x+3, & x>1 \end{cases} \]
is continuous at the point \(x_0=1\).
Answer
The function is continuous at \(1\) if and only if
\[ a+b=5. \]
Equivalently,
\[ b=5-a. \]
Solution
For the function to be continuous at \(1\), both conditions
\[ \lim_{x\to 1^-}f_{a,b}(x)=f_{a,b}(1) \qquad\text{and}\qquad \lim_{x\to 1^+}f_{a,b}(x)=f_{a,b}(1) \]
must be satisfied.
The value of the function at the point is
\[ f_{a,b}(1)=5. \]
To the left of \(1\) the function is given by
\[ f_{a,b}(x)=ax+b. \]
Hence
\[ \lim_{x\to 1^-}f_{a,b}(x) = a\cdot 1+b = a+b. \]
Continuity from the left therefore requires
\[ a+b=5. \]
To the right of \(1\) the function is given by
\[ f_{a,b}(x)=2x+3. \]
The right-hand limit equals
\[ \lim_{x\to 1^+}f_{a,b}(x) = 2\cdot 1+3 = 5. \]
The right-hand limit thus agrees automatically with the value of the function at the point:
\[ \lim_{x\to 1^+}f_{a,b}(x)=5=f_{a,b}(1). \]
The only condition to be imposed on the parameters is therefore
\[ a+b=5. \]
There is not just one pair of parameters, but infinitely many. Once \(a\in\mathbb{R}\) has been chosen arbitrarily, we must have
\[ b=5-a. \]
Problem 20 — level ★★★★★
Consider the function
\[ f(x)= \begin{cases} x+1, & x<0,\\ 2, & x=0,\\ x^2+2, & 0<x<2,\\ 7, & x=2,\\ 5-x, & x>2. \end{cases} \]
Carry out a complete analysis of the one-sided limits and of continuity from the right and from the left at the points \(x_0=0\) and \(x_0=2\).
Answer
At the point \(x_0=0\):
\[ \lim_{x\to 0^-}f(x)=1, \qquad \lim_{x\to 0^+}f(x)=2. \]
The limit as \(x\to 0\) does not exist. The function is continuous from the right, but not from the left.
At the point \(x_0=2\):
\[ \lim_{x\to 2^-}f(x)=6, \qquad \lim_{x\to 2^+}f(x)=3. \]
The limit as \(x\to 2\) does not exist. The function is continuous neither from the left nor from the right.
Solution
We begin with the study of the point \(x_0=0\).
For \(x<0\) the function is given by
\[ f(x)=x+1. \]
The left-hand limit is therefore
\[ \lim_{x\to 0^-}f(x) = \lim_{x\to 0^-}(x+1) = 1. \]
For \(0<x<2\) the function is given instead by
\[ f(x)=x^2+2. \]
This is the expression to be used for the right-hand limit at \(0\):
\[ \lim_{x\to 0^+}f(x) = \lim_{x\to 0^+}(x^2+2) = 2. \]
The two one-sided limits differ:
\[ 1\neq 2. \]
Consequently, the limit as \(x\to 0\) does not exist.
The value of the function at the point is
\[ f(0)=2. \]
Comparing the value of the function with the one-sided limits, we observe that
\[ \lim_{x\to 0^+}f(x)=2=f(0). \]
The function is therefore continuous from the right at \(0\).
On the contrary,
\[ \lim_{x\to 0^-}f(x)=1\neq 2=f(0), \]
so that the function is not continuous from the left at \(0\).
We now turn to the study of the point \(x_0=2\).
For values \(x<2\) sufficiently close to \(2\) we have \(0<x<2\), so that the function is given by
\[ f(x)=x^2+2. \]
The left-hand limit is accordingly
\[ \lim_{x\to 2^-}f(x) = \lim_{x\to 2^-}(x^2+2) = 4+2 = 6. \]
For \(x>2\) the function is given by
\[ f(x)=5-x. \]
The right-hand limit therefore equals
\[ \lim_{x\to 2^+}f(x) = \lim_{x\to 2^+}(5-x) = 5-2 = 3. \]
At this point too the two one-sided limits differ:
\[ 6\neq 3. \]
The limit as \(x\to 2\) does not exist.
The value of the function at the point is
\[ f(2)=7. \]
Continuity from the left would require
\[ \lim_{x\to 2^-}f(x)=f(2). \]
However
\[ 6\neq 7. \]
The function is therefore not continuous from the left at \(2\).
Continuity from the right would require instead
\[ \lim_{x\to 2^+}f(x)=f(2). \]
But
\[ 3\neq 7. \]
The function is not continuous from the right at \(2\) either.
The complete study thus shows that the function is continuous only from the right at the point \(0\), whereas at the point \(2\) it is continuous from neither side.