Differentiate the function given below w.r.t. x:
x2sinx+cos2x
Let y=x2sinx+cos2x
Differentiating with respect to x, we get
dydx=ddx(x2sinx+cos2x)
⇒dydx=ddx(x2sinx)+ddxcos2x
⇒dydx=sinxddx(x2)+x2ddx(sinx)+ddxcos2x
⇒dydx=(2xsinx+x2cosx)−2sin2x
[∵dxndx=nxn−1 , d(cosθ)dx=−sinθ & d(sinθ)dx=cosθ]
⇒dydx=2xsinx+x2cosx−2sin2x