Derivative of a function involving square root of sum of squares

In summary, the minimizer of a function f(x) is the point at which each pair of points in 2D subtends an angle greater than 120 degrees.
  • #1
onako
86
0
Provided is a function [tex] f(x)=\sum_{j=1}^n ||x-x_j||[/tex], for x being a two dimensional vector, where ||.|| denotes the Euclidean distance in 2D space. How could one obtain a derivative of such a function?
 
Physics news on Phys.org
  • #2
If you are just looking for a mechanical derivation I think you can do in this way. If [itex]||\cdot||[/itex] is the Euclidean norm then:

$$||x-x_j||=\sqrt{\sum_{k=1}^N{{(x-x_j)}_k^2}}$$

where N is the dimension of the Euclidean space. So:

$$\frac{d}{dx}||x-x_j||=\frac{1}{2\sqrt{\sum_{k=1}^N{{(x-x_j)}_k^2}}}\sum_{k=1}^N{2{(x-x_j)}_k}=\frac{\sum_{k=1}^N{{(x-x_j)}_k}}{||x-x_j||}$$

and so:

$$\frac{df}{dx}=\sum_{j=1}^n{\frac{\sum_{k=1}^N{{(x-x_j)}_k}}{||x-x_j||}}$$
 
  • #3
Thanks. Now, faced with the problem of minimizing f(x) for provided 2D parameters x1, x2, x3, ..., x_k, one sets the derivative to zero, and computes for x. However, in case of more than one dimension this problem is non-trivial, I think. What would be the minimizer of f(x), provided 2D parameters x1, x2, x3, ..., x_k?
 
  • #4
That it will be messy can be seen by considering just 3 points in 2 dimensions. If any pair subtends an angle > 120 degrees at the third then the answer will be that third point. Otherwise, it is the point at which each pair subtends that angle.
 
  • #5
Won't the minimizer be the same if you don't take the square root?
 
  • #6
It then means you're squaring each term, and not the function itself. If a function is squared, then these would be equivalent.

Given a set of points in 2D, a point that minimizes the sum of squared distances to such points is the barycenter; I'm not sure about the sum of distances (so, not squared).
 
  • #7
All I'm saying is that I believe

$$f(x)=\sqrt{g(x)^2}$$

has the same minimizer as

$$f(x)^2 = g(x)^2$$

I remember from basic calculus that minimizing the distance from a point to a curve is the same as minimizing the distance squared, which is a lot easier to deal with. I think that's also why least squares problems are specifically formulated the way they are. Minimizing the sum of squares is a whole lot easier than minimizing the square root of the sum of squares, and yields the same answer.
 

1. What is the derivative of a function involving square root of sum of squares?

The derivative of a function involving square root of sum of squares is the slope of the tangent line to the curve at a specific point. It is denoted by f'(x) or dy/dx.

2. How do I find the derivative of a function involving square root of sum of squares?

To find the derivative of a function involving square root of sum of squares, you can use the chain rule or the power rule. The chain rule is used when the function is composed of multiple functions, while the power rule is used when the function is in the form of x^n.

3. Can the derivative of a function involving square root of sum of squares be negative?

Yes, the derivative of a function involving square root of sum of squares can be negative. This indicates that the function is decreasing at that particular point.

4. Is the derivative of a function involving square root of sum of squares always defined?

No, the derivative of a function involving square root of sum of squares is not always defined. It may not be defined at points where the function is not differentiable or has a sharp corner.

5. Why is it important to find the derivative of a function involving square root of sum of squares?

Finding the derivative of a function involving square root of sum of squares is important because it helps in determining the rate of change of the function at a specific point. This information is useful in various applications, such as optimization problems and curve sketching.

Similar threads

  • Calculus
Replies
3
Views
3K
Replies
10
Views
156
Replies
1
Views
935
  • Calculus
Replies
15
Views
5K
Replies
5
Views
1K
Replies
3
Views
2K
Replies
4
Views
952
Replies
36
Views
4K
  • Calculus
Replies
3
Views
1K
Replies
2
Views
1K
Back
Top