Sterling wrote: > How do I evaluate a Jacobian at certain values? For example, I type: > > x1,x2,x3 = var('x1 x2 x3') > > f1(x1,x2,x3) = 3*x1 - cos(x2*x3) - (1/2) > f2(x1,x2,x3) = x1^2 - 81*(x2 + 0.1)^2 + sin(x3) + 1.06 > f3(x1,x2,x3) = e^(-x1*x2) + 20*x3 + (10*pi - 3)/3 > > f = (f1,f2,f3) > > j = jacobian(f, [x1,x2,x3]) > > I thought it would (intuitively) be: > > j(x1=0.1,x2=0.1,x3=-0.1) > > But apparently not. Please advise.
I think the thing I would do is make your f a symbolic expression by actually calling the functions with arguments: f = (f1(x1,x2,x3), f2(x1,x2,x3), f3(x1,x2,x3)) Then things work like you wished. Another thing you could do is make the matrix explicitly a symbolic expression matrix: matrix(SR,j) Then your idea works great as well. Thanks, Jason -- Jason Grout --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---