# How to mathematically deal with unexpected negative value

For planck’s photon energy equation when calculating wavelength it makes no sense for it to be negative.

The answer I get is negative because the energy value is the only negative variable, heat is given out so it’s said that the reaction is exothermic heat taken in is positive.

Units:

$$h=6.262\cdot 10^{-34}\ j\cdot s^{-1}$$

$$c=2.998\cdot 10^{8}\ m\cdot s^{—1}$$

$${NA}=6.022\cdot 10^{23}\ mol^{-1}$$

$$E=-533000\ j\cdot mol^{-1}$$

$$\lambda=x\cdot m$$

$$\lambda=\frac{h\cdot c\cdot {NA}}{E}=\frac{h\cdot c}{E}$$

$$\lambda=\frac{(6.626\cdot 10^{-34})(2.998\cdot 10^{8})(6.022\cdot10^{23})}{(-533000)}=-224nm$$

Obviously the length can’t be negative so I just so I just put it as positive, but is there a mathematical technique for situations like this? I’m just trying to learn.

• All of those numbers are positive. I suspect your error is in using our calculator. Mar 27, 2021 at 16:05
• damn the denominator was meant to be negative @johndouma I edited Mar 27, 2021 at 16:10
• @Nickotine How come the value of $\;j\cdot mol\;$ is negative ? Mar 27, 2021 at 16:12
• This isn't really a math question (certainly not a linear-algebra question). Maybe the Physics StackExchange would be a better place for it.
– Blue
Mar 27, 2021 at 16:12
• it’s just how do I mathematically deal with this wrong negative value? @blue not sure what to tag this as Mar 27, 2021 at 16:12

Just make one of the other values negative as well, for example, let $$c=-2.998\cdot 10^{8}\ m\cdot s^{—1}$$. Then you get a positive length.
• Well, $c=\pm\sqrt{\frac{E}{m}}$. so yes you are!
• oh just rearranging $$E=m\cdot c{2}$$ Very smart @JMP Mar 27, 2021 at 22:51