∫xcos(nx)dx=1/n*∫xdsin(nx)

用分部积分法知:∫xdsin(nx)=xsin(nx)-∫sin(nx)dx=xsin(nx)+1/n*cos(nx)+C

所以:∫xcos(nx)dx=xsin(nx)/n+cos(nx)/n²+C (C为积分常数)