若∫xf(x)dx=xsinx-∫sinxdx,则f(x)=( )。
sinx
cosx
解析:(xsinx-∫sinxddx)´=xf(x),所以xcosx=xf(x),f(x)=cosx,故应选B。