Message Boards Message Boards

0
|
9138 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to differentiate through a variable-size summation?

Posted 11 years ago
I have used Mathematica off and on for many years (but not a power user) and there is an important type of calculation I run into often and I have never found out how to perform it easily.  Let me give you an easy example.

Let nTot equal the total molar flow over an arbitrary size (N) summation of individual component molar flows (ni)

          N
nTot = Sum_i(ni)

Let b equal a weighted (ni/nTot) summation of terms (bi - which could be considered constants).

       N
b = Sum_i(ni * bi / nTot)

I need two important partial derivatives of this summation, 1) the individual component molar flow derivatives and 2) the partial molar derivatives.

1) Individual component molar flow derivatives

db
--- = derivative through the summation terms
dni

2) Partial molar derivatives

d(nTot * b)
----------- = derivative through the summation terms
     dni

How do I get these derivative in terms of the summation?  The answers I would like Mathematica to provide are:
    

1) Individual component molar flow derivatives

 db     1
--- = ---- (bi - b)
dni   nTot
 
2) Partial molar derivatives

d(nTot * b)
----------- = bi
     dni

Can someone help me put together a general procedure which yields the desired derivative solutions to these summation equations?

Thanks,
djvp
      
2 Replies
Is anyone willing to provide a solution or is Mathematica not capable of doing this?
Could you please post Mathematica code of what you have tried as a starting point? In the form you posted it is hard to read and understand. Usually folks post some code to start from. Thanks, Sam.
POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract