Thanks for your feedback Roger.
You are correct, I did make an error in stating "F(x), R^3>R", as F does not map all of R^3 to R, just the subset of (x,y,z) that satisfies the constraints x+y+z=1 and x>=0, y>=0, z>=0. The x, y and z in my case represent mole fractions in a liquid, hence the constraints.
I understand that because of the constraints, the domain of valid coordinates is a twodimensional plane, and therefore only two independent variables are required to define position in the plane. In my case, I just use x and y to define position, and when in future I work out Grad(F), I will just use the first two elements, ie. 2D gradient given by (dF/dx,dF/dy).
My main problem lay in the actual evaluation of dF/dx and dF/dy. F is a function in x, y and z. So in the process of evaluating the partial derivative of F with respect to x, say, I come across a term in F which contains y or z, and am faced with the question of "What does dy/dx and dz/dx equal?". Do they equal 0, or because of the constraint x+y+z=1, do they equal 1?
I appreciate the time you have taken to reply to my post.
Dean
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <iedsbg$j7r$1@fred.mathworks.com>...
> "Dean " <dchesterfield@hotmail.com> wrote in message <iebrc7$17f$1@fred.mathworks.com>...
> > I am struggling a bit with what I guess should be a simple problem. I have a function F(x), R^3>R, where x is a 3element symbolic vector [x1 x2 x3]. I need to obtain the gradient vector of F with respect to x, which involves calculating the partial derivative of F with respect to each of x1, x2, and x3.
> >
> > Now x1,x2 and x3 represent real positive variables, and they are subject to the constraint x1+x2+x3=1. ........
>            
> To expand upon what I wrote yesterday, suppose that your F is defined over threedimensional space but that you are interested in some kind of gradient defined on the plane x+y+z=1. (I switched to x, y, and z for brevity instead of your x1, x2, x3.)
>
> It is advantageous to define coordinates u and v in this plane that preserve the Euclidean metric. That is, if the points (u1,v1) and (u2,v2) in plane coordinates correspond respectively to (x1,y1,z1) and (x2,y2,z2) in the x,y,z coordinate system, then
>
> ((u2u1)^2+(v2v1)^2)^(1/2) = ((x2x1)^2+(y2y1)^2+(z2z1)^2)^(1/2)
>
> always holds.
>
> One definition of u and v coordinates that satisfies this equality is
>
> x = 1/3+1/sqrt(6)*2*u
> y = 1/31/sqrt(6)*(usqrt(3)*v)
> z = 1/31/sqrt(6)*(u+sqrt(3)*v)
>
> It is easy to check that x+y+z=1 is identically true for all u and v, so this is a valid parametric representation of points on your plane. A little more work can show that the Euclidean metric is preserved.
>
> Taking advantage of the identities
>
> dF/du = dF/dx*dx/du + dF/dy*dy/du + dF/dz*dz/du
> dF/dv = dF/dx*dx/dv + dF/dy*dy/dv + dF/dz*dz/dv
>
> you can show that the 2D gradient [dF/du,dF/dv] simply amounts to the orthogonal projection of the 3D gradient [dF/dx,dF/dy,dF/dz] onto the plane.
>
> In the above, the origin of the u, v coordinates was located at x,y,z coordinates (1/3,1/3,1/3). This origin could actually have been placed anywhere on the plane. The u and v axes could also have been rotated around the plane normal by any angle provided they remain mutually orthogonal and you would still have a coordinate system that would relate the two different gradients in the above relation: the u,v 2D gradient being the projection of the x,y,z 3D gradient onto the plane.
>
> With plane coordinates that do not satisfy this metricpreserving condition, the relationship between the 2D (plane) and the 3D gradients would be more complicated.
>
> I hope this serves to clarify the situation of the gradient concept when defined in terms of plane surface coordinates.
>
> Roger Stafford
