# Example 2 of Applet in which 6 moving points in three-dimensional space "induce" 14 geometric medians on a sphere.

- Author:
- Roman Chijner

- Topic:
- Algebra, Calculus, Circle, Difference and Slope, Differential Calculus, Differential Equation, Equations, Optimization Problems, Functions, Geometry, Function Graph, Intersection, Linear Functions, Linear Programming or Linear Optimization, Mathematics, Sphere, Surface, Geometric Transformations, Vectors

Let Pi=(xi,yi,zi) n moving points in ℝ³ (lP:={P1,P2,...,Pn}). I want to find the points P=(x,y,z)

*-S (*__on the surface of the sphere__*radius R*) that are critical (relative min/max or saddle points at (x,y,z)) of a function f(x,y,z) is the sum*of the distances*from P to the all points from lP. Critical points can be found using*Lagrange multipliers**as*finding the Extreme values of the function f(x,y,z)*subject to**a g(x,y,z)=0 (constraining equation:*g(x,y,z)=x^{2}+y^{2}+z^{2}-R^{2}). There is a system of equations: ∇*f(x,y,z)*= λ∇g(x,y,z). A local optimum occurs when ∇*f(x,y,z)*and ∇g(x,y,z) are parallel, and so ∇*f*is some multiple of ∇*. This applet is used to study the distribution of geometric medians on a sphere of radius R, „induces“ by the discrete sample of 6 movable points in the 3-D space. Description is in https://www.geogebra.org/m/y8dnkeuu.**g*