Damn you, Napier!

Briggs‘ logarithms (often mistakenly understood to be Napier‘s logarithms) is such an useful function that most of us don’t really think about it, until we have to. Everyone’s familiar with its properties:

\displaystyle\log_b a = \frac{\log a}{\log b}

\log b^x = x \log b

\log a b = \log a + \log b (1)

\displaystyle\log \frac{a}{b} = \log a - \log b

but suddenly,

\log (a+b) = ?

What can we do with this last one?

One thing is that we can still break it into a product-like form:

\displaystyle\log (a+b) = \log a\left(1+\frac{b}{a}\right)

and use (1) to get

\displaystyle\log a\left(1+\frac{b}{a}\right)=\log a + \log \left(1+\frac{b}{a}\right) (5)

If b is much smaller than a, then we can simplify (5) by dropping the b term because \log 1+\frac{b}{a}\approx{}0 and that may be appropriate given the context.

If we do not want to drop entirely the b term, then we can use Mercator’s series:

\displaystyle\log (1+x)=x-\frac{1}{2}x^2+\frac{1}{3}x^3-\frac{1}{4}x^4+\cdots

We can then write

\displaystyle\log (a+b)=\log a\left(1+\frac{b}{a}\right)

\displaystyle=\log a + \log \left(1+\frac{b}{a}\right)

(and plugging-in Mercartor’s series for the second part:)

\displaystyle=\log a + \sum_{i=1}^\infty \frac{(-1)^{i+1}}{i}x^i

Truncating at a few terms, we get

\displaystyle=\log a + \frac{b}{a} - \frac{1}{2}\left(\frac{b}{a}\right)^2 + \frac{1}{3}\left(\frac{b}{a}\right)^3 - O\left(\left(\frac{b}{a}\right)^4\right)

which gives a rather good approximation whenever b is significantly smaller than a (but not infinitesimally so).

*
* *

The form \log (a+b) comes up more often than I’d like in my calculations, and I always find it rather annoying because I know no good way to break it or approximate it satisfactorily. Other expansions lead to equations of the form \log (1+a) + \log b + P(a,b) where P(a,b) is an infinite degree polynomial-like object that mostly misbehaves and needs a lots of terms to start looking like it’s going to converge: it’s unstable numerically.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 66 other followers

%d bloggers like this: