Page 1 of 1

Log Help (Maths, not Forestry)

Posted: Tue Nov 29, 2022 10:09 am
by TopBadger
Hi All,

I find myself needing to use logs for the first time in years and something is going on which I don't understand. The problem I have is based on Beer's Law (transmission)

I(z) = Io * e^(-az) -> Eqn(1)

Where I(z) is irradiance at after some z through an absorbing thing, Io is the starting irradiance (set to one), a is absorption co-eff, and z is the distance travelled.

I want to find the absorption needed to drop the transmission to 50% after 10mm...

Therefore I(z)/Io = 0.5, and z = 10 and I need to find the value of a...

So...

I(z) / Io = 0.5 = e^(-10a)

So ln(0.5) = -10a and therefore a = -ln(0.5) / 10 = 0.0693... (note sign)

The problem is when I sub this back into Eqn(1) as a sanity check... (setting Io as 1)

I(z) = e^(-az) = e^(-0.0693*10) = e^(-0.693) = 2, which is not 0.5

I know that e^(0.693) = 0.5

Where does the sign change come from in the exponent? There seems to be an inconsistency here that I can't track down...

Re: Log Help (Maths, not Forestry)

Posted: Tue Nov 29, 2022 10:19 am
by shpalman
I definitely get e^(-0.693) = 0.5 and e^(0.693) = 2, and it has to be that way around because e is 2.71828... while any number^0 is 1, so for e^x to be greater than 1 but less than 2.71828, x needs to be positive but less than 1, and for e^x to be less than 1, x needs to be less than 0 i.e. negative.

Re: Log Help (Maths, not Forestry)

Posted: Tue Nov 29, 2022 10:20 am
by shpalman
(double post)

Re: Log Help (Maths, not Forestry)

Posted: Tue Nov 29, 2022 10:22 am
by jaap
Yep, e^(-0.693) = 0.5 and e^(0.693) = 2.

Re: Log Help (Maths, not Forestry)

Posted: Tue Nov 29, 2022 10:29 am
by Gfamily
Yes, I think it's whatever you're using to calculate e^(-0.693) is not applying the negation to the exponent properly

Re: Log Help (Maths, not Forestry)

Posted: Tue Nov 29, 2022 10:34 am
by TopBadger
Ah jeez - embarrassing calculator usage fail...

I'd stored the answer in memory without accounting for the sign change and then was using that result (with the wrong sign) in the sanity check...

Thanks all!