2
$\begingroup$

I am trying to write for the following differentiation $$ \frac{\partial}{\partial q^2}\frac{1}{k^2(k-q)^2} \quad\text{where $q^2=q^{\mu}q_{\mu}$}\tag{1} $$ This can be written as $$ \frac{q^{\mu}}{2q^2}\frac{\partial}{\partial q^{\mu}}\frac{1}{k^2(k^{\mu}k_{\mu}-2q^{\mu}k_{\mu}+q^{\mu}q_{\mu})} $$ And the differentiation leads to $$ \frac{q^{\mu}}{2q^2} \frac{2(k_{\mu}-q_{\mu})}{k^2(k-q)^4}=\frac{1}{q^2}\frac{(k\cdot q-q^2)}{k^2(k-q)^4} $$ I tried to use the partial differentiation command

\[PartialD]_q^2 F(q^2)

But that obviously gives wrong result.

$\endgroup$
3
  • 1
    $\begingroup$ You seem to be using tensors (from the notation you are using (Covariance and contravariance etc...) , so you need tensor calculus. See how-to-apply-partial-differentiation-w-r-t-tensors as an example using Xact package. There is also mathematica-partial-derivative-with-respect-to-tensors which uses FeynCalc package. $\endgroup$
    – Nasser
    Commented Jul 5, 2023 at 6:47
  • $\begingroup$ As you see from the second line, the expression does not depend on q^2 alone but on q.k too. So d/d^q2 makes no sense. Partial differention, in contrast to its notation, demands to state what are the constants, not what is changing. Becomes more clearly using exterior d. $\endgroup$
    – Roland F
    Commented Jul 5, 2023 at 8:12
  • $\begingroup$ People here generally like users to post code as copyable Mathematica code as well as images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. Judging from the code you tried, you seem to need to spend some time on learning basic syntax. Wolfram.com has resources and there are more here. The underscore does not mean subscript as in TeX and functions require brackets not parentheses: E.g., F(q^2) is F times the (Algebra I) square of q (uses Power[], not Dot[]). $\endgroup$
    – Michael E2
    Commented Jul 5, 2023 at 13:33

1 Answer 1

1
$\begingroup$

I'll be using mostly minus signature here. If you are using mostly plus, just adapt the functions accordingly. First, $\frac{1}{k^2(k-q)^2}$ is not a function of $q^2$ only, it is really a function of the whole four-vector $q$ (because of the mixed term $k_\mu q^\mu$).

If you don't really need to use complex tensor structures in your computations, you don't need to learn a new package for now (it would be useful for the future though), you can just define the Minkowskian product by yourself as

MinkProd[q1_List, q2_List] := 2 q1[[1]] q2[[1]] - q1.q2;

Now you can define kvec = {k[0], k[1], k[2], k[3]};, then the function you want to take the derivative of is

F[q_List] := 1/(MinkProd[kvec, kvec] MinkProd[kvec - q, kvec - q]);

If qvec={q[0], q[1], q[2], q[3]};, the derivative $\partial_{q^i}$ is just D[F[qvec],q[i]], then the result you want in terms of its components is just

qvec.Table[D[F[qvec], q[i]], {i, 0, 3}]/(2 MinkProd[qvec, qvec])

Notice that the scalar product in the expression above is just the dot product between the two lists since the Table gives you a covariant vector as output. MinkProd should only be used with two covariant or two contravariant vectors.

A little extra: if you want to convert a contravariant list into covariant or vice-versa, use

ConvertIndex[q_List] := Flatten@{q[[1]], Table[-q[[i]], {i, 2, Length[q]}]}
$\endgroup$

Your Answer

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

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