Solution (source code)

= Solution

The base $2e$ is constant. Write the <exponential function> as $\exp[\cos x\ln(2e)]$ and apply the <chain rule>:
$$
\boxed{\frac d{dx}(2e)^{\cos x}
=-(1+\ln2)\sin x\,(2e)^{\cos x}.}
$$