Composite exponential function differentiation

Differentiate functions that have the variable both in the base and in the exponent. For example, differentiate xˣ.

Problem

Let g, left parenthesis, x, right parenthesis, equals, x, start superscript, start superscript, cosine, left parenthesis, x, right parenthesis, end superscript, end superscript.
Find g, prime, left parenthesis, x, right parenthesis.
Please choose from one of the following options.