Question: Vector Calculus Multiply Error

Defined a demand function:

x:=(p,w)->w/(p[1]+p[2]+p[3])*Vector([p[2]/p[1],p[3]/p[2],p[1],p[3]])

The Slutsky Matrix is calculated as Dpx(p,w) + Dwx(p,w) x(p,w)^T with Dpx(p,w) = Jacobian for p1, p2, p3 and Dwx(p,w) is a column vector of the derivate of x1, x2, x3 in respect to w.

Step by step:

Dxp := Jacobian(x(p,w),[p[1],p[2],p[3]])

yields the correct Jacobian.

For Dwx I've tried several different methods, i.e.

Dwx := Jacobian(x(p,w),[w]) or diff(x(p,w),w) or D[2](x)(p,w)

which all appear to yield the correct column vector.

The problem is that Maple tells me 'Error, (in rtable/Product) invalid arguments), when I try the product:

Dwx x(p,w)^+

If I instead define Dwx through:

Dwx := Vector(3,(i)->diff(x(p,w)[i],w))

Maple correctly calculates Dwx x(p,w)^+ as a 3x3 matrix.

Please Wait...