let y=2x {take natural logs of both sides}
ln y = ln(2x) {use rules of logs to change right hand side}
lny = xln2 {differentiate implicitly}
1/y . dy/dx = ln2 {make dy/dx the subject}
dy/ dx = y ln2 {write y in terms of x)
dy/dx = 2x . ln2
Therefore derivative of 2 to the power of x is 2x . ln2
This can be generalised as the derivative of a to the power of x (where a is a constant, a>0) is ax lna