Can someone please derive how $$\frac{d}{dx} f(x-x') = -\frac{d}{dx'} f(x-x')~?$$ In Griffiths electrodynamics, this is directly mentioned. I'm really confused, can someone elaborate!

enter image description here

  • 1
    $\begingroup$ Would it make sense to mention in this question the fact that "Griffiths" is a particular textbook? $\endgroup$ Dec 8, 2020 at 14:00
  • 2
    $\begingroup$ Yes definitely, but it's a pretty standard and common book so I don't think it's too much out of context in the question. $\endgroup$
    – Ruchi
    Dec 8, 2020 at 15:59
  • $\begingroup$ en.wikipedia.org/wiki/Chain_rule $\endgroup$ Dec 9, 2020 at 1:50
  • $\begingroup$ @Ruchi u haven't accepted any answer in all your questions you can do so by selecting the tick on the left of an answer to accept it $\endgroup$
    – imposter
    Dec 31, 2020 at 4:47
  • $\begingroup$ Oh! Thanks for letting me know! @anusha $\endgroup$
    – Ruchi
    Jan 4, 2021 at 11:51

2 Answers 2


This follows directly from the chain rule:

$$\frac{\partial}{\partial x}[f(x-x')] = f'(x-x')\frac{\partial}{\partial x}[x-x'] = f'(x-x')$$ whereas $$\frac{\partial}{\partial x'}[f(x-x')] = f'(x-x')\frac{\partial}{\partial x'}[x-x'] = -f'(x-x').$$ (Here I take $f'(x-x')$ to mean that (total) derivative of $f$ with respect to its single independent variable.)

Thus, we see that the two expressions are simply the negations of each other. More complex versions of this can similarly be derived for other vector calculus operators, such as $$\nabla_x f(x-x') = -\nabla_{x'} f(x-x'),$$ where $\nabla_x$ denotes the gradient with respect to $x$. I think this is also explained in Griffiths somewhere, but hopefully this explanation suffices.

Hope this helps.

  • $\begingroup$ I have a very silly doubt, but in the first case f', the total derivative of f is wrt x(it's single independent variable) and in the second case f', the total derivative of f is wrt x' .... Then, how is df/dx= df/dx' ??! $\endgroup$
    – Ruchi
    Dec 8, 2020 at 6:21
  • 3
    $\begingroup$ Think of f as a function f(t), where here t happens to equal x - x'. Then in both cases f' is taken to mean df/dt evaluated at t = x-x'. Again, this is basically the chain rule, so I'd recommend reviewing that. $\endgroup$ Dec 8, 2020 at 6:27

I think that this can come from this argument: You can prove that $$\frac{\vec{x}-\vec{x}'}{|\vec{x}-\vec{x}'|^3}=-\nabla\left(\frac{1}{|\vec{x}-\vec{x}'|}\right)$$ If you take this change $$\vec{x}\rightarrow\vec{x}'$$ and $$\vec{x}'\rightarrow\vec{x}$$ the previous equality become $$\frac{\vec{x}'-\vec{x}}{|\vec{x}'-\vec{x}|^3}=-\nabla'\left(\frac{1}{|\vec{x}'-\vec{x}|}\right)$$

From the two equations you can get that $$\nabla\left(\frac{1}{|\vec{x}-\vec{x}'|}\right)=-\frac{\vec{x}-\vec{x}'}{|\vec{x}-\vec{x}'|^3}=\frac{\vec{x}'-\vec{x}}{|\vec{x}'-\vec{x}|^3}=-\nabla'\left(\frac{1}{|\vec{x}'-\vec{x}|}\right)$$

I hope it is useful, by the way, i check the book Classical electrodinamycs second edition of Jackson in the page 33. Bye!

  • 6
    $\begingroup$ This is needlessly complicated, it's simply the chain rule $\endgroup$ Dec 8, 2020 at 5:20
  • $\begingroup$ @NiharKarve note though that this derivation is valid for a function of vectors. The chain rule is more complicated for vectors (NB I know that you can hide that behind notation), and while the question is posed in terms of a scalar argument, the problem is about functions of vectors, so this answer actually addresses the real problem without assuming that the reader knows the chain rule of vector analysis or how it relates to the scalar version. $\endgroup$
    – tobi_s
    Dec 9, 2020 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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