# How to prove units when you have logs in an equation

1. Jan 4, 2012

### gtbiyb

Hi,

What happens when, following a numerical calculation, you have to prove the units but the equation has logs?

For example:

ln P = (ln z1 - ln z2)/(z1 - z2)

So as the RHS will simplify to a number when all values are known you end up with:

ln P = x, x being some value

so to find P you now have to:

e^x = P

I now the units turn out to be Pa as its pressure but how to prove it!

Cheers

Matt

Last edited: Jan 4, 2012
2. Jan 4, 2012

### Staff: Mentor

when logs are involved the units of measure would be dimensionless except if the units of measure were based on a log definition like decibels.

A similar example would be using radian measure in trig functions whats the unit of measure of sin(alpha) as in the equation:

(length of hypotenus in meters)*sin(alpha) = (length of opposite side in meters)

sin(alpha) its dimensionless right?

Last edited: Jan 4, 2012
3. Jan 4, 2012

### gtbiyb

Yeah i see that thanks, i have also just read that in e^x the x has to be dimesionless. But my answer should be a pressure in Pa! I transposed a formula to get that above but am confident its valid.

4. Jan 4, 2012

### technician

Your original equation looks a bit strange to me, where did it come from?
If you rearrange it I get...
lnP = (lnz1 - lnz2)/z1 - z2
i.e lnP = ln(z1/z2)/(z1-z2)
i.e (z1-z2)lnP = ln(z1/z2)
i.e P ^(z1-z2) = z1-z2

Is this what you started with ?

5. Jan 4, 2012

### AlexLAV

Revise the way you have obtained your formula. May be you solved a diff. equation, and a constant has been lost?

6. Jan 4, 2012

### gtbiyb

Thanks guys,

So i have put thought into this in general but in other situations the units cancel as the log is taken of a ratio but in this case i have basically a simultaneous equation:

P(z1)=P(0)e(-z1/λ)
and
P(z2)=P(0)e(-z2/λ)

I know P(z1), P(z2), z1 and z2

I want to know P(0) So i transpose both to eliminate λ thus:

ln P(z1) - ln (P(0)) = -z1

so

λ= -z1/ln P(z1) - ln (P(0))

Therefore:

z1/(ln P(z1) - ln (P(0)))=z2/(ln P(z2) - ln (P(0)))

Simplifying to get:

(z2ln P(z1)-z1ln P(z2)/(z2-z1)=ln (P(0))

What do you think?

7. Jan 4, 2012

### gtbiyb

I can see the original equation i put down was wrong as i was doing it from memory and it was the general theory i was after! The above is correct though.

Matt

8. Jan 5, 2012

### gtbiyb

Anyone got any advice on this?

9. Jan 5, 2012

### Staff: Mentor

I think we already answered your question. You can't do units math when log and trig funcs are used. The exception being when a measurement is log based such as decibels.

http://en.wikipedia.org/wiki/Decibels

10. Jan 5, 2012

### gtbiyb

But what do you do then to prove the units in the example i gave, I'm sure my transposition is correct.

11. Jan 5, 2012

### Staff: Mentor

do the units work out when you treat the log funcs as dimensionless?

also you could be missing a constant that provides some additional units for cancelling out

like the G in the classical Gm1m2/r^2 gravity formula the result is the force so the G must have units
that cancel out so the resultant answer is in newtons.

Last edited: Jan 5, 2012
12. Jan 6, 2012

### AlexLAV

Gtbiyb, though ln(P) looks unaccustomed for me, I think you are right, and the formula can be applied for calculations. Both of its parts has the same dimension. If one applies exp to the both of the parts of the formula it will be obtained P0=P(z1)^(z2/(z2-z1))/P(z2)^( (z1/(z2-z1)). I’m not sure it is a better form.