### 3 The tangent line to a curve

Let the equation of the tangent line to the curve $y=f\left(x\right)$ at the point $\left({x}_{0},{y}_{0}\right)$ be:

$\phantom{\rule{2em}{0ex}}y=mx+c$

where $m$ and $c$ are constants to be found. The line just touches the curve $y=f\left(x\right)$ at the point $\left({x}_{0},{y}_{0}\right)$ so, at this point both must have the same value for the derivative. That is:

$\phantom{\rule{2em}{0ex}}m=\frac{df}{dx}{\left|\right}_{{x}_{0}}$

Since we know (in any particular case) $f\left(x\right)$ and the value ${x}_{0}$ we can readily calculate the value for $m$ . The value of $c$ is found by using the fact that the tangent line and the curve pass through the same point $\left({x}_{0},{y}_{0}\right)$ .

$\phantom{\rule{2em}{0ex}}{y}_{0}=m{x}_{0}+c\phantom{\rule{2em}{0ex}}\text{and}\phantom{\rule{2em}{0ex}}{y}_{0}=f\left({x}_{0}\right)$

Thus

##### Key Point 2

The equation of the tangent line to the curve $y=f\left(x\right)$ at the point $\left({x}_{0},{y}_{0}\right)$ is

$\phantom{\rule{2em}{0ex}}y=mx+c\phantom{\rule{1em}{0ex}}\text{where}\phantom{\rule{1em}{0ex}}m=\frac{df}{dx}{\left|\right}_{{x}_{0}}\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}c=f\left({x}_{0}\right)-m{x}_{0}$

Alternatively, the equation is $y-{y}_{0}=m\left(x-{x}_{0}\right)\phantom{\rule{1em}{0ex}}\text{where}\phantom{\rule{1em}{0ex}}m=\frac{df}{dx}{\left|\right}_{{x}_{0}}$ and ${y}_{0}=f\left({x}_{0}\right)$

##### Example 1

Find the equation of the tangent line to the curve $y={x}^{2}$ at the point (1,1).

##### Solution

Method 1

Here $f\left(x\right)={x}^{2}$ and ${x}_{0}=1$  thus  $\frac{df}{dx}=2x\phantom{\rule{1em}{0ex}}\therefore \phantom{\rule{1em}{0ex}}m=\frac{df}{dx}{\left|\right}_{{x}_{0}}=2$

Also $c=f\left({x}_{0}\right)-m{x}_{0}=f\left(1\right)-m=1-2=-1$ . The tangent line has equation $y=2x-1.$

Method 2

$\phantom{\rule{2em}{0ex}}{y}_{0}=f\left({x}_{0}\right)=f\left(1\right)={1}^{2}=1$

The tangent line has equation $\phantom{\rule{2em}{0ex}}y-1=2\left(x-1\right)\phantom{\rule{2em}{0ex}}\to \phantom{\rule{2em}{0ex}}y=2x-1$

Find the equation of the tangent line to the curve $y={\text{e}}^{x}$ at the point $x=0$ . The curve and the line are displayed in the following figure:

First specify ${x}_{0}$ and $f$ :

${x}_{0}=0\phantom{\rule{2em}{0ex}}f\left(x\right)={\text{e}}^{x}$

Now obtain the values of $\frac{df}{dx}{\left|\right}_{{x}_{0}}$  and  $\phantom{\rule{1em}{0ex}}f\left({x}_{0}\right)-m{x}_{0}$ :

$\frac{df}{dx}={\text{e}}^{x}\phantom{\rule{2em}{0ex}}\therefore \phantom{\rule{2em}{0ex}}\frac{df}{dx}{\left|\right}_{0}=1$ and $f\left(0\right)-1\left(0\right)={\text{e}}^{0}-0=1$

Now obtain the equation of the tangent line:

$y=x+1$

Find the equation of the tangent line to the curve $y=sin3x$ at the point $x=\frac{\pi }{4}$ and find where the tangent line intersects the $x$ -axis. See the following figure:

First specify ${x}_{0}$ and $f$ :

${x}_{0}=\frac{\pi }{4}\phantom{\rule{2em}{0ex}}f\left(x\right)=sin3x$

Now obtain the values of $\frac{df}{dx}{\left|\right}_{{x}_{0}}$  and $\phantom{\rule{1em}{0ex}}f\left({x}_{0}\right)-m{x}_{0}$ correct to 2 d.p.:

$\frac{df}{dx}=3cos3x\phantom{\rule{2em}{0ex}}\therefore \phantom{\rule{2em}{0ex}}\frac{df}{dx}{\left|\right}_{\frac{\pi }{4}}=3cos\frac{3\pi }{4}=-\frac{3}{\sqrt{2}}=-2.12$

and $f\left(\frac{\pi }{4}\right)-\frac{m\pi }{4}=sin\frac{3\pi }{4}-\left(\frac{-3}{\sqrt{2}}\right)\frac{\pi }{4}=\frac{1}{\sqrt{2}}+\frac{3}{\sqrt{2}}\frac{\pi }{4}=2.37$   to 2 d.p.

Now obtain the equation of the tangent line:

$y=\frac{-3}{\sqrt{2}}x+\frac{1}{4\sqrt{2}}\left(4+3\pi \right)$ so $y=-2.12x+2.37$ (to 2 d.p.)

Where does the line intersect the $x$ -axis?

When $y=0\phantom{\rule{1em}{0ex}}\therefore \phantom{\rule{1em}{0ex}}-2.12x+2.37=0\phantom{\rule{1em}{0ex}}\therefore \phantom{\rule{1em}{0ex}}x=1.12$   to 2 d.p.