# What is the equation of the line tangent to f(x)=cosx-sinx at x=pi/3?

Oct 5, 2016

$y = \frac{- \sqrt{3} - 1}{2} x + \frac{1 - \sqrt{3}}{2} + \frac{\sqrt{3} + 1}{2} \left(\frac{\pi}{3}\right)$

#### Explanation:

First, find the point of tangency. We know the $x$ value we now have to find the $y$ value.

Substitube in the given value of $x$ to find $y$.

$f \left(\frac{\pi}{3}\right) = \cos \left(\frac{\pi}{3}\right) - \sin \left(\frac{\pi}{3}\right)$

Based on what you know about the unit circle and these tutorials, https://www.youtube.com/playlist?list=PLsX0tNIJwRTyXncFO4Z5bxme0mBe2wq0R.

$\cos \left(\frac{\pi}{3}\right) = \frac{1}{2}$
$\sin \left(\frac{\pi}{3}\right) = \frac{\sqrt{3}}{2}$

$f \left(\frac{\pi}{3}\right) = \frac{1}{2} - \frac{\sqrt{3}}{2} = \frac{1 - \sqrt{3}}{2}$

Point of Tangency $\left(\frac{\pi}{3} , \frac{1 - \sqrt{3}}{2}\right)$

Now we need to find the equation of the slope by applying the derivative to $f \left(x\right)$.

$f ' \left(x\right) = - \sin \left(x\right) - \cos \left(x\right)$

Let substitute in $\frac{\pi}{3}$ to get the numeric value of the slope

$f ' \left(x\right) = - \sin \left(\frac{\pi}{3}\right) - \cos \left(\frac{\pi}{3}\right)$

$f ' \left(x\right) = - \frac{\sqrt{3}}{2} - \frac{1}{2}$

$f ' \left(x\right) = \frac{- \sqrt{3} - 1}{2} = m$

Now we have to figure out the equation of tangent line by using the slope intercept formula, $y = m x + b$

$\frac{1 - \sqrt{3}}{2} = \frac{- \sqrt{3} - 1}{2} \left(\frac{\pi}{3}\right) + b$

Isolate the variable, $b$

$\frac{1 - \sqrt{3}}{2} + \frac{\sqrt{3} + 1}{2} \left(\frac{\pi}{3}\right) = b$

Equation of the tangent line, $\implies y = m x + b$

$y = \frac{- \sqrt{3} - 1}{2} x + \frac{1 - \sqrt{3}}{2} + \frac{\sqrt{3} + 1}{2} \left(\frac{\pi}{3}\right)$

The 2 images below are to show the point of tangency on the graph.

The first equation in blue is $f \left(x\right)$
The second equation in red is the tangent line.

The image below is the graph of all of this work.

Lastly, I have several tutorials on how to find the equation of the tangent line.