I want to get a general formula for an expression, so instead of numbers like 5 or Pi I want to insert variables into an expression. But the functions involved check NumericQ on the arguments and do not evaluate for a symbolic variable. Can I force Mathematica to return NumericQ as True for a set of variables?
I tried:
NumericQ[a]=True- no error but does not workThe same but with
Unprotect[NumericQ]- no effect$Assumptions=a \[Element] Reals- no effect
What else should I try?
Format[a1] = Subscript[a, 1]; a1 /: NumericQ[a1] = True; f[a1]– Bob Hanlon May 01 '23 at 06:53sym[j]or whatever your symbol might be. The reason is that subscripted symbols are not plain symbols, so you can’t assign values (strictly speaking,DownValues) to them directly. See also general discussion about "indexed variables". – Roman May 01 '23 at 08:42