# Generating a Jacobian matrix for a set of multivariate polynomials

Hi I can see that this is implemented for schemes but I do not want it in such vast generality - I have a (long) list of variables vee=var('a b c d ... ') and a long list of explicit polynomials f1(vee), f2(vee), ... in those variables. What please is the neatest way in which to construct the Jacobian matrix of first derivatives in such a way that I obtain the symbolic matrix (and can calculate a symbolic determinant say), and also am able to evaluate it at a particular set of values for the variables? Thanks for any ideas.

edit retag close merge delete

Sort by ยป oldest newest most voted

Am I missing something? I feel like I'm under-interpreting your question with this answer.

sage: var('a,b,c,d')
(a, b, c, d)
sage: f1 = a*b+c^2+d
sage: f2 = b+c^2+d*8
sage: f3 = b+c^2+c*8
sage: f4 = d*b+c+c*8
sage: jacobian( [f1,f2,f3,f4], [a,b,c,d])
[      b       a     2*c       1]
[      0       1     2*c       8]
[      0       1 2*c + 8       0]
[      0       d       9       b]

more

no - you're just missing that i was too dumb to find this in the manual!! Thanks - and sorry!!

( 2013-02-21 04:51:12 -0600 )edit

No problem. Don't forget, tab-completion is VERY useful here; you could have done jac<tab> and it would have auto-completed to include this command (presumably among several others).

( 2013-02-21 15:12:28 -0600 )edit
2

thanks - i have never used that - will check it out. also i finally learnt what < and > is all about! That had been mystifying me for years!!

( 2013-02-21 22:33:28 -0600 )edit

Hah, I didn't realize it would show up that way! Testing... jac<tab> works, but in the back ticks it doesn't.

( 2013-02-22 01:51:04 -0600 )edit

## Stats

Seen: 466 times

Last updated: Feb 21 '13