# What is the equation of the tangent line of f(x)=(xsinx)/e^x at x=pi/4?

Feb 19, 2017

$y = \frac{\sqrt{2}}{2} {e}^{- \frac{\pi}{4}} x$

#### Explanation:

You would apply the formula

$\left(y - {y}_{0}\right) = m \left(x - {x}_{0}\right)$

to find the equation of the line, then you need $m$ and ${y}_{0}$, since ${x}_{0} = \frac{\pi}{4}$;

$m$ is the derivative of the given function calculated at the given point ${x}_{0}$, then

$m = f ' \left(\frac{\pi}{4}\right)$

First, you would calculate $f ' \left(x\right)$ and the substitute $\frac{\pi}{4}$ in x:

$f ' \left(x\right) = \frac{\left(\sin x + x \cos x\right) {e}^{x} - x \sin x {e}^{x}}{e} ^ \left(2 x\right) = \frac{{\cancel{e}}^{x} \left(\sin x + x \cos x - x \sin x\right)}{e} ^ \left(\cancel{2} x\right) = \frac{\sin x + x \cos x - x \sin x}{e} ^ x$

Then

$m = f ' \left(\frac{\pi}{4}\right) = \frac{\sin \left(\frac{\pi}{4}\right) + \frac{\pi}{4} \cos \left(\frac{\pi}{4}\right) - \frac{\pi}{4} \sin \left(\frac{\pi}{4}\right)}{e} ^ \left(\frac{\pi}{4}\right)$

$m = \frac{\frac{\sqrt{2}}{2} + \cancel{\frac{\pi}{4} \frac{\sqrt{2}}{2}} \cancel{- \frac{\pi}{4} \frac{\sqrt{2}}{2}}}{e} ^ \left(\frac{\pi}{4}\right) = \frac{\sqrt{2}}{2} {e}^{- \frac{\pi}{4}}$

On the other hand:

${y}_{0} = f \left({x}_{0}\right) = \frac{\left(\frac{\pi}{4}\right) \sin \left(\frac{\pi}{4}\right)}{e} ^ \left(\frac{\pi}{4}\right) = \frac{\pi}{4} \frac{\sqrt{2}}{2} {e}^{- \frac{\pi}{4}} = \frac{\sqrt{2} \pi {e}^{- \frac{\pi}{4}}}{8}$

Therefore the equation of the line is:

$y - \frac{\sqrt{2} \pi {e}^{- \frac{\pi}{4}}}{8} = \frac{\sqrt{2}}{2} {e}^{- \frac{\pi}{4}} \left(x - \frac{\pi}{4}\right)$

that's

y=cancel((sqrt2pie^(-pi/4))/8)+sqrt2/2e^(-pi/4)xcancel(-(sqrt2pie^(-pi/4))/8))

$y = \frac{\sqrt{2}}{2} {e}^{- \frac{\pi}{4}} x$