I have a function f(t)=2/(2-t)
. It is not so hard to get the rth derivative at t=0 (i.e. 2^(-r)*r!
) without using Mathematica. In the case of Mathematica calculation, I can get the r-th derivative when r=4 like this: D[2/(2-t), {t, 4}]
. But how can I get the rth derivative at t=0 in Mathematica when r is ANY integer? I tried to use this expression, but it didn't work as expected:
Simplify[D[2/(2 - t), {t, r}], Assumptions -> Element[r, Integers]] /. {t->0}
Is it possible to do the above math symbolically in Mathematica just as we humans do?
diff(x^4, x$n);
results inpochhammer(5-n,n)*x^(4-n)
;diff(sin(x), x$n);
givessin(x+1/2*n*Pi)
. – Kindred