Calculating gradient in 2D

482 Views Asked by At

Could anyone find the below gradient 2D? $a$ and $r_0$ are constants. $$\nabla \frac{\exp\left(-(\vert r-r_0\vert-a)\right)}{\vert r-r_0\vert}$$

1

There are 1 best solutions below

3
On BEST ANSWER

Yukawa's potential, huh?

Take $\vec R = r - r_0 = x\hat x + y\hat y$ and $R = \lVert r - r_0\rVert$. Oserve that solving the problem in terms of $\vec R$ will give you the solution in the coordinate system in which $r_0 = \vec 0$. Applying the rule of the derivative of the product:

$$ \nabla \frac{e^{-R-a}}{R} = e^{-a} \nabla \frac{e^{-R}}{R} = e^{-a} [e^{-R}\nabla \frac{1}{R} + \frac{1}{R}\nabla e^{-R}]\qquad(1) $$

An useful rule for finding the gradient of functions that only depend on the distance $R$ to the origin:

$$ \nabla f(R) = f'(R) \hat R \qquad(2) $$

where

$$\hat R = \frac{\vec R}{R} = \frac{x\hat x}{\sqrt{x^2+y^2}} + \frac{y\hat y}{\sqrt{x^2+y^2}}$$

You can use that rule to solve $\nabla e^{-R}$:

$$ \nabla e^{-R} = -e^{-R} \hat R = -e^{-\sqrt{x^2+y^2}} \left( \frac{ x\hat x}{\sqrt{x^2+y^2}} + \frac{y\hat y}{\sqrt{x^2+y^2}} \right) \qquad(3) $$

Well, it's up to you to calculate $\nabla r^{-1}$ using (2). After that insert both my result (3) and yours in (1) and don't forget to substitute $\vec R = r- r_0$