# Why is this function not differentiable at 1 and -1?

I'm solving a small calculus problem, which ask me to compute the following limits:

$$\lim_{x\,\to\,-1^-} \frac{f(x) - f(-1)}{x+1}$$

and

$$\lim_{x\,\to\,1^+}\frac{f(x) - f(1)}{x-1}.$$

Given that

$$f(x) = x + \sqrt{x^2 - 1},$$

I get $\infty$ as the result to both limits.

At first look this sounds normal, except after that, in the practicing problem, it says to differentiate the function $f$ on $[-\infty, -1] \cup [1, +\infty]$ which is weird because $f$ is not differentiable at $1$ and $-1$ (from the previously computed limits), so I thought that my limits were wrong, but I couldn't find the mistake.

• When the domain is restricted, usually endpoint derivatives are defined as being the appropriate one-sided derivatives, but check your text about this. – coffeemath Oct 7 '16 at 18:46
• @coffeemath Given that the text is not in english (arabic) , I'd love if you could explain more this comment please :) . – Anis Souames Oct 7 '16 at 18:49
• The function is not differentiable at $x=\pm 1$. It's not the one-sided limits that's the problem, but that its tangent is vertical at those points, so it doesn't have a finite slope. – Henning Makholm Oct 7 '16 at 18:53
• You should get $-\infty$ for the first limit, $\infty$ for the second limit. – zhw. Oct 7 '16 at 19:44

Generally we can only compute derivatives on open sets. In this case, if we define the derivative of $f$ on a closed interval $F$ to be it's derivative on the interior of $F$, then there's no problem with the exercise. If, on the other hand, we define the derivative of $f$ on $\pm1$ to be the limit of $f'(x)$ as $x$ approaches $\pm1^{\pm}$, then we can say $f$ is not differentiable on the given set, because none of the above limits exist.
You are correct in computing the given limits: for instance $$\lim_{x\to 1^+}\frac{f(x)-f(1)}{x-1}= \lim_{x\to1^+}\frac{x-1+\sqrt{x^2-1}}{x-1}= \lim_{x\to1^+}\left(1+\sqrt{\frac{x+1}{x-1}}\,\right)=\infty$$ and the other one is similar.
One can define the derivative at $a$ of a function defined on an interval like $[a,b)$ (where $b$ can be $\infty$) as $$\lim_{x\to a^+}\frac{f(x)-f(a)}{x-a}$$ if this limit exists and is finite. In your case the function is not differentiable at $1$ in this sense (unless your textbook allows infinite derivatives, which however is rarely done). It is not really surprising, because the graph of this function is a piece of a hyperbola; if we consider the points of coordinates $(x,y)$ such that $y=x+\sqrt{x^2-1}$, we get $$(y-x)^2=x^2-1$$ that is, $$y^2-2xy+1=0$$
The graph of your function is the part with $y\ge1$ for $x\ge1$ and the part with $-1\le y<0$ for $x\le-1$. As you clearly see, the tangents at $(1,1)$ and $(-1,-1)$ are vertical, which complies with the limits you found.