When we consider a limit as $h \rightarrow 0$ when finding the slope of the tangent to a function at a particular point, we sometimes find ourselves in a form where the function may lead to a division by $0$ error. However, since this is a limit, I'm unsure whether or not this actually does lead to this particular problem.
To illustrate the above problem, let's say that one wishes to find the slope of the tangent line at the point $(-1,-1)$ in the function $y=x^2 +2x$
We are told that $y=x^2 +2x$ and so we look for the slope at $(-1,-1)$.
We consider $f(-1+h)=(-1+h)^2+2(-1+h)=h^2 -1$ where $h \rightarrow 0$; so the closest point is $((-1+h),(h^2-1))$.
Finding the slope, we have $\frac{h^{2}-1-(-1)}{h-1-(-1)}=\frac{h^2}{h}=h$. When $h$ approches $0$, the slope is $0$.
I am wondering if when $h^2/h$ is simplified to $h$, this would preclude us from taking the limit as $h$ approaches zero, as the expression has been divided by $h$ at one point. To take the limit when $h$ approaches zero, we plug in zero for $h$- doesn't this constitute a zero division error? Thanks for any clarification.