MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to calculate the partial derivative?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128752] Re: How to calculate the partial derivative?
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Fri, 23 Nov 2012 03:28:14 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@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 at iee.lu







  • Prev by Date: Re: How to calculate the partial derivative?
  • Next by Date: Delay DAEs
  • Previous by thread: Re: How to calculate the partial derivative?
  • Next by thread: Notice of New Presentations Update