Skip to main content

[Community Question] Calculus: Find a number that have minimum sum of distances between set of numbers

One of our user asked:

Lets say we have a set of numbers { 5, 7, 1, 2, 5, 100 }, I want to find a number x such that the sum of distances of every number from the set to x is minimal.

My first thought was that x is the average of the sum of all element of the set: (sum / n), but it's not true it fail the above example.

Any help or hint will be appriciated, thanks.


Comments

Popular posts from this blog

[Community Question] Linear-algebra: Are linear transformations between infinite dimensional vector spaces always differentiable?

One of our user asked: In class we saw that every linear transformation is differentiable (since there's always a linear approximation for them) and we also saw that a differentiable function must be continuous, so it must be true that all linear operators are continuous, however, I just read that between infinite dimensional vector spaces this is not necessarily true. I would like to know where's the flaw in my reasoning (I suspect that linear transformations between infinite dimensional vector spaces are not always differentiable).

[Community Question] Calculus: prove $\int_0^\infty \frac{\log^2(x)}{x^2+1}\mathrm dx=\frac{\pi^3}{8}$ with real methods

One of our user asked: I am attempting to prove that $$J=\int_0^\infty\frac{\log^2(x)}{x^2+1}\mathrm dx=\frac{\pi^3}8$$ With real methods because I do not know complex analysis. I have started with the substitution $x=\tan u$ : $$J=\int_0^{\pi/2}\log^2(\tan x)\mathrm dx$$ $$J=\int_0^{\pi/2}\log^2(\cos x)\mathrm dx-2\int_{0}^{\pi/2}\log(\cos x)\log(\sin x)\mathrm dx+\int_0^{\pi/2}\log^2(\sin x)\mathrm dx$$ But frankly, this is basically worse. Could I have some help? Thanks.