# What is the equation of the line that is normal to f(x)=x^2cosx+sinx  at  x=-pi/3?

Nov 19, 2017

$\left({\pi}^{2} \sqrt{3} - 6 \pi + 9\right) y = - 18 x + \frac{{\pi}^{4} \sqrt{3} - 6 {\pi}^{3} - 18 {\pi}^{2} + \left(54 \sqrt{3} - 108\right) \pi - 81 \sqrt{3}}{18}$

#### Explanation:

You need to take the derivative of your function and evaluate it at the given point to find the slope of the tangent line to it at that point:

$y = f \left(x\right) = {x}^{2} \cos x + \sin x$

${m}_{1} = \frac{\mathrm{dy}}{\mathrm{dx}} = 2 x \cos x - {x}^{2} \sin x + \cos x$

at $x = - \frac{\pi}{3}$:

${m}_{1} = 2 \left(- \frac{\pi}{3}\right) \cos \left(- \frac{\pi}{3}\right) - {\left(- \frac{\pi}{3}\right)}^{2} \sin \left(- \frac{\pi}{3}\right) + \cos \left(- \frac{\pi}{3}\right)$

${m}_{1} = 2 \left(- \frac{\pi}{3}\right) \left(\frac{1}{2}\right) - \left({\pi}^{2} / 9\right) \left(- \frac{\sqrt{3}}{2}\right) + \frac{1}{2}$

${m}_{1} = - \frac{\pi}{3} + \frac{{\pi}^{2} \sqrt{3}}{18} + \frac{1}{2}$

${m}_{1} = \frac{{\pi}^{2} \sqrt{3} - 6 \pi + 9}{18}$

If ${m}_{2}$=slope of the line normal to the curve we can say:

${m}_{1} {m}_{2} = - 1$ or ${m}_{2} = - \frac{1}{m} _ 1$. So in this case:

${m}_{2} = - \frac{18}{{\pi}^{2} \sqrt{3} - 6 \pi + 9}$

Now we can write the equation of the normal line to the curve using the standard equation of a straight line with the above slope. Let's first figure out the $y$ -coordinate of the point at $x = - \frac{\pi}{3}$:

$y = {\left(- \frac{\pi}{3}\right)}^{2} \cos \left(- \frac{\pi}{3}\right) + \sin \left(- \frac{\pi}{3}\right) = \left({\pi}^{2} / 9\right) \left(\frac{1}{2}\right) - \frac{\sqrt{3}}{2} = {\pi}^{2} / 18 - \frac{\sqrt{3}}{2} = \frac{{\pi}^{2} - 9 \sqrt{3}}{18}$

$y = m x + b$

$y = - \frac{18}{{\pi}^{2} \sqrt{3} - 6 \pi + 9} x + b$

Now we have to find the value of $b$ by plugging in the coordinates of the tangent / normal point:

$\frac{{\pi}^{2} - 9 \sqrt{3}}{18} = - \frac{18}{{\pi}^{2} \sqrt{3} - 6 \pi + 9} \left(- \frac{\pi}{3}\right) + b$

b=(pi^2-9sqrt3)/18-(6pi)/(pi^2sqrt3-6pi+9)=((pi^2-9sqrt3)(pi^2sqrt3-6pi+9)-108pi)/(18(pi^2sqrt3-6pi+9)

b=(pi^4sqrt3-6pi^3+9pi^2-27pi^2+54sqrt3pi-81sqrt3-108pi)/(18(pi^2sqrt3-6pi+9)

b=(pi^4sqrt3-6pi^3-18pi^2+(54sqrt3-108)pi-81sqrt3)/(18(pi^2sqrt3-6pi+9)

The equation of normal line is:

y=-18/(pi^2sqrt3-6pi+9)x+(pi^4sqrt3-6pi^3-18pi^2+(54sqrt3-108)pi-81sqrt3)/(18(pi^2sqrt3-6pi+9)

$\left({\pi}^{2} \sqrt{3} - 6 \pi + 9\right) y = - 18 x + \frac{{\pi}^{4} \sqrt{3} - 6 {\pi}^{3} - 18 {\pi}^{2} + \left(54 \sqrt{3} - 108\right) \pi - 81 \sqrt{3}}{18}$