Math index | RinomXE | About me

4d+ line average distance from a point, Started 10/16/2024. Revamped 12/18/2024.

Where y is next and so on from x and like x is line start and x1 is line end and x2 is to compare line with: (x-x2)(x-x2)+...=A, 2(x-x2)(x1-x)+...=B, (x1-x)^2+...=F.

Following are formulas from Wolfram Alpha proven correct and half of an integral with t being 1 for one end and 0 for other end. Use like (1=t)-(0=t).

With F being not 0: ((B + 2*F*t)*sqrt(A + t*(B + F*t)))/(4*F) - ((B^2 - 4*A*F)*log(B + 2*F*t + 2*sqrt(F)*sqrt(A + t*(B + F*t))))/(8*F^(3/2))

When F is 0 but B is not: (2*(A + B*t)^(3/2))/(3*B)

When both F and B are 0: sqrt(A)*t

These can be simplified but you can do that.

These sum per dimension some things then do final calculations. "log" is natural E logarithm. "sqrt" is square root. "^" means to power of. "*" means multiplied by. I tested with samples on lines with multiple trials of increasing numbers of samples and they always went toward this result.

PROVE ME WRONG. X E.