differentiate respect to (x) $\displaystyle 2^x$ In this case my friends do like this

$\displaystyle y=2^x$

$\displaystyle lny=xln2$

Then differentiate both side respect to x

In the second step how we take a variable in front of log,we only take a constant to the front of log.. please give me a solution