# How to find the slope when points are given

How do you solve something like this? This might be easy but i have no idea how to do this :/ Any help would be appreciated :)

Find the slope of the function $f(x)$ at $(1,0)$. Then write an equation of the tangent line at the point $(1,0)$. $$f(x) = \begin{cases} x^2 - 1 & x \geq 1 \\ 2x + 1 & x < 1 \end{cases}$$

The slope $m$ of the function at some given point is actually give nby the formula:
$$m =\lim_{x \to x_0} \frac{f(x) - f(x_0)}{x-x_0}$$
$$\lim_{x \to 1^{+}} \frac{f(x) - f(1)}{x-1} = \lim_{x \to 1^{+}} \frac{x^2 - 1 - 1^2 + 1}{x-1} = \lim_{x \to 1^{+}} \frac{(x-1)(x+1)}{x-1} = \lim_{x \to 1^{+}} x + 1 = 2$$
$$\lim_{x \to 1^{-}} \frac{f(x) - f(1)}{x-1} = \lim_{x \to 1^{+}} \frac{2x + 1 - 1^2 + 1}{x-1} = \lim_{x \to 1^{+}} \frac{2x+1}{x-1} = \infty$$
As the one-sided limit doesn't coincide we have that the function doesn't have a tangent line at $(1,0)$. In fact when you graph the function you'll see that it's discontinuous at $x=1$.