I am attempting to calculate the following expression in Mathematica, but I am having a bit of difficulty doing so. I want to calculate the following expression \begin{gather*} \left(x^2\sqrt{1-K\left(x^{2}+y^{2}+z^{2}\right)}+y^2+z^2 \right)\gamma^{1}\partial_{x} \left(-xy(1-\sqrt{1-K\left(x^2+y^2+z^2\right)}) \right)\gamma^{2}\partial_{x} \Psi \end{gather*} where we have \begin{gather*} \left(x^2\sqrt{1-K\left(x^2+y^2+z^2\right)}+y^2+z^2 \right)\gamma^{1}\partial_{x} \left(-xy(1-\sqrt{1-K\left(x^2+y^2+z^2\right)}) \right)\gamma^{2}\partial_{x} \Psi \\ =\left(x^2\sqrt{1-K\left(x^2+y^2+z^2\right)}+y^2+z^2 \right)\left(-y(1-\sqrt{1-K\left(x^2+y^2+z^2\right)}) -xy \frac{K x}{\sqrt{1-K\left(x^{2}+y^{2}+z^{2}\right)}}+\partial_{x}\partial_{x}\Psi \right) \gamma^{1}\gamma^{2} \end{gather*} essentially the differential operator would act on the expression to its right evaluating the terms as usual, applying product rule and chain rule where appropriate, but would leave the $\Psi$ function (really the wave function intact), and we would have the differential operator also acting on the Dirac gamma matrices, but seeing as they are constant that term would just zero out. The reason I need the gamma matrices as they are at the end is due to the fact that I will then use the anticommutation relation to eliminate certain terms, as well as seeing that the $\partial_{x}\partial_{x}\Psi$ also plays a role in reduction of the expression. $\Psi$ doesn't have to be $\Psi$ so long as it is any arbitrary function and is not evaluated and has the differential operators. Is this possible in Mathematica? Any help regarding this matter would be greatly appreciated. Any documentation suggestion is also greatly appreciated.
(x^2*Sqrt[1-k*(x^2+y^2+z^2)]+y^2+z^2)*\[Gamma]1*D[-x*y*(1-Sqrt[1-k*(x^2+y^2+z^2)]),x]*\[Gamma]2*Inactivate[D[\[Psi],x]]
$\endgroup$...*Inactivate[D[D[\[Psi],x],x]]
what you are asking for? Above and well beyond that, I am concerned whether you are going to be able to use this to later do what you imagine with this. But I am glad I was able to help. $\endgroup$