Chebyshev Coefficients of
Again, we input the integrand.
>
The following differential difference system keeps track of all the dependencies.
> sys[1]:=dfinite_expr_to_sys(expr,f(n::shift,x::diff));
The following call computes a recurrence satisfied by the residue at any singularity of any solution of the above system.
> sys[2]:=int_of_sys(sys[1],x=residues);
This fourth order recurrence has no simple solution.
> rec[4]:=op(sys[2]):
> LREtools[hypergeomsols](rec[4],f(n),{},output=basis);
This is no completely clear at the time why the following second order recurrence, also satisfied by the integrals, cannot be found by holonomic methods.
>
In other words, the integral of the following
is zero.
> Z:=eval(subs(f=unapply(expr,n),rec[2]));
This is easily checked numerically.
>
for i from 0 to 3 do
'Z'(n=i)=Int(normal(eval(subs(n=i,subs(ChebyshevT=orthopoly[T],Z)))),x=-1..1);
"is approximately equal to:",evalf(op(2,%),30)
od;