There are some syntactical problems with the provided code-as noted in the comments- but apart from that, it would be possible to perform the same operations as the ones in the Q, with evaluating something that would eventually get to a form such as
J[#1+#2&,#1-#2&] in order to accommodate the definition of
J is defined in such a way as to receive two arguments which have head
Function. In the code example of the Q,
J[u+v,u-v] does not evaluate as expected because the provided arguments have
Function (as already pointed to in the comments). Here, the arguments passed to
J are 'functions'.
Now, I am not sure you will be happy with this iteration of your code either, because-in all likelihood-those
ys are already defined in terms of
v and you'll have to rewrite them in terms of
#2 (rewrite them as pure functions in order for them to 'play nice' with the initial def. of
Also, in this case, the remaing of the code needs refactoring too eg something like
D[x, u] would have to be re- written as
D[x[u,v],u] to take into considetation the fact that
x is in fact a pure function of two arguments etc.
Additionally, relevant to the possible code refactoring is the fact that you can construct the Jacobian matrix in a more compact way as displayed in another nice answer to your Q.
In closing, refactor the code either to allow
J to accept expressions other than
Function as arguments or change the
y functions to pure functions along with appropriate changes to the derivatives; also perhaps consider a more compact way for writing the Jacobian.