# Tangent Lines of Functions

Does the function f(x) l x2-1 l have a tangent line at x=1? What is the tangent line if it does?
Attempt: l x2-1 l
(x2-1) When x ≥ 1
-(x2-1) When x < 1
Lim x→1+ (x2-1) = 0
Lim x→1- -(x2-1) = 0
Therefore, it does have a limit because the right and left hand limit are equal and the slope of the tangent line is 0. Is this right? My book tells me that the same type of question but with equation f(x)=√lxl at x=0 does not have a tangent line, same with the equation f(x)=lxl at x=0. It tells me neither of those equations have a tangent line at their given points.

HallsofIvy
Homework Helper
Does the function f(x) l x2-1 l have a tangent line at x=1? What is the tangent line if it does?
Attempt: l x2-1 l
(x2-1) When x ≥ 1
-(x2-1) When x < 1
Lim x→1+ (x2-1) = 0
Lim x→1- -(x2-1) = 0
Therefore, it does have a limit because the right and left hand limit are equal and the slope of the tangent line is 0.
The limit of the function at x= 1 is the same from both sides and is the same as the value of the function- that tells you that the function is continuous at x= 1 (in fact, for all x). It does not tell you anything about tangents.

To learn about the tangents you can do either of two things:
1) Use the definition of the derivative to see if the derivative exists at x= 1.
$\lim_{h\to 0} (f(1+h)- f(1))/h$
For h>0, 1+h> 1 so (f(1+h)- f(1))/h= ((1+h)2- 1)/h= (1+ 2h+ h2- 1)/h= (2h+ h2)/h= 2+ h and that goes to 2 as h goes to 0.
For h< 0, 1+h< 1 so (f(1+h)- f(1))/h= (-(1+h)2+ 1)/h= (-1- 2h- h2+ 1)/h= (-2h- h2)/h= -2- h and that goes to -2 as h goes to 0.

2) Find the derivatives on either sides of x= 1 and look at the limits of those.
If x> 1, f(x)= x2- 1 so that f'(x)= 2x which goes to 2 as x goes to 1.
If x< 1, f(x)= -x2+ 1 so that f'(x)= -2x which goes to -2 as x goes to 1.

Is this right? My book tells me that the same type of question but with equation f(x)=√lxl at x=0 does not have a tangent line, same with the equation f(x)=lxl at x=0. It tells me neither of those equations have a tangent line at their given points.
Again your mistake was looking at the limits of the values of the function, rather than looking at the derivatives.

Thank you very much! I actually had this written down on a separate piece of scrap paper but missed a - sign when dealing with the absolute value and couldn't get a sensible answer after that. I really appreciate your help!

Sorry to barge in, but may I ask a related question here that's bugging me?

If a function $f(x)$ is not continuous at $x=a$ (say) but $f'(x)$ has equal left and right limits at $x=a$, is it still valid to say that it has a tangent at $x=a$?

A very simple example of this sort of function would be
$$f(x) = \begin{cases} 0 & \text{if } x < a \\ 1 & \text{if } x \geq a \end{cases}$$

HallsofIvy
Homework Helper
No, it is not. If there were a tangent line at x= 0, its slope would, pretty much be definition, be the derivative there. If we were trying to find the derivative at x= a, we would have to find the limit
$$\lim_{h\to 0}\frac{f(a+h)- f(a)}{h}$$
and if f is not continuous at a, that numerator does not go to 0 as h goes to 0.

Specifically, for your example, for that limit to exist, the limit from below would have to exist. And that would be
$$\lim_{h\to 0^-}\frac{0- 1}{h}= \lim_{h\to 0}\frac{-1}{h}$$
which does not exist. (Recall that f(x)= 0 for any x< 0 but f(0)= 1.)

No, it is not. If there were a tangent line at x= 0, its slope would, pretty much be definition, be the derivative there. If we were trying to find the derivative at x= a, we would have to find the limit
$$\lim_{h\to 0}\frac{f(a+h)- f(a)}{h}$$
and if f is not continuous at a, that numerator does not go to 0 as h goes to 0.

Specifically, for your example, for that limit to exist, the limit from below would have to exist. And that would be
$$\lim_{h\to 0^-}\frac{0- 1}{h}= \lim_{h\to 0}\frac{-1}{h}$$
which does not exist. (Recall that f(x)= 0 for any x< 0 but f(0)= 1.)
I'm not sure why you've brought x=0 into the discussion, but I appreciate the explanation.

I understand the definition of a derivative, but can't quite get my head around why if the "left" derivative limit is the same as the "right" derivative limit, why can't you say that the function has a tangent at that point? Semantics, I suppose.

HallsofIvy