Gradient and Hessian of the Coulomb/Electrostatic Energy

In summary: So I would sum up the contributions to each coordinate in this new vector and then use the gradient and the hessian to calculate them.Thanks so much for all of your help!In summary, the author is looking for ways to calculate the gradient and the hessian of a system of charges. They plan to use the notation (x_i, y_i, z_i) where i runs from 1 to N as the coordinates of the charges, and then use the gradient and the hessian to calculate the contributions to each coordinate.
  • #1
decerto
87
2
I have a function

$$\displaystyle V(x)=\frac{1}{2}\sum_i \sum_{j \neq i} q_i q_j \frac{1}{\left|r_i - r_j\right|}$$ where ##r_i=\sqrt{x_i^2+y_i^2+z_i^2}## which is the coulomb potential energy of a system of charges.

I need to calculate ##\frac{\partial V}{\partial x_k}## and ##\frac{\partial^2 V}{\partial x_k \partial x_l}## for an optimization routine.

I guess I want to treat the set ##(x_i , y_i, z_i)## where i runs from 1 to N as independent variables ##(x_j)## where j runs from 1 to 3N (the direct sum of the position vectors).

Would ##r_i = \sqrt{x_{3i-2}+x_{3i-1}+x_{3i}}## then?

I ask because but I am not sure how to calculate the ##\frac{\partial r_i}{\partial x_k}## term

I was also thinking maybe I can just calculate ##\frac{\partial r_i}{\partial x_k}, \frac{\partial r_i}{\partial y_k}, \frac{\partial r_i}{\partial z_k}## separately and then just relabel them as independent variables but I am not sure if this will work.

Any help would be appreciated
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Hi,

##r_i## is not ##\sqrt{x_i^2+y_i^2+z_i^2}## !
## r_i ## is simply a vector ##\vec r_i = (x_i, y_i,z_i)## !
You need ##| \vec r_i - \vec r_j | ## which is the square root of ## (\vec r_i - \vec r_j) \cdot (\vec r_i - \vec r_j) ##

In your notation (somewhat awkward) this would be $$
| \vec r_i - \vec r_j | = \sqrt{ ( x_{3i-2} - x_{3j-2} )^2 + ( x_{3i-1} - x_{3j-1} )^2 + ( x_{3i} - x_{3j} )^2 }
$$
 
  • #3
BvU said:
Hi,

##r_i## is not ##\sqrt{x_i^2+y_i^2+z_i^2}## !
## r_i ## is simply a vector ##\vec r_i = (x_i, y_i,z_i)## !
You need ##| \vec r_i - \vec r_j | ## which is the square root of ## (\vec r_i - \vec r_j) \cdot (\vec r_i - \vec r_j) ##

In your notation (somewhat awkward) this would be $$
| \vec r_i - \vec r_j | = \sqrt{ ( x_{3i-2} - x_{3j-2} )^2 + ( x_{3i-1} - x_{3j-1} )^2 + ( x_{3i} - x_{3j} )^2 }
$$

Thanks for that correction, bit of an oversight!

How would you suggest I calculate the gradient and the hessian analytically without that notation?
 
  • #4
Your ##V## looks an awful lot like the ##\ \ W\quad (1.51)\ \ ## in my 1974 Jackson 2nd edition, except that ##W## is a scalar and you write ##V(x)##. What does this ##x## stand for ? And how do you intend to optimize if ##V## diverges when ##\vec r_i \rightarrow \vec r_j ## ? Are there any boundary conditions ? In short: could you tell us a little more of your plans :smile: ?
 
  • #5
BvU said:
Your ##V## looks an awful lot like the ##\ \ W\quad (1.51)\ \ ## in my 1974 Jackson 2nd edition, except that ##W## is a scalar and you write ##V(x)##. What does this ##x## stand for ? And how do you intend to optimize if ##V## diverges when ##\vec r_i \rightarrow \vec r_j ## ? Are there any boundary conditions ? In short: could you tell us a little more of your plans :smile: ?

Sorry V is the coulomb potential for a system of charges each with position ##r_i=(x_i, y_i, z_i)##, it is a scalar function as you say of these positions. I want to create a gradient ##\frac{\partial V}{\partial x_k}## and a hessian ##\frac{\partial^2 V}{\partial x_k \partial x_l}## where the coordinates ##x_k## are the direct sum of the ##(x_i, y_i, z_i)##

So for a system of two charges I would have ##r_1=(x_1, y_1, z_1) \ , \ r_2=(x_2, y_2, z_2)## so ##\textbf{x}=(x_1, y_1, z_1, x_2, y_2, z_2)## and my gradient would look like ##(\frac{\partial V}{\partial x_1}, \frac{\partial V}{\partial y_1}, \frac{\partial V}{\partial z_1}, \frac{\partial V}{\partial x_2}, \frac{\partial V}{\partial y_2}, \frac{\partial V}{\partial z_2})##

I originally thought it would be a good idea to rewrite ##\textbf{x}=(x_1, y_1, z_1, x_2, y_2, z_2)## as ##(x_1, x_2, x_3, x_4, x_5, z_6)## using the coordinate transformations ##x_i \to x_{3i-2}, \ y_i \to x_{3i-1}, \ z_i \to x_{3i}## but as you said the notation is clunky.
 

Related to Gradient and Hessian of the Coulomb/Electrostatic Energy

1. What is the Coulomb/Electrostatic Energy?

The Coulomb/Electrostatic Energy refers to the potential energy that two charged particles possess due to their mutual electrostatic interaction. It is directly proportional to the product of their charges and inversely proportional to the distance between them.

2. What is the gradient of the Coulomb/Electrostatic Energy?

The gradient of the Coulomb/Electrostatic Energy describes the direction and magnitude of the change in energy with respect to the position of the charged particles. It is a vector quantity and points in the direction of the maximum increase of energy.

3. How is the gradient of the Coulomb/Electrostatic Energy calculated?

The gradient of the Coulomb/Electrostatic Energy is calculated by taking the partial derivatives of the energy function with respect to each coordinate of the charged particles. This results in a vector with components representing the changes in energy in the x, y, and z directions.

4. What is the Hessian of the Coulomb/Electrostatic Energy?

The Hessian of the Coulomb/Electrostatic Energy is a matrix that describes the second-order derivatives of the energy function with respect to the coordinates of the charged particles. It provides information about the curvature of the energy surface at a specific point and can be used to analyze the stability of the system.

5. How is the Hessian of the Coulomb/Electrostatic Energy related to the stability of the system?

The Hessian of the Coulomb/Electrostatic Energy is related to the stability of the system because it determines the nature of the critical points of the energy function. A positive-definite Hessian indicates a stable minimum energy point, while a negative-definite Hessian indicates an unstable maximum energy point. A zero Hessian indicates a saddle point, which can be either stable or unstable depending on the specific values of the second-order derivatives.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
1K
  • Electromagnetism
Replies
19
Views
2K
Replies
3
Views
1K
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
837
  • Advanced Physics Homework Help
Replies
0
Views
329
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Quantum Physics
Replies
15
Views
2K
  • Quantum Interpretations and Foundations
Replies
1
Views
513
Back
Top