Answer
$f'(x)=-x\sin x+\cos x+2\sec^{2}x$
Work Step by Step
$f(x)=x\cos x+2\tan x$
Differentiate each term:
$f'(x)=(x\cos x)'+(2\tan x)'=...$
Use the product rule to differentiate $x\cos x$
$...=(x)(\cos x)'+(\cos x)(x)'+2\sec^{2}x=...$
$...=-x\sin x+\cos x+2\sec^{2}x$