Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Say we have scalar potential in a form $$ U = A \ln (\vec{a} \times \vec{r})^2 e^{-\vec{b} \cdot \vec{r}}. $$ How would one calculate gradient $\vec{E}=-\nabla U$ of such potential?

A is a constant, $\vec{a}$ is a constant vector and $\vec{r}=(x, y, z)$.

share|improve this question
what exactly is the natural log of a cross product? This is a typo? –  James S. Cook Apr 9 '13 at 22:41
Ivana what are the variables of its potential function? –  Math_overview Apr 9 '13 at 22:45
By the square of a vector, do you mean the square of its length? –  Javier Badia Apr 9 '13 at 22:52
Yes, I was trying to solve it under assumption that square was a square of length (though it wasn't sprecified). –  Ivana Apr 9 '13 at 22:55
@Ivana Ivana expression $ \ln(\vec{a} \times \vec{r})^2e^{-\vec{b} \cdot \vec{r}}$ should be understood as the logarithm of only $(\vec{a}\times\vec{r})^2 $ or of the expression ($ \vec{a} \times \vec{r})^2 e^{- \vec{b} \cdot \vec{r}} $? Please be clear in your question. –  Math_overview Apr 9 '13 at 23:00

2 Answers 2

$(\vec{a}\times \vec{r})_k = \epsilon_{ijk}a_ix_j$ hence $(\vec{a}\times \vec{r})^2 = \epsilon_{ijk}a_ix_j\epsilon_{lmk}a_lx_m$ consequently, \begin{align} \partial_n (\vec{a}\times \vec{r})^2 = \epsilon_{ijk}\epsilon_{lmk}a_ia_l\partial_n(x_mx_j)&= \epsilon_{ijk}\epsilon_{lmk}a_ia_l[\delta_{nm}x_j+x_m\delta_{nj}] \\ &= \epsilon_{ijk}\epsilon_{lnk}a_ia_lx_j+\epsilon_{ink}\epsilon_{lmk}a_ia_lx_m\\ &= 2\epsilon_{ijk}\epsilon_{lnk}a_ia_lx_j \\ &= 2(\delta_{il}\delta_{jn}-\delta_{in}\delta_{jl})a_ia_lx_j \\ &= 2(\vec{a} \cdot \vec{a} \, x_n - a_n \vec{a} \cdot \vec{r}) \end{align} On the other hand, $\partial_n \vec{b} \cdot \vec{r} = \partial_n b_ix_i = b_i \delta_{in} = b_n$ assuming that $\vec{b}$ is constant. So, \begin{align} \partial_n U &= \partial_n [A\ln(\vec{a}\times \vec{r})^2e^{-\vec{b}\cdot \vec{r}}] \\ &= A\left(\partial_n [\ln(\vec{a}\times \vec{r})^2]e^{-\vec{b}\cdot \vec{r}}+\ln(\vec{a}\times \vec{r})^2\partial_n[e^{-\vec{b}\cdot \vec{r}}]\right) \\ &= A\left(\frac{2(\vec{a} \cdot \vec{a} \, x_n - a_n \vec{a} \cdot \vec{r})}{(\vec{a}\times \vec{r})^2}-b_n\ln(\vec{a}\times \vec{r})^2\right)e^{-\vec{b}\cdot \vec{r}} \\ \end{align} Thus, provided I haven't made some silly mistake, $$ \vec{E} = -\nabla U = A\left(\frac{2[(\vec{a} \cdot \vec{a}) \, \vec{r} - (\vec{a} \cdot \vec{r})\vec{a}]}{(\vec{a}\times \vec{r})^2}-\ln(\vec{a}\times \vec{r})^2\vec{b}\right)e^{-\vec{b}\cdot \vec{r}} $$

share|improve this answer
Thank you, this helps. –  Ivana Apr 12 '13 at 17:28

Cross-product by a constant is linear, taking the square of a vector is quadratic so by differencing composed functions, $$ d(ln((a\times r)^2)) = \frac{1}{(a\times r)^{2}} d((a\times r).(a\times r)) = \frac{2}{(a\times r)^{2}} d(a \times r).(a \times r) = \frac{2}{(a\times r)^{2}} (a \times dr).(a\times r) $$ for the exp part : $$ d(e^{-b.r}) = e^{-b.r} d(-b.r) = e^{-b.r} (-b.dr) $$ and by combining the two with product differentiation rule : $$ dU = \frac{2}{(a\times r)^{2}} e^{-b.r} (a\times r).(a \times dr) + ln((a\times r)^2) e^{-b.r} (-b.dr) = e^{-b.r}\left(\frac{2(a\times r).(a \times dr)}{||a\times r||^2} - ln(||a\times r||^2) b.dr\right) $$ We want to rewrite it as an inner product of dr, so we use the rules of scalar triple product then vector triple product $$ dU = e^{-b.r}\left(\frac{2 dr.((a\times r \times a)}{||a\times r||^2} - ln(||a\times r||^2) b.dr\right) = e^{-b.r}\left(\frac{2 (||a||^2 r - (r.a)a).dr}{||a\times r||^2} - ln(||a\times r||^2) b.dr\right) = e^{-b.r}\left(2\frac{||a||^2 r - (r.a)a}{||a\times r||^2} - ln(||a\times r||^2) b\right).dr $$ And you read gradU by removing .dr .

share|improve this answer
Thank you, this is helpful. –  Ivana Apr 12 '13 at 17:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.