First time here? Check out the FAQ!
answered 2012-01-24 08:58:11 +0100
f=function('f') def T(f,n,x): ans=0 for v in range(n+1): ans=ans+binomial(n,v)*f(v+1)*(x)^v return ans print T(f,4,x)
gives:
x^4*f(5) + 4*x^3*f(4) + 6*x^2*f(3) + 4*x*f(2) + f(1)