How to expand and compute log(a + b)? [closed]

柔情痞子 提交于 2019-11-27 10:41:23

问题


I would like to know the complete expansion of log(a + b).

For example

log(a * b) = log(a) + log(b);
log(a / b) = log(a) - log(b);

Similar to this, is there any expansion for log(a + b)?


回答1:


In general, one doesn't expand out log(a + b); you just deal with it as is. That said, there are occasionally circumstances where it makes sense to use the following identity:

log(a + b) = log(a * (1 + b/a)) = log a + log(1 + b/a)

(In fact, this identity is often used when implementing log in math libraries).




回答2:


Why would you ever want to do this? The property that log (a*b) = log a + log b is only useful because it transforms a multiplication operation into an addition operation. log (a+b) already involves only an addition, so it makes no sense to have any further expansion.

Of course you can always use one of the several series for computing logarithms, but the fastest way would be to simply compute log (a+b) directly. For that matter, on most computers, even log (a*b) is going to be faster than log a + log b, since the latter involves an extra logarithm operation.



来源:https://stackoverflow.com/questions/3974793/how-to-expand-and-compute-loga-b

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!