I got this wrong on my test, my instructor did the work on the board and used a different approach than I did, I want to know what I did wrong in my approach that caused me to get the problem wrong.

Differentiate: $\displaystyle y = x^{e^{2x}}$

-----

My (flawed) approach:

$\displaystyle log_{x}y = e^{2x}$

differentiates to: $\displaystyle \frac{1}{y*ln(x)}y\prime = 2e^{2x}$

$\displaystyle y\prime=2e^{2x}*x^{e^{2x}}*ln(x)$

-----

The correct answer is:

$\displaystyle y\prime=x^{e^{2x}}(2e^{2x}ln(x)+\frac{e^{2x}}{x})$ and I can get it the instructor's way, but not my way, but I don't understand why my way failed me.