# How do i differentiate xe^(xy)cos(2x) with respect to x??

Feb 5, 2015

This is actually a multiplication rule within a multiplication rule.

I'm going to evaluate it as:

$\left(x {e}^{x} y\right) \left(\cos \left(2 x\right)\right)$

Remember the rule for multiplication:

first(derivative of the 2nd) + second(derivative of the first)

You also need to remember that you must take the derivative of the "inside" of the cos.

$\left(x {e}^{x} y\right) \left(- 2 \sin \left(2 x\right)\right) + \left(\cos \left(2 x\right)\right) \left(x \left({e}^{x y} y\right) + {e}^{x y}\right)$

$- 2 x {e}^{x y} \sin \left(2 x\right) + x y {e}^{x y} \cos \left(2 x\right) + {e}^{x y} \cos \left(2 x\right)$

We can factor out ${e}^{x y}$

${e}^{x y} \left(- 2 x \sin \left(2 x\right) + x y \cos \left(2 x\right) + \cos \left(2 x\right)\right)$