Re: How to express a Product (special case) in Mathematica?
- To: mathgroup at smc.vnet.net
- Subject: [mg59107] Re: [mg59094] How to express a Product (special case) in Mathematica?
- From: yehuda ben-shimol <bsyehuda at gmail.com>
- Date: Fri, 29 Jul 2005 00:41:46 -0400 (EDT)
- References: <200507280628.CAA12454@smc.vnet.net>
- Reply-to: yehuda ben-shimol <bsyehuda at gmail.com>
- Sender: owner-wri-mathgroup at wolfram.com
In case of non singular expression that you need to skip, dont skip it and then divide by this term. In case it is singular (as I have seen in the given site) you generate a list with 1 replacing the skipped expression and then Apply Times on the list the following is just a simple (but yet demonstrative enough) for both cases skipProd1[j_Integer] := Product[f[i], {i, 10}]/f[j](* non singular case *) skipProd2[j_Integer] := Times @@ Table[If[i == j, 1, f[i]], {i, 10}](* singular case*) regards yehuda On 7/28/05, vdavidster at gmail.com <vdavidster at gmail.com> wrote: > If you're familiar with the Lagrange interpolation polynomial, you'll > know that the coefficient term, phi, is defined as follows: > > n > phi_j (t) = TT (t - t_i) > i=0 ----------- > i!=j (t_j - t_i) > > Or in LaTeX notation: > > \phi_j(t) = \prod^{n}_{\stackrel{i=0}{i \neq j}} \frac{(t - t_i)}{(t_j > - t_i)} > > Or in graphical form: > http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html > > How do I do that in Mathematica? > How do I specify a product that skips a value in its iterator, i? (i.e. > i != j) > > Thanks! > > David > >
- References:
- How to express a Product (special case) in Mathematica?
- From: vdavidster@gmail.com
- How to express a Product (special case) in Mathematica?