# How do you differentiate  (2x+1)(x-tanx)?

Jun 15, 2016

$\frac{d}{\mathrm{dx}} \left(2 x + 1\right) \left(x - \tan x\right)$

= $4 x + 1 - 2 x {\sec}^{2} x - {\sec}^{2} x - 2 \tan x$

#### Explanation:

If $f \left(x\right) = g \left(x\right) \times h \left(x\right)$, $\frac{\mathrm{df}}{\mathrm{dx}} = g \left(x\right) \times \frac{\mathrm{dh}}{\mathrm{dx}} + \frac{\mathrm{dg}}{\mathrm{dx}} \times h \left(x\right)$

Hence $\frac{d}{\mathrm{dx}} \left(2 x + 1\right) \left(x - \tan x\right)$

= $\left(2 x + 1\right) \left(1 - {\sec}^{2} x\right) + 2 \left(x - \tan x\right)$

= $2 x + 1 - 2 x {\sec}^{2} x - {\sec}^{2} x + 2 x - 2 \tan x$

= $4 x + 1 - 2 x {\sec}^{2} x - {\sec}^{2} x - 2 \tan x$