I'm studying this series:
I know that there is this relation:
($\ell$ is the common limit of the two series)
Do you know a Mathematica function that could prove this relation?
This is not a proof but rather an empirical test
Clear[a, b]
#[{a, b}] & /@ {Mean, HarmonicMean, GeometricMean}
(* {(a + b)/2, 2/(1/a + 1/b), Sqrt[a b]} *)
Since the terms converge, then you can used FixedPoint
to find the limit
gm[a_?Positive, b_?Positive] :=
FixedPoint[{Mean[#], HarmonicMean[#]} &, {a, b}]
Testing whether the limits are the same and equal to the GeometricMean
for 10,000 pairs of random reals
And @@ Table[
{a, b} = RandomReal[{10^-9, 100}, 2, WorkingPrecision -> 15];
g = gm[a, b];
g[[1]] == g[[2]] == GeometricMean[{a, b}],
{10000}]
(* True *)
You can use FixedPointList
to look at the convergence step-by-step
FixedPointList[{Mean[#], HarmonicMean[#]} &, {5., 79.}]
(* {{5., 79.}, {42., 9.40476}, {25.7024, 15.3682}, {20.5353, 19.2352},
{19.8852, 19.864}, {19.8746, 19.8746}, {19.8746, 19.8746},
{19.8746, 19.8746}, {19.8746, 19.8746}} *)
GeometricMean[{5., 79.}]
(* 19.8746 *)
GeometricMean
, i.e., l = Sqrt[a0*b0]
$\endgroup$
Commented
Feb 22, 2018 at 1:07
RSolve
, although on first pass it doesn't seem to be able to solve this. $\endgroup$RSolve
does with that. $\endgroup$