Skip to main content
deleted 7 characters in body
Source Link
Nasser
  • 150.3k
  • 12
  • 161
  • 374

D[x1Com,x[1,i]] will give zero, since there is no x[1,i] any more in x1Com. There is only x[1,1] and x[1,2] and so on.

One way could be

ClearAll[x1Com, x, m];
x1Com = HoldForm@Sum[HoldForm@(Sum[(m[1, i]*x[1, i]), {i, 1, 6}]/HoldForm@Sum[m[1Sum[m[1, i], {i, 1, 6}])

Mathematica graphics

Now make a function to differentiate w.r.t. to specific x[1,i]

diff[x1Com_, x_] := D[ReleaseHold@x1Com, x];

Now use it

diff[x1Com, x[1, 1]]

Mathematica graphics

diff[x1Com, x[1, 2]]

Mathematica graphics

And so on.

D[x1Com,x[1,i]] will give zero, since there is no x[1,i] any more in x1Com. There is only x[1,1] and x[1,2] and so on.

One way could be

ClearAll[x1Com, x, m];
x1Com = HoldForm@Sum[(m[1, i]*x[1, i]), {i, 1, 6}]/HoldForm@Sum[m[1, i], {i, 1, 6}]

Mathematica graphics

Now make a function to differentiate w.r.t. to specific x[1,i]

diff[x1Com_, x_] := D[ReleaseHold@x1Com, x];

Now use it

diff[x1Com, x[1, 1]]

Mathematica graphics

diff[x1Com, x[1, 2]]

Mathematica graphics

And so on.

D[x1Com,x[1,i]] will give zero, since there is no x[1,i] any more in x1Com. There is only x[1,1] and x[1,2] and so on.

One way could be

ClearAll[x1Com, x, m];
x1Com = HoldForm@(Sum[(m[1, i]*x[1, i]), {i, 1, 6}]/Sum[m[1, i], {i, 1, 6}])

Mathematica graphics

Now make a function to differentiate w.r.t. to specific x[1,i]

diff[x1Com_, x_] := D[ReleaseHold@x1Com, x];

Now use it

diff[x1Com, x[1, 1]]

Mathematica graphics

diff[x1Com, x[1, 2]]

Mathematica graphics

And so on.

Source Link
Nasser
  • 150.3k
  • 12
  • 161
  • 374

D[x1Com,x[1,i]] will give zero, since there is no x[1,i] any more in x1Com. There is only x[1,1] and x[1,2] and so on.

One way could be

ClearAll[x1Com, x, m];
x1Com = HoldForm@Sum[(m[1, i]*x[1, i]), {i, 1, 6}]/HoldForm@Sum[m[1, i], {i, 1, 6}]

Mathematica graphics

Now make a function to differentiate w.r.t. to specific x[1,i]

diff[x1Com_, x_] := D[ReleaseHold@x1Com, x];

Now use it

diff[x1Com, x[1, 1]]

Mathematica graphics

diff[x1Com, x[1, 2]]

Mathematica graphics

And so on.