Tangent and Normal Formulas
The formulas of tangent and normal to any curve at a given point are listed below.

$${\left. {\frac{{dy}}{{dx}}} \right_p}$$ is the slope of the tangent to the curve $$y = f\left( x \right)$$ at the point $$p$$

In a plane curve $$r = f\left( \theta \right)$$, \[\tan \phi = r\frac{{d\theta }}{{dr}}\]

The equation of the tangent at a point $$P\left({{x_1},{y_1}} \right)$$ is \[\left({y – {y_1}} \right) = {\left. {\frac{{dy}}{{dx}}} \right_p}\left( {x – {x_1}} \right)\]

The equation of the normal at a point $$P\left({{x_1},{y_1}} \right)$$ is \[\left({x – {x_1}} \right) = {\left. {\frac{{dy}}{{dx}}} \right_p}\left( {y – {y_1}} \right)\]

Consider that a curve $$c$$ is defined by $$y = f\left( x \right)$$, and $$p$$ is the length of the perpendicular from $$O\left( {0,0} \right)$$ to the tangent at the point $$\left({{x_1},{y_1}} \right)$$ of the curve. Then \[p = \frac{{\left {{y_1} – {x_1}\frac{{dy}}{{dx}}} \right}}{{\sqrt {1 – {{\left( {\frac{{dy}}{{dx}}} \right)}^2}} }}\]