-- Continuous Geometric Means
- From: Han de Bruijn <Han.deBruijn@xxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 16:14:27 +0200
Continuous Geometric Means
Definition of the Geometric Mean at:
http://en.wikipedia.org/wiki/Geometric_mean
The relationship with the arithmetic mean of logarithms at that page
can be used to derive an expression in case the medium is continuous:
GM = exp( integral(t=0..L) ln( f(t) ) dt / L )
We couldn't find many references on the Internet (Google) concerning
the _continuous_ version of the geometric mean. Curious about it ..
Example.
For a straight line segment, we substitute:
f(t) = (A.t - B)^2 + (C.t - D)^2 for 0 <= t <= 1 ;
Where A = x_2 - x_1 ; B = x - x_1 ; C = y_2 - y_1 ; D = y - y_1 ;
Meaning that f(t) is the squared distance between a point of the line
segment and a point (x,y) in the plane. Evaluate this a little bit:
f(t) = (A^2 + C^2) t^2 - 2.(A.B + C.D).t + (C^2 + D^2)
And make dimensionless: f(t) = t^2 - 2.a + b^2 .
Where: a = (A.B + C.D)/(A^2 + C^2) and b^2 = (C^2 + D^2)/(A^2 + C^2)
The discriminant of the quadratic f(t) turns out to be: a^2 - b^2 =
D = - (A.D - B.C)^2 / (A^2 + C^2) ; it is negative or zero. The case
D = 0 should be handled as a special case, where: f(t) = (t - a)^2 .
So we have to calculate:
E(x,y) = exp( integral(t=0..1) ln( t^2 - 2.a + b^2 ) dt )
A computer algebra system (MAPLE) has been employed for this purpose:
http://groups.google.nl/group/sci.math/browse_frm/thread/6540aee9c6a068ff
> collect(collect(int(ln(t^2-2*a*t+b^2),t=0..1,continuous),arctan),ln);
And the special case:
> collect(collect(int(ln((t-a)^2),t=0..1,continuous),arctan),ln);
The result has been programmed in Delphi Pascal. Here are some details:
var
A,B,C,D,N,I,S,E,F : double;
begin
A := two.x - one.x; C := two.y - one.y;
B := dit.x - one.x; D := dit.y - one.y;
N := sqr(A) + sqr(C); { assume nonzero }
S := (sqr(B) + sqr(D))/N; { b^2 }
I := (A*B + C*D)/N; { a }
D := sqr(A*D-B*C)/N; { discriminant }
E := 0;
if (D > 0) then
begin
D := sqrt(D);
F := (1-I)*ln(abs(1+S-2*I)) + I*ln(S)
- 2*D*(arctan((I-1)/D) - arctan(I/D)) - 2;
E := exp(F/2);
end;
if (D = 0) and (I <> 1) and (I <> 0) then
begin
F := ln(sqr(1-I)) - 2 - 2*I*(ln(abs(1-I)) - ln(abs(I)));
E := exp(F/2);
end;
if (D = 0) and ((I = 0) or (I = 1)) then E := exp(-1);
integraal := E;
And when visualized it looks as follows:
http://hdebruijn.soo.dto.tudelft.nl/jaar2008/segment.jpg
Similar attempt for a circle has resulted in the integral published at:
http://groups.google.nl/group/sci.math/browse_frm/thread/b1634000e5babd75
> exp(int(ln((a+cos(t))^2+(b+sin(t))^2),t=0..2*Pi)/(2*Pi));
It is suspected (Conjecture !) that the outcome is simply: (a^2 + b^2) .
Anyone to confirm or deny ?
Han de Bruijn
.
- Follow-Ups:
- Re: -- Continuous Geometric Means
- From: G. A. Edgar
- Re: -- Continuous Geometric Means
- From: Angus Rodgers
- Re: -- Continuous Geometric Means
- Prev by Date: Re: ODE 1st order with variable parameter : Is an analytical solution exist ?
- Next by Date: Re: divisibility test for 7
- Previous by thread: Interesting News Story - Not Spam
- Next by thread: Re: -- Continuous Geometric Means
- Index(es):
Relevant Pages
|
|