Re: Jacobian
- To: mathgroup at smc.vnet.net
- Subject: [mg117555] Re: Jacobian
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Tue, 22 Mar 2011 05:09:57 -0500 (EST)
On 3/21/11 at 6:13 AM, duarte_nuno86 at hotmail.com (Duarte) wrote: >I just recently started using mathematica. I have version 6.0. I >have a project in which I need toi calculate the jacobian matrix of >a function G:R4 - R4. >My question is wether there is a command that computes the jacobian >or do I need to compute each partiall derivate individually? What >command gives the partial derivatives? Use D to compute partial derivatives. For example In[1]:= D[y x^2, x] Out[1]= 2 x y And since D has the attribute Listable, you can use it to compute the partial derivatives of each element of a matrix all at once. For example: In[3]:= mat = Partition[y x^# & /@ Range[4], 2] Out[3]= {{x*y, x^2*y}, {x^3*y, x^4*y}} In[4]:= D[mat, x] Out[4]= {{y, 2*x*y}, {3*x^2*y, 4*x^3*y}}