MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Jacobian

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117550] Re: Jacobian
  • From: Peter Pein <petsie at dordos.net>
  • Date: Tue, 22 Mar 2011 05:09:03 -0500 (EST)
  • References: <im7bt9$t86$1@smc.vnet.net>

Am 21.03.2011 12:13, schrieb Duarte:
> Hi everyone.
>
> 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?
>
> Thank you
>

Hi,

define vectors f and x:
In[1]:= vars = Subscript[x,#]& /@ Range[4];
         f=Subscript[y, #][Sequence @@ vars]& /@ Range[4];

In[3]:= j1=D[f,{vars}];
In[4]:= j2=Outer[D,f,vars];
In[5]:= j1===j2

Out[5]= True

due to the long function name "Derivative" I shorten the following output:

In[6]:= j1

Out[6]= {{Derivative[1, 0, 0, 0][Subscript[y, 1]][Subscript[x, 1],
    Subscript[x, 2], Subscript[x, 3],
        Subscript[x, 4]],
   Derivative[0, 1, 0, 0][Subscript[y, 1]][Subscript[x, 1], ..},
...,
{..,
    Subscript[x, 2],  Derivative[0, 0, 0, 1][Subscript[y, 4]][
        Subscript[x, 1], Subscript[x, 2], Subscript[x, 3],
    Subscript[x, 4]]}}

hth,
Peter


  • Prev by Date: InverseSeries for x->Infinity
  • Next by Date: Re: Why Mathematica does not issue a warning when the calculations are losing so much precision that the results are not anymore useful?
  • Previous by thread: Re: Jacobian
  • Next by thread: Why Mathematica does not issue a warning when the calculations are losing so much precision that the results are not anymore useful?