## Tangent line to a curve

A tangent, a chord, and a secant to a circle
The intuitive notion that a tangent line "touches" a curve can be made more explicit by considering the sequence of straight lines (secant lines) passing through two points, A and B, those that lie on the function curve. The tangent at A is the limit when point B approximates or tends to A. The existence and uniqueness of the tangent line depends on a certain type of mathematical smoothness, known as "differentiability." For example, if two circular arcs meet at a sharp point (a vertex) then there is no uniquely defined tangent at the vertex because the limit of the progression of secant lines depends on the direction in which "point B" approaches the vertex.
At most points, the tangent touches the curve without crossing it (though it may, when continued, cross the curve at other places away from the point of tangent). A point where the tangent (at this point) crosses the curve is called an inflection point. Circles, parabolas, hyperbolas and ellipses do not have any inflection point, but more complicated curve do have, like the graph of a cubic function, which has exactly one inflection point.
Conversely, it may happen that the curve lies entirely on one side of a straight line passing through a point on it, and yet this straight line is not a tangent line. This is the case, for example, for a line passing through the vertex of a triangle and not intersecting the triangle—where the tangent line does not exist for the reasons explained above. In convex geometry, such lines are called supporting lines.

### Analytical approach

The geometrical idea of the tangent line as the limit of secant lines serves as the motivation for analytical methods that are used to find tangent lines explicitly. The question of finding the tangent line to a graph, or the tangent line problem, was one of the central questions leading to the development of calculus in the 17th century. In the second book of his Geometry, René Descartes of the problem of constructing the tangent to a curve, "And I dare say that this is not only the most useful and most general problem in geometry that I know, but even that I have ever desired to know".

#### Intuitive description

Suppose that a curve is given as the graph of a function, y = f(x). To find the tangent line at the point p = (a, f(a)), consider another nearby point q = (a + h, f(a + h)) on the curve. The slope of the secant line passing through p and q is equal to the difference quotient
$\frac{f(a+h)-f(a)}{h}.$
As the point q approaches p, which corresponds to making h smaller and smaller, the difference quotient should approach a certain limiting value k, which is the slope of the tangent line at the point p. If k is known, the equation of the tangent line can be found in the point-slope form:

$y-f(a) = k(x-a).\,$

### Equations

When the curve is given by y = f(x) then the slope of the tangent is $\frac{dy}{dx},$ so by the point–slope formula the equation of the tangent line at (XY) is
$y-Y=\frac{dy}{dx}(X) \cdot (x-X)$
where (xy) are the coordinates of any point on the tangent line, and where the derivative is evaluated at $x=X$.
When the curve is given by y = f(x), the tangent line's equation can also be found by using polynomial division to divide $f \, (x)$ by $(x-X)^2$; if the remainder is denoted by $g(x)$, then the equation of the tangent line is given by
$y=g(x).$
When the equation of the curve is given in the form f(xy) = 0 then the value of the slope can be found by implicit differentiation, giving
$\frac{dy}{dx}=-\frac{\frac{\partial f}{\partial x}}{\frac{\partial f}{\partial y}}.$
The equation of the tangent line at a point (X,Y) such that f(X,Y) = 0 is then
$\frac{\partial f}{\partial x}(X,Y) \cdot (x-X)+\frac{\partial f}{\partial y}(X,Y) \cdot (y-Y)=0.$
This equation remains true if $\frac{\partial f}{\partial y}(X,Y) = 0$ but $\frac{\partial f}{\partial x}(X,Y) \neq 0$ (in this case the slope of the tangent is infinite). If $\frac{\partial f}{\partial y}(X,Y) = \frac{\partial f}{\partial x}(X,Y) =0,$ the tangent line is not defined and the point (X,Y) is said singular.

For algebraic curves, computations may be simplified somewhat by converting to homogeneous coordinates. Specifically, let the homogeneous equation of the curve be g(xyz) = 0 where g is a homogeneous function of degree n. Then, if (XYZ) lies on the curve, Euler's theorem implies
$\frac{\partial g}{\partial x} \cdot X +\frac{\partial g}{\partial y} \cdot Y+\frac{\partial g}{\partial z} \cdot Z=ng(X, Y, Z)=0.$
It follows that the homogeneous equation of the tangent line is
$\frac{\partial g}{\partial x}(X,Y,Z) \cdot x+\frac{\partial g}{\partial y}(X,Y,Z) \cdot y+\frac{\partial g}{\partial z}(X,Y,Z) \cdot z=0.$
The equation of the tangent line in Cartesian coordinates can be found by setting z=1 in this equation.
To apply this to algebraic curves, write f(xy) as
$f=u_n+u_{n-1}+\dots+u_1+u_0\,$
where each ur is the sum of all terms of degree r. The homogeneous equation of the curve is then
$g=u_n+u_{n-1}z+\dots+u_1 z^{n-1}+u_0 z^n=0.\,$
Applying the equation above and setting z=1 produces
$\frac{\partial f}{\partial x}(X,Y) \cdot x + \frac{\partial f}{\partial y}(X,Y) \cdot y + \frac{\partial g}{\partial z}(X,Y,1) =0$
as the equation of the tangent line. The equation in this form is often simpler to use in practice since no further simplification is needed after it is applied.
If the curve is given parametrically by
$x=x(t),\quad y=y(t)$
then the slope of the tangent is
$\frac{dy}{dx}=\frac{\frac{dy}{dt}}{\frac{dx}{dt}}$
giving the equation for the tangent line at $\, t=T, \, X=x(T), \, Y=y(T)$ as
$\frac{dx}{dt}(T) \cdot (y-Y)=\frac{dy}{dt}(T) \cdot (x-X).$
If $\frac{dx}{dt}(T)= \frac{dy}{dt}(T) =0,$, the tangent line is not defined. However, it may occur that the tangent line exists and may be computed from an implicit equation of the curve.

### Normal line to a curve

The line perpendicular to the tangent line to a curve at the point of tangency is called the normal line to the curve at that point. The slopes of perpendicular lines have product −1, so if the equation of the curve is y = f(x) then slope of the normal line is
$-\frac{1}{\frac{dy}{dx}}$
and it follows that the equation of the normal line at (X, Y) is
$(X-x)+\frac{dy}{dx}(Y-y)=0.$
Similarly, if the equation of the curve has the form f(xy) = 0 then the equation of the normal line is given b
$\frac{\partial f}{\partial y}(X-x)-\frac{\partial f}{\partial x}(Y-y)=0.$
If the curve is given parametrically by
$x=x(t),\quad y=y(t)$
then the equation of the normal line is
$\frac{dx}{dt}(X-x)+\frac{dy}{dt}(Y-y)=0.$

To  join Ajit Mishra's Online Classroom