Let the given function be,
f( x )=( x 2 +1 )cosx
Differentiate the function with respect to x,
f ′ ( x )=( x 2 +1 ) d dx cosx+cosx d dx ( x 2 +1 ) =( x 2 +1 )( −sinx )+cosx[ d dx x 2 + d dx 1 ] =( x 2 +1 )( −sinx )+cosx( 2x+0 ) =− x 2 sinx−sinx+2xcosx
Therefore, the derivative of the given function is − x 2 sinx−sinx+2xcosx.