When you graph x^(1/x), the maximum point (gradient zero) should be e (2.71828...) for x. But it doesn't.

By replacing the log with in, I get the correct answer. When dy/dx = 0, x = e.

Can anyone explain the difference? And which one should I use the next time I use the chain rule to differentiate powers, In or Log?