A **tangent line** to a function at a point is a line that is in contact with the graphical representation of the function only in that particular point.

The **tangent line** is only touching the function (graph) in the specified point. In other words the tangent line is barely in contact with function (graph).

The line which is crossing (intersecting) a function graph it’s called a **secant line**.

In the example above the red line is the tangent. It’s tangent to the *f(x)* function in the point *P(x _{1}, y_{1})*. The blue line is the secant and as you can see it’s crossing the function

*f(x)*in two points.

Given a function *f(x)* and a point *P _{1}(x_{1}, y_{1})*, how do we calculate the tangent? Finding the tangent means finding the equation of the line which is tangent to the function

*f(x)*in the point

*P*.

_{1}(x_{1}, y_{1})**Example**: Find the tangent of the function *f(x)* defined below, in the point *x _{1}*.

**Step 1**: Calculate the *(x, y)* coordinates of the tangent point

The first thing to do is to evaluate the function in the tangent point *x _{1}*.

We know that:

\[y_{1}=f(x_{1})\]This means that the result of the function evaluation in the point *x _{1}* is the

*y*coordinate. We now have defined the point

_{1}*P*. Let’s plot the function

_{1}(1, 1)*f(x)*for

*x = 0 … 2*and the point

*P*with

_{1}*x*and

_{1}*y*coordinates.

_{1}**Step 2**: Define two points *P _{0}* and

*P*, on the left and right of

_{2}*P*.

_{1}We’ll chose a point *P _{0}* at

*x*and

_{0}= 0.6*P*at

_{2}*x*. These point must be equally distributed on the left and right of the

_{2}= 1.4*P*tangent point.

_{1}**Step 3**. Calculate the *y* coordinates of the *P _{0}* and

*P*points

_{2}First let’s calculate the y coordinate of the *P _{0}* point.

y_{0}&=f(x_{0})\\

f(0.6)&=2-{0.6}^{3}=1.784\\

y_{0}&=1.784

\end{split} \end{equation*} \]

We now have defined the point *P _{0} (0.6, 1.784)*.

Now we calculate the y coordinate of the *P _{2}* point:

y_{2}&=f(x_{2})\\

f(1.4)&=2-{1.4}^{3}=-0.744\\

y_{2}&=-0.744

\end{split} \end{equation*} \]

We now have defined the point *P _{2} (1.4,-0.744)*.

Let’s now update our function graph with both *P _{0}* and

*P*points and their coordinates.

_{2}**Step 4**. Calculate the slopes of the lines defined between the points *P _{0}-P_{1}* and

*P*

_{1}-P_{2}Having two points defined we can easily draw a straight line between them. Also with the coordinates of the two points we can calculate the slope of the line.

In our case we’ll have two lines, one between point *P _{0}* and

*P*and the second between

_{1}*P*and

_{1}*P*. For both lines we can calculate their slope.

_{2}The usual notation of the slope of a line is the letter *m*.

For the first line, the slope *m _{0}* is calculated as:

m_{0}&=\frac{y_{1}-y_{0}}{x_{1}-x_{0}}=\frac{1-1.784}{1-0.6}=-1.96\\

m_{0}&=-1.96

\end{split} \end{equation*} \]

For the second line, the slope *m _{2}* is calculated as:

m_{2}&=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}=\frac{-0.744-1}{1.4-1}=-4.36\\

m_{2}&=-4.36

\end{split} \end{equation*} \]

Below is the graphical representation of the two lines and the *f(x)* function. Both lines are secant to our *f(x)* function.

**Step 5**. Calculate the slope of the line tangent in the point *P _{1} (1, 1)*

**The slope of the line tangent in the point P_{1} will be the arithmetic mean of the slopes of the two secant lines**. This method of calculation is possible because we have chosen the

*x*and

_{0}*x*points at equal distance from

_{2}*x*.

_{1}m_{1}&=\frac{m_{0}+m_{2}}{2}=\frac{-1.96-4.36}{2}=-3.16\\

m_{1}&=-3.16

\end{split} \end{equation*} \]

**Step 6 (final step)**. Calculate the equation of the tangent line in the point *P _{1}*.

Now that we know the coordinates of the tangent point P1 and the value of the slope, we can easily calculate the equation of the tangent line:

\[ \begin{equation*} \begin{split}y(x) &= y_{1} + m_1 \cdot (x – x_1)\\

y(x) & = 1 – 3.16 \cdot (x – 1)

\end{split} \end{equation*} \]

Having the tangent line equation we can plot on the same graph the function *f(x)* and the tangent line *y(x)*.

As you can see the tangent line is “touching” the function *f(x)* in the point *P _{1} (1, 1)*.

Using the same method we can calculate the tangent line in the point (1, 1) for the following functions:

\[f(x)=x^2 + 2 \cdot x + 1\] \[f(x)=10 \cdot \sqrt{2 \cdot x} + 3 \cdot x + 2\]Apply the same method to your function and let us now the result!

For any questions or observations regarding this tutorial please use the comment form below.

Don’t forget to Like, Share and Subscribe!

## Kerri

Thank you so much! Guys, if you are reading this without using the article, don’t X out of this. This is the way I wish my teacher taught!