0
$\begingroup$

(1)

f[x1_, x2_, x3_] := x1^100 * x2^200 * x3^300
Derivative[1, 2, 3][f][x1, x2, x3]

(2) I want to get the same result as (1) when I have two lists:

variables = Table[Subscript[x, i], {i, 1, 3}]
variableIndex = Table[i, {i, 1, 3}]
Derivative[variableIndex][f][variables]

But (2) doesn't work.

What should I do?

$\endgroup$
  • $\begingroup$ Thank you very much, Mr. Michael E2. $\endgroup$ – tchappy ha Dec 13 '17 at 1:12
  • 1
    $\begingroup$ @Nasser Oops, miscopied: Derivative[Sequence @@ variableIndex][f][Sequence @@ variables] or (Derivative @@ variableIndex)[f] @@ variables. Maybe the OP didn't test...? $\endgroup$ – Michael E2 Dec 13 '17 at 1:22

Your Answer

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

Browse other questions tagged or ask your own question.