MATLAB: I got complex answer while I know it should be real???

complex answer

Hi
I have a function to be solved. while I know it has a real answer I got complex answer, I check with 2 of my friends, one got real answer and the other one get the complex one as mine. what should I do? by the way,I want to solve it symbolic, This is the function and answer:
commands:
syms('x')
F=0.21*(exp(-0.157-0.157*x))-x
s=solve(F,x)
X=subs(s)
answer:
F = 21/(100*exp((157*x)/1000 + 157/1000)) - x
s =(1000*lambertw(0, -(100000*exp(157/1000))/3297))/157
X = 15.0552 +15.0159i
the answer tha my friend got with the same commands:
F =(21*exp(- (157*x)/1000 - 157/1000))/100 - x
s =(1000*lambertw(0, (3297*exp(-157/1000))/100000))/157
X = 0.1746

Best Answer

My guess, and this may be a long shot, is that somewhere along the way you took the sqrt of -1.