I know that this might not be the best forum for the question but I am sure people here can help.(adsbygoogle = window.adsbygoogle || []).push({});

I want to do some simple tensor contraction using Maple or Mathematica. The calculation is simple but extremely long. All I want is to teach Maple/Mathematica to do tensor contraction without using explicit 4x4 matrices or four-vectors. For example, I want Maple/Mathematica to recognize that [itex] \eta_{\alpha \beta} q^\beta [/itex] must be replaced by [itex] q_\alpha [/itex] . Or that [itex] \eta_{\mu \nu} \eta^{\mu \alpha} [/itex] must be replaced by [itex] \eta^\alpha_\nu [/itex] or that [itex] \eta_{\mu \nu} \eta^{\mu \nu} = 4 [/itex] and so on.

The calculation involves hundreds of terms (it is in the context of linearized GR quantized as an effective field theory).

I would highly appreciate if someone could tell me how to tell Maple/Mathematica to do certain substitutions like this.

Patrick

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Simple tensor manipulation in Maple or Mathematica

Loading...

Similar Threads - Simple tensor manipulation | Date |
---|---|

LaTeX \vec command | Jan 31, 2018 |

How to compute the Riemann tensor using RGTC mathematica? | Apr 25, 2017 |

Simple MATLAB loop | Oct 30, 2015 |

Coding up a simple geometric algebra in MATLAB | Oct 12, 2015 |

WolframAlpha miscalculates a simple arithmetic expression | May 25, 2015 |

**Physics Forums - The Fusion of Science and Community**