AutoDiff does not support compiling a function with a partial subset of variables. The only purpose of providing variables to Compile() is to specify the
order of arguments when you use the resulting compiled form.
For example, here are two cases:
compiledTerm = term.Compile(x, y)
and
compiledTerm = term.Compile(y, x)
Both of them product a compiled term for the same function. But
compiledTerm.Differentiate(1, 2)
has a different meaning in both cases. In the first case, the meaning is to differentiate with
x=1, y=2
and in the second case it differentiates with
x=2, y=1
