In the standard evaluation process, innermost parts are evaluated first. For example:
In[0]:= (a/a + 1) * 0
The evaluation process gives:
(a/a + 1) * 0 = (1 + 1) * 0 = 2 * 0 = 0
In that case, this evaluation doesn't make sense because the result will always be 0. I'd like to write a rule where the left member "x" is never evaluated:
Multiply[x_, 0] := 0
For example:
In[1]:= Multiply[Simplify[D[Cos[x]^(x + 1)/x^4, {x, 5}], 0]
Out[1]:= 0
without evaluating Simplify[D[Cos[x]^(x + 1)/x^4, {x, 5}] which is time consuming.
The built-in rule of Mathematica is very slow too (about 2s on my machine), so it means innermost parts are evaluated first:
In[2]:= 0 * Simplify[D[Cos[x]^(x + 1)/x^4, {x, 5}]]
Out[2]:= 0
I'm not sure this kind of concept exists in Mathematica. Any suggestions?
Thanks for the help!
(1/(1-1))*0
properly gives an error message. $\endgroup$