1. ## logarithm help

i have this equation

$\displaystyle f = \frac{1-exp(-2s(1-x)}{1-exp(-2s)}*\frac{1}{x(1-x)}$

when computing high values of $\displaystyle s$ i have problems as the exponential tends to very small numbers. Instead i want to take natural logs of this equation so i can avoid computing the exponentials

how do i take logs such that the exponentials disappear

2. Originally Posted by chogo
$\displaystyle f = \frac{1-exp(-2s(1-x)}{1-exp(-2s)}*\frac{1}{x(1-x)}$
Your stuff is hard to follow; you're missing a bracket; top line:
1 - [-2s(1 - x)]^k (k = exponent)
Is that what you mean?

3. Originally Posted by chogo
i have this equation

$\displaystyle f = \frac{1-exp(-2s(1-x)}{1-exp(-2s)}*\frac{1}{x(1-x)}$

when computing high values of $\displaystyle s$ i have problems as the exponential tends to very small numbers. Instead i want to take natural logs of this equation so i can avoid computing the exponentials

how do i take logs such that the exponentials disappear
Take it one step at a time and recall the following laws:

$\displaystyle log(ab) = log(a) + log(b)$

$\displaystyle log(a/b) = log(a) - log(b)$

$\displaystyle log(a^k) = k \, log(a)$

To start

$\displaystyle ln(f) = ln(\frac{1-exp(-2s(1-x))}{1-exp(-2s)}) + ln(\frac{1}{x(1-x)})$

$\displaystyle = ln(1-e^{-2s(1-x)}) - ln(1-e^{-2s}) - ln(x) - ln(1-x)$

Note you can't simplify $\displaystyle ln(1-x)$ because $\displaystyle ln(a-b) \neq ln(a) - ln(b)$

4. $\displaystyle f = \frac{1-e^{(-2s(1-x))}}{1-e^{(-2s)}}*\frac{1}{x(1-x)}$

apologies wilmer this is the equation with brackets right

thank you for taking the time to reply

e^(i*pi) i understand the laws and how to expand such equations, my problem is that i need to rearrange the equations such that i do not end up with $\displaystyle ln(1-e^{(x)})$

i am not sure if you understand what i mean. for very large values of $\displaystyle s$ when i compute the above formula i end up with numerical overflow problems. That is why i need to remove the exponentials. But i cant see a way of rearranging this formula so as to remove the exponentials.

can it be done? any substitutions you think i should try