Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12420
| From | Tang Laoya <tanglaoya1989@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to calculate the partial derivative? |
| Date | 2012-11-22 09:41 +0000 |
| Message-ID | <k8ks07$858$1@smc.vnet.net> (permalink) |
| References | <k8jss7$5nl$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
Dear all,
Sorry for my unsuitable example. My final program is as follows, could anyone please help me to take a look at it?
Thanks,
Tang Laoya
Clear["Global`*"];
L1 = (a1 + b1 x + c1 y + d1 z)/6/V;
L2 = (a2 + b2 x + c2 y + d2 z)/6/V;
L3 = (a3 + b3 x + c3 y + d3 z)/6/V;
L4 = (a4 + b4 x + c4 y + d4 z)/6/V;
nod = 10;
NN = Table[0, {nod}];
NN[[1]] = L1 (2 L1 - 1);
NN[[2]] = L2 (2 L2 - 1);
NN[[3]] = L3 (2 L3 - 1);
NN[[4]] = L4 (2 L4 - 1);
NN[[5]] = 4 L1 L2;
NN[[6]] = 4 L2 L3;
NN[[7]] = 4 L3 L1;
NN[[8]] = 4 L3 L4;
NN[[9]] = 4 L4 L1;
NN[[10]] = 4 L2 L4;
NNT = Flatten[Table[NN[[i]], {i, 1, nod}]];
Print["Dimensions of NNT:", Dimensions[NNT]];
DNx = D[NNT, x]
(* How to do to let the DNx have such express? For example, DNx[[1]] = b1/6/V*(2*L1-1) + L1*b1/3/V *)
DNy = D[NNT, y]
DNz = D[NNT, z]
DNxx = Transpose[{DNx}].{DNx};
DNyy = Transpose[{DNy}].{DNy};
DNzz = Transpose[{DNz}].{DNz};
Print["Dimensions of DNxx:", Dimensions[DNxx]];
K = DNxx + DNyy + DNzz;
(* I wish to replace all express "L1^aa*L2^bb*L3^cc*L4^dd" in matrix K by "aa!*bb!*cc!dd!/((aa+bb+cc+dd+3)!)*6*V", how to do? in the express, the aa, bb, cc or dd could be ZERO *)
K = Expand[K];
Print["Simplifying K"];
K = Simplify[K]
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to calculate the partial derivative? Tang Laoya <tanglaoya1989@gmail.com> - 2012-11-22 00:50 +0000
Re: How to calculate the partial derivative? Tang Laoya <tanglaoya1989@gmail.com> - 2012-11-22 09:41 +0000
Re: How to calculate the partial derivative? Tang Laoya <tanglaoya1989@gmail.com> - 2012-11-23 08:35 +0000
csiph-web