The easiest way to do this might be to use
and then:
auto_jacvec(f, u, [1,0,0])
would be partial f(u) / partial x.