← Back to learning objective

One-sided limits and existence of the two-sided limit at x = 0

Consider the piecewise function f(x)={cos⁡(x)x<01−x2x≥0f(x) = \begin{cases} \cos(x) & x < 0 \\ 1 - x^2 & x \ge 0 \end{cases}

Using the definition of f(x)f(x) above, find lim⁡x→0−f(x)\lim_{x \to 0^-} f(x) and lim⁡x→0+f(x)\lim_{x \to 0^+} f(x). Based on these two values, does lim⁡x→0f(x)\lim_{x \to 0} f(x) exist? If it exists, state its value; if not, explain why not.

Hint

For the left-hand limit, plug values of xx close to 0 but negative into cos⁡(x)\cos(x). For the right-hand limit, plug values close to 0 but positive into 1−x21-x^2. Compare the two results to decide whether the two-sided limit exists.

Step-by-step solution

For x<0x < 0, f(x)=cos⁡(x)f(x) = \cos(x), and as x→0−x \to 0^-, cos⁡(x)→cos⁡(0)=1\cos(x) \to \cos(0) = 1. So lim⁡x→0−f(x)=1\lim_{x \to 0^-} f(x) = 1. For x≥0x \ge 0, f(x)=1−x2f(x) = 1 - x^2, and as x→0+x \to 0^+, 1−x2→1−0=11 - x^2 \to 1 - 0 = 1. So lim⁡x→0+f(x)=1\lim_{x \to 0^+} f(x) = 1.

Since the left-hand limit equals the right-hand limit, both equal to 11, the two-sided limit exists and lim⁡x→0f(x)=1\lim_{x \to 0} f(x) = 1. Note this matches f(0)=1f(0) = 1, though this equality is not required for the limit to exist.

Related problems

Practice similar Calculus problems interactively.

Start Closing the Gap