Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: How to calculate the partial derivative?
Replies: 4   Last Post: Nov 23, 2012 3:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexei Boulbitch

Posts: 479
Registered: 2/28/08
Re: How to calculate the partial derivative?
Posted: Nov 23, 2012 3:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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








Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.