# Khan Academy calculus problem solution differentiation at a point: algebraic, incorrect.

I am practicing calculus on Khan Academy but appear to be having trouble with Differentiability at a point: algebraic. I'll provide an example problem outlining my approach to a solution and how it compares to the solution on Khan Academy.

Is the function given below continuous/differentiable at, $x = 3$? $$f(x) = \begin{cases} x^2, & x \le 3\\ 6x - 9 & x \geq 3\\ \end{cases}.$$

Finding the limit from both sides show that the function is continuous. $$\lim \limits_{x \to 3^-} f(x) = 9, \quad \lim \limits_{x \to 3^+} f(x) = 9.$$

To see if they are differentiable at $x = 3$ I use the following equation provided to me.

$$\lim \limits_{x \to 3} f(x) = \frac{f(x)-f(3)}{x-3} = \frac{f(x)-9}{x-3}.$$

$$\lim \limits_{x \to 3^-} = \frac{x^2-9}{x-3} = \frac{(x+3)(x-3)}{x-3} = x+3$$

$$\lim \limits_{x \to 3^+} = \frac{6x-9-9}{x-3} = \frac{6x-18}{x-3} = \frac{6(x-3)}{x-3} = 6$$

Now you would think that the function $f(x)$ is continuous and not differentiable but the actual answer is, in fact, both continuous and differentiable. My results for calculating the differentiation are incorrect based on their answers. Mind you they don't show how they reached that answer.

$$\lim \limits_{x \to 3^-} = \frac{x^2-9}{x-3} = 6$$

$$\lim \limits_{x \to 3^+} = \frac{6x-9-9}{x-3} = 6$$

I've looked at this problem from different angles and I am perplexed by how they reached that answer. Where did I happen to go wrong?

TL;DR I got a math problem wrong on Khan Academy. I want to know where I went wrong.

• I want to know where I went wrong You seem to be assuming that $\,x+3 \ne 6\,$ when $\,x \to 3^-\,$. Note that your limit for $\,x \to 3^-\,$ is wrong as written. It cannot be $\,x+3\,$, since it cannot depend on $\,x\,$. – dxiv Mar 1 '18 at 4:58

You should write

\begin{equation*} \lim_{x\rightarrow3^{-}}\frac{x^2-9}{x-3}=\lim_{x\rightarrow3^{-}}\frac{(x+3)(x-3)}{x-3}=\lim_{x\rightarrow3^{-}}x+3=3+3=6 \end{equation*}

(don't simply write "$\text{lim}$" at the start of the line). This will help you avoid getting $x+3$ at the end of your limit (your variable should not be there after you impose $x\rightarrow 3$).

In fact, we never write:

\begin{equation*} \lim_{x\rightarrow a}=\text{something} \end{equation*}

It's always the limit of a function, as $x$ approaches some value $a$ that makes sense symbolically. Hence you always get:

\begin{equation*} \lim_{x\rightarrow a}f(x)=\text{a real number or}\pm\infty \end{equation*}

(if the limit exists).

• Thank you. Your explanation helped me understand why I was having trouble with this type of problem. I'll look out for that in the future. – Zakar H. Mar 1 '18 at 5:10

Note that we have

$$\lim \limits_{x \to 3^-} \frac{x^2-9}{x-3} = \lim \limits_{x \to 3^-}\frac{(x+3)(x-3)}{x-3} = \lim \limits_{x \to 3^-} x+3 =6$$

Your solutions seem to directly indicate that the function is differentiable!

The derivative approaches $x+3$ from the left and $6$ from the right.

$x+3$ approaches $6$ as $x$ approaches $3$ from the left.

Because the derivative approaches $6$ from both sides, the function is differentiable at that point (given that you proved it is continuous already)