MATLAB: Find the value x

exphomeworklocal minimum

y = x ^ e – e ^ x is [0 5] when x^e=e^x

Best Answer

>> [x,fval]=fminbnd(@(x) abs(exp(x)-x^exp(1)),0,5)
x =
2.7183
fval =
4.4743e-11