How can one do symbolic type negation ? (Advanced methods permitted!!)
y = symsum(1/(x-n),n,1,m)
Notice the -- that is, if x is an integer. That leads to the question: how can you set an assumption such that x is known to be a non-integer ?
You can use assume() to set x to be integer, but assume() does not support negation. It is not obvious to me that the internal MuPAD routine assume does either; you can read the code for it by using
You can appear to construct an appropriate type at the MuPAD level:
S1 = evalin(symengine, 'Dom::Real and not Dom::Integer')
S2 = evalin(symengine, '~(x in integer)')
but how could you associate that type with a symbolic variable?
I know that in this particular case you could use children() to extract the third branch of the piecewise() and proceed from there, skipping around the problem: but what if you wanted MATLAB to be able to reason about the fact that a variable is a non-integer ?