How can I directly evaluate the following derivative? $$ \frac{\partial ^n}{\partial x^n}\bigg[\sum_{k=1}^{m} (m-k)! (ax+b)^k\bigg] = \sum_{k=1}^{m} (m-k)! \bigg[\frac{k!}{(k-n)!}a^n (ax+b)^{k-n}\bigg] $$

Mathematica code is

D[Sum[(m - k)! (ax + b)^k, {k, 1, m}], {x, n}] // FullSimplify

or even this will do:

D[(ax + b)^k, {x, n}] // FullSimplify


f2[x_] := (a + b x )^k
nthDeriv[f2, x, m]

I obtain a weird output, however, for

f1[x_] := (1 +  x )^n

the above method works fine.

  • 1
    $\begingroup$ Have a look at SeriesCoefficient. $\endgroup$ Jan 20 '19 at 9:00
  • $\begingroup$ @b.gatessucks SeriesCoefficient seems to be yielding weird output. $\endgroup$ Jan 20 '19 at 9:44
D[(a x + b)^k, {x, n}]

is straightforward:

$$a^n k^{(n)} (a x+b)^{k-n}$$

Note: don't use ax when you should use a x.

  • 1
    $\begingroup$ Thanks for pointing out. But mathematica 10.04 does not yield the desired output. Which version are you using? $\endgroup$ Jan 21 '19 at 5:03
  • 1
    $\begingroup$ I'm using on a Mac. $\endgroup$ Jan 21 '19 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.