# How to plot correctly these two simple exponential functions?

Im trying to plot this function $f=x^{1/x}$ with this code:

x = var('x')

f = x^(1/x)

show(f)

plot(f,x,-5,5)

but SAGE says that 'negative number cannot be raised to a fractional power'??? This make no sense to me, SAGE cant do this easy task? Really??

Because I dont believe it at all I tried to check the same with the function $g=2^{1/x}$

This time dont shows any error but the plot was completely wrong. If some one can help me I will appreciate it a lot. Yes, I tried to find the solution on the documentation but I dont encountered anything so helpful. Thank you in advance.

What is your mathematical definition of x^(1/X) ?