Hey there,
I am relatively new to Mathematica and used it only for basic mathematical manipulations. So I was playing around with Mathematica a little when I encountered the following strange behavior:
I defined a polynomial function, which at first seems to be singular in x=1. When properly writing the function, however, one can easily see that this is not the case since the denominator cancels out nicely. (As a background, the polynomial arises by differentiation of a sum of weighted Chebyshev polynomials, so one can also expect a non-singular polynomial.)
Now trying to evaluate the Polynomial at 1 raises the 'infinite expression 1/0 encountered
' error. The only way I was able to evaluate the Polynomial correctly, was by rewriting it, evaluate it at some variable y
and then substituting y with 1. Please see the attached Notebook for a minimal working example.
Now, I somehow can understand that the evaluation of the first polynomial fails (I don't think it should, though), but I do not understand how the evaluation of the second polynomial can fail. Why doesn't Mathematica properly evaluate the first polynomial? Expanding and simplifying costs a lot of time (this is just a mwe, the target-polynomial is of degree 50+) and the evaluation workaround is bulky. Is there a better/saver way to implement this functionality?
Glad about any advice, Mathias