找回密码
 快速注册
搜索
查看: 28|回复: 0

迭代求对数平均

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2023-1-4 20:14 |阅读模式
What can we calculate with a simple calulator?
For example, take $$a_0=x,~b_0=y$$
$$a_1=\frac{a_0+\sqrt{a_0b_0}}{2},~~~~b_1=\frac{b_0+\sqrt{a_0b_0}}{2}$$
$$a_{n+1}=\frac{a_n+\sqrt{a_nb_n}}{2},~~~~b_{n+1}=\frac{b_n+\sqrt{a_nb_n}}{2}$$
Then we obtain as a limit the 'logarithmic mean' of $x,y$:
$$a_\infty=b_\infty=\frac{x-y}{\ln x-\ln y}$$
  1. FixedPoint[(# + Sqrt[#[[1]] #[[2]]])/2 &, {1., 2.}]
复制代码

{1.4426950408889632, 1.4426950408889636}
$L(1,2)=\frac1{\ln2}$

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 12:02

Powered by Discuz!

× 快速回复 返回顶部 返回列表