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(x)=x2cosx+sinx
m1=dydx=2xcosx−x2sinx+cosx
at x=−π3:
m1=2(−π3)cos(−π3)−(−π3)2sin(−π3)+cos(−π3)
m1=2(−π3)(12)−(π29)(−√32)+12
m1=−π3+π2√318+12
m1=π2√3−6π+918
If m2=slope of the line normal to the curve we can say:
m1m2=−1 or m2=−1m1. So in this case:
m2=−18π2√3−6π+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=−π3:
y=(−π3)2cos(−π3)+sin(−π3)=(π29)(12)−√32=π218−√32=π2−9√318
y=mx+b
y=−18π2√3−6π+9x+b
Now we have to find the value of b by plugging in the coordinates of the tangent / normal point:
π2−9√318=−18π2√3−6π+9(−π3)+b
b=π2−9√318−6ππ2√3−6π+9=(π2−9√3)(π2√3−6π+9)−108π18(π2√3−6π+9)
b=π4√3−6π3+9π2−27π2+54√3π−81√3−108π18(π2√3−6π+9)
b=π4√3−6π3−18π2+(54√3−108)π−81√318(π2√3−6π+9)
The equation of normal line is:
y=−18π2√3−6π+9x+π4√3−6π3−18π2+(54√3−108)π−81√318(π2√3−6π+9)
(π2√3−6π+9)y=−18x+π4√3−6π3−18π2+(54√3−108)π−81√318