In the program below, the result of(adsbygoogle = window.adsbygoogle || []).push({}); "difr" is not zerobut according to the definition of qx in the second line, I expect it to be zero (because [itex]qx^2+ky^2=(\frac{ef-u}{hbarv_f})^2[/itex]). What is the problem?

Code (Text):

ef=1;hbarv_f=658;ky=0.0011;u=2.5;

qx=sqrt(((ef-u)/hbarv_f)^2-ky.^2);

difr=(ef-u)/hbarv_f-sqrt(qx^2+ky^2)

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Unexpected inequality in Matlab

**Physics Forums | Science Articles, Homework Help, Discussion**