I am working with the following code and I had a strange problem. If I do the following:
syms x n chebyprime(n,x)
chebyprime(n,x)=diff(chebyshevT(n,x),x);
The function displays the expected result. But if I configure it like this:
chebyprimeplus(n,x)=diff(chebyshevT(n+1,x),x)
It ruins it all. Instead of numerical inference (which one would expect from a derivative of a polynomial estimated at a certain point), I get the conclusion as follows:
>> chebyprimeplus(3,.2)
ans =
D([2], chebyshevT)(4, 1/5)
It puzzles me. It looks like it is outputting some kind of mupad syntax, and I cannot find a way to convert it to a numeric value. I see no reason why simply increasing the order of Chebyshev should lead to a failure of integration, and when I introduce a higher order, increasing the value of n, it works fine, so there is no problem with the ability of the differentiator to differentiate the Chebyshev polynomial. Can someone help me deal with this?
Thank.