Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

RE: differentiation of a product

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37154] RE: [mg37137] differentiation of a product
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 13 Oct 2002 05:56:49 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Luca,

It looks like Mathematica doesn't implement the Leibniz rule on indefinite
products. Here is my attempt to implement it. I hope I haven't slipped up.
You may get some other better answers. I am not going to paste in all the
output because you can duplicate it in your own notebook.

First I define your f, separating the parameters from the variable s.

f[a_, b_, n_][s_] := Product[a + b*Exp[s*x[i]], {i, 1, n}]

You could differentiate with respect to s by

f[a,b,n]'[s]

but Mathematica doesn't evaluate. However, if you specify an integer for n,
Mathematica will evaluate.

f[a,b,3]'[s]

For a symbolic differentiation, I wrote the following routine.

LeibnizD::usage =
    "LeibnizD[product, x] will differentiate an indefinite product
expression \
with respect to x using the Leibniz rule. The product must be of the form \
Product[factor, {iter, min, max}].";
LeibnizD[p_Product, x_] :=
  Module[{factor, term, piter, pmin, pmax},
    {piter, pmin, pmax} = Rest[p];
    factor = First[p];
    term = (D[factor, x])/factor ;
    p Sum[term // Evaluate, {piter, pmin, pmax} // Evaluate]]

Then the following gives the differentiation in terms of the original
product times a sum.

LeibnizD[f[a, b, n][s], s]

Checking one case..

f[a, b, 3]'[s] == (LeibnizD[f[a, b, n][s], s] /. n -> 3) // Simplify
True

And if it correct for one case it must be correct for all. Right?

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


From: Luca [mailto:bosatta at ftnetwork.com]
To: mathgroup at smc.vnet.net

How do I evaluate this product in mathematica:
f[s_]=Product[a+b*Exp[s*x[i]],{i,1,n}] ?

D[f[s],s] does not evaluate the terms.




  • Prev by Date: Re: The Essence of Mathematica
  • Next by Date: RE: ParametricPlot Question
  • Previous by thread: differentiation of a product
  • Next by thread: ParametricPlot Question