Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12424 > unrolled thread
| Started by | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| First post | 2012-11-23 08:30 +0000 |
| Last post | 2012-11-23 08:30 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: How to calculate the partial derivative? Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2012-11-23 08:30 +0000
| From | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| Date | 2012-11-23 08:30 +0000 |
| Subject | Re: How to calculate the partial derivative? |
| Message-ID | <k8nc6k$dgn$1@smc.vnet.net> |
Dear all,
I am trying to calculate the partial derivative by mathematica, I have the following commands:
L1=a1+b1*x+c1*y;
L2=a2+b2*x+c2*y;
L3=a3+b3*x+c3*y;
NN=L1*L2;
DNx=D[NN,x];
I got the following result:
DNex=b2 (a1+b1 x+c1 y)+b1 (a2+b2 x+c2 y)
How to do to have the following result?
DNex=b2*L1 + b1 * L2
Thanks,
Tang Laoya
Hi, Tang,
Try the following.
This is your definition and I denote the derivative result by expr:
L1=a1+b1*x+c1*y;
L2=a2+b2*x+c2*y;
L3=a3+b3*x+c3*y;
NN=L1*L2;
expr=DNx=D[NN,x]//Simplify
a2 b1+a1 b2+2 b1 b2 x+b2 c1 y+b1 c2 y
What you want is to exclude x and y from the final expression. Let us denote L1 and L2 by l1 and l2, and find x and y from the first and the second equations:
sol = Solve[{l2 == a2 + b2*x + c2*y, a1 + b1*x + c1*y == l1}, {x,
y}][[1]]
{x -> -((a2 c1 - a1 c2 + c2 l1 - c1 l2)/(b2 c1 - b1 c2)),
y -> -((-a2 b1 + a1 b2 - b2 l1 + b1 l2)/(b2 c1 - b1 c2))}
Now substitute it into the result:
expr /. sol // Simplify
b2 l1 + b1 l2
Have fun, Alexei
Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG
Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44
e-mail: alexei.boulbitch@iee.lu
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web