there could be so many ways to do this
that it might be worth asking about the "use case"

the derivatives, of course, satisfy the same three term recurrence
but with different initial conditions


so it might be worth knowing if 
0.  whether this is worth optimizing a great deal or just a little bit or 
you just want something
 to do the job
1. the degree of the original polynomial was relatively small
2. whether one derivative in particular  or a run of many derivatives were 
desired
3. whether one or many points were desired
4. if the arguments were well inside or on [-1,1] 









On Saturday, April 4, 2015 at 11:40:53 PM UTC-4, Spencer Lyon wrote:
>
> Oh I forgot to say how to use it. If c are your coefficients for a degree 
> n interpolant on [a, b] then the coefficients of the derivative of that 
> interpolant are der_matrix(n, a, b) * c
>
> On Saturday, April 4, 2015 at 11:39:49 PM UTC-4, Spencer Lyon wrote:
>
> I have a function that will compute the derivative matrix operator that 
>> transforms coefficients of a Chebyshev interpolant on interval [a, b] of 
>> degree n (so n+1 total Chebyshev basis functions T_0, T_1, … T_n) into the 
>> coefficients of a degree n-1 chebyshev interpolant on [a, b] that is the 
>> exact derivative of the first interpolant. Maybe it could help you:
>>
>> # derivative matrix
>> function der_matrix(deg::Int, a::Real=-1, b::Real=1)
>>     N = deg
>>     D = zeros(Float64, N, N+1)
>>     for i=1:N, j=1:N+1
>>         if i == 1
>>             if iseven(i + j)
>>                 continue
>>             end
>>             D[i, j] = 2*(j-1)/(b-a)
>>         else
>>             if j < i || iseven(i+j)
>>                 continue
>>             end
>>             D[i, j] = 4*(j-1)/(b-a)
>>         end
>>     end
>>
>>     D
>> end
>>
>> On Thursday, April 2, 2015 at 10:38:48 AM UTC-4, Tamas Papp wrote:
>>
>> Hi, 
>>>
>>> Can someone point me to some Julia code that calculates a matrix for the 
>>> derivatives of the Chebyshev polynomials T_j, at given values, ie 
>>>
>>> d^k T_i(x_j) / dx^k    for i=1,..n, j for some and vector x. 
>>>
>>> The Chebyshev polynomials themselves are very easy to calculate using 
>>> the recurrence relation, but derivatives are not. Alternatively, maybe 
>>> this can be extracted from ApproxFun but I have not found a way. 
>>>
>>> Best, 
>>>
>>> Tamas 
>>>
>> ​
>>
> ​
>

Reply via email to