Questions tagged [products]

Questions about the use of `Product`, `NProduct`, and other types of multiplication, like `Dot`.

Filter by
Sorted by
Tagged with
5 votes
2 answers
192 views

How to type following expression in Mathematica

I want to eneter following expression in mathematica $$\prod_a^3 \prod_{b\neq a}^3 \frac{x(a)}{b-a}$$ How is this extra condition in product entered in Mathematica? Without the restriction, I would ...
user avatar
1 vote
3 answers
57 views

Digits product and an iteration process

I would like to create a code which gives me the square of the product of the digits of a number, with the only rule that if a number has a 0, then it doesn't count in the product (for example, if the ...
user avatar
0 votes
1 answer
90 views

dot product and norm [closed]

Can you solve the following problem in mathematica program? Thank you. Let x=(x1,x2,x3),y=(y1,y2,y3) and ⟨x,y⟩=x1y1+2x2y2+x3y3 be an inner product in a three-dimensional real vector space. Define the ...
user avatar
4 votes
1 answer
134 views

Numeric evaluation of a matrix product integral

Working on a problem in quantum mechanics, I rediscovered a notion of a product integral, which I was not familiar with before. In a simple case, when the integrand is a real-valued scalar function, ...
user avatar
5 votes
2 answers
222 views

How to handle excluded values in a summation or product in Mathematica

I want help to writ that on Wolfram Mathematica : How can I handle the $i \ne j$ part?
user avatar
2 votes
0 answers
73 views

dot product of one thousand matrices [closed]

I have a time dependent matrix. In a thousand different times with the same time intervals I get the values of the matrices. Now, how can I DOT Product these thousand matrices in time order??
user avatar
0 votes
1 answer
54 views

Partial derivative of n-variables product [duplicate]

I am new to Mathematica. I would like to calculate the partial derivative of the product, $\frac{\partial}{\partial x_{j}} y \prod _{i=1}^{n}x_{i}^3=\frac{3}{x_j} y \prod_{i=1}^nx_i^3$, where $1 < ...
user avatar
  • 123
1 vote
0 answers
57 views

How to create this list

Suppose I have two kinds of operators $a[i,j],a^\dagger[i,j]$ where i is a non-negative integer and $j=\pm 1$, I want to create a list containing all possible products of $ a^{(\dagger)}[x_1,j_1]a^{(\...
user avatar
  • 51
2 votes
2 answers
86 views

Overwrite a tensor product notation a_\[TensorProduct]b_ := KroneckerProduct[a, b]

I noticed that the definition of KroneckerProduct and For example TensorProduct[({ {0, 1}, {1, 0} }), ({ {0, 1}, {1, 0} })] Output: {{{{0,0},{0,0}}...
user avatar
  • 823
2 votes
1 answer
145 views

define edge set of a graph

I want to define a graph in Mathematica which its vertex set is cartesian product of two sets. I define the vertex set by Tuple[] but two vertices are adjacent if and only if the intersection of the ...
user avatar
  • 33
1 vote
2 answers
53 views

Transform a Matrix as an expression

If I have a matrix that I know it can be written as (xi.xi)*KroneckerProduct(H,xi), where xi and H are vectors. Is there a way to obtain this expression from a given matrix?
user avatar
  • 41
1 vote
1 answer
47 views

Guess the next number formula [closed]

I have a sequence of numbers such as {1,2,4,8,16} The goal is to create a polynomial f(x) such that: f(0)=1, f(1)=2, f(2)=4, f(n)=nth item on the list I found this function which claims to do exactly ...
user avatar
  • 676
0 votes
0 answers
63 views

Cancel common factors in symbolic product

Suppose I have the following function G[n_, k_] := Product[g[n + i]/g[i], {i, 0, k}] where $n,k$ are assumed to be natural numbers and $g$ is a nonzero symbolic ...
user avatar
5 votes
2 answers
285 views

How to plot multifactorial function?

The multifactorial function can be extended to the reals (see TheSimpliFire answer) like so: It follows that we can extend the multifactorial function to the reals ...
user avatar
1 vote
3 answers
163 views

How to factorize $f(x,y)$ into $f_1(x)f_2(y)$? [duplicate]

Suppose we have a real function $f:\mathbb R^2 \rightarrow \mathbb R$ and we would like to know if this function factorizes into $f(x,y)=f_1(x)f_2(y)$ for some real functions $f_1,f_2$. Is there an ...
user avatar
1 vote
2 answers
48 views

Multiplication with custom notation

I would like to compute the product $$(Es+r_{13})(F_{13}s)(F_{3}s+r_{3})(F_{2}s+r_{2})(F_{12}s+r_{12})(F_{1}s+r_{1})(F_{23}s+r_{23})$$ where $E$, $F_i$, and $r_i$ represent arbitrary numbers whose ...
user avatar
0 votes
0 answers
40 views

The command Total sums the entries of a list, is there a comparable command for the product of entries of a list? [duplicate]

I recently just found out about the command Total that gives the sum of a list. Was wondering whether there's an analogue that gives the product of the entries of a list? I see that there is the ...
user avatar
0 votes
0 answers
75 views

How To Define An Outer Product (in xAct)?

I am working with xAct / xCoba / xTras and I would like to construct a matrix out of a vector. So, I have a vector V on a manifold ...
user avatar
  • 151
2 votes
1 answer
95 views

Plotting list data of cross product of field vectors

I have some experimental data points of electric Ey(t, value) and magnetic field Hz(t, value). I am trying to calculate the ...
user avatar
1 vote
0 answers
446 views

How to prove the Grassmann identity in vector form? [closed]

I am given the following question: Show that for all vectors a,b,c the Grass-mann identity holds: $$ a\times (b\times c)\text {=} (a\cdot c)b - (a\cdot b)c $$ I have tried entering the above identity ...
user avatar
  • 111
1 vote
0 answers
111 views

partial derivative of sum and product

I would like to compute $\frac{\partial}{\partial f_i} \prod_{j=1}^N f_j$, where $1\le i\le N$. By typing e.g. F[f_] = Product[f[i], {i, 1, N}] D[F[f], f[1]] ...
user avatar
  • 133
1 vote
1 answer
70 views

Need to verify strange behavior with Product[]

I'm running 12.1.0.0 on MacOS X x86 (64-bit). The expression Product[1 - 1/n^5, {n, 2, Infinity}] yields 0 as output, which is ...
user avatar
  • 1,917
2 votes
0 answers
49 views

How to calculate the numerical integration of the product of two entries of an exponential matrix? [closed]

Lets define a $6\times6$ matrix $M(t)$ with entries $m_{ij}$ as ...
user avatar
  • 731
5 votes
1 answer
102 views

How can I tell `Dot` to behave automatically linear?

I would like the number $a$ to be taken out: ...
user avatar
  • 155
10 votes
0 answers
230 views

Why is Product[1 + 1/k^5, {k, 1, Infinity}] equal to zero in 12.1?

In all versions up to 12.0 it is ...
user avatar
1 vote
1 answer
38 views

Multiplying two expressions with a specific function, efficiently

Paraphrasing, the problem I am trying to solve is the following. I am given two "matrix valued" sums ...
user avatar
  • 180
3 votes
1 answer
62 views

Using the elements of one Matrix to form a new Matrix with specified rules

Given a matrix [a], how to get matrices [b] and [c] based on the following two rules? rule [a]->[b]: Strike out corresponding term in [a] and take product of the remaining two terms in the same ...
user avatar
  • 663
8 votes
2 answers
209 views

How to simplify Sum's and Product's of arbitrary length?

I would expect Sum[Subscript[x,i], {i, 1, n}] + Sum[-Subscript[x,i], {i, 1, n}] and ...
user avatar
4 votes
3 answers
406 views

Smoother ways for setting up a Product function with j=0 and j != i

I want to implement a Product function, particularly the Lagrange polynomial $\ell_{i}(x)=\prod_{j=0 \atop j \neq i}^{n} \frac{x-x_{j}}{x_{i}-x_{j}}$ Are there ways to implement the "not equal" ...
user avatar
  • 65
9 votes
2 answers
194 views

Closed form of product of Gamma function

Mathematica recognizes this closed form \begin{align} \prod_{k=1}^{n-1}\sin(\pi k/n) &= 2^{1-n}\,n \end{align} just fine: but fails on this one despite that this expression also has a known ...
user avatar
  • 193
1 vote
0 answers
88 views

Simplifying the dot product [closed]

Why does the code D[x.x, x] /. {1. x -> x, x .1 -> x} gives 1.x+x.1, while ...
user avatar
  • 641
1 vote
0 answers
60 views

How to evaluate an expression [closed]

I have a 3-dimensional array of numbers say A. I want to evaluate the following expression. $\displaystyle\sum_{\sigma,\tau \in S_6}(\Pi_{i=1}^6A(i,\sigma(i),\tau(i)))$. $S_6$ is the symmetric group ...
user avatar
  • 111
11 votes
1 answer
254 views

Why is this product equal to zero, when the correct result is 2+GoldenRatio?

Consider the following product $$ \prod _{k=2}^{\infty } \frac{1}{1-\frac{\left(\frac{1}{2} \left(\sqrt{5}-1\right)\right)^k}{1-\left(\frac{1}{2} \left(\sqrt{5}-1\right)\right)^{2 k}}}$$ Mathematica ...
user avatar
1 vote
1 answer
142 views

How to multiply the elements of each site of tensor products to each other while using symbolic representation?

If I have, say three sites in a symbolic operator which is of the form A = a⊗1⊗c and I want it to act on another operator B = a1⊗b⊗1 in order to find the commutator A.B - B....
user avatar
  • 13
1 vote
2 answers
99 views

Combining "Product" and "If"

...
user avatar
2 votes
1 answer
80 views

Product from max to min [closed]

Product[f[i], {i, 1, 4}] gives us f[1] f[2] f[3] f[4] Is there any way I can take the product it will give something ...
user avatar
1 vote
1 answer
147 views

Series of a product of series

I am writing a code where I have to multiply large series truncated at some order, say 100. As a result I want again a series up to order 100, and I want to get it in the fastest way. I have tried a ...
user avatar
11 votes
1 answer
251 views

How to calculate $\prod\limits_{p}\frac{p^2+1}{p^2-1}$?

When I input $$ \prod _{p=2}^{\infty } \text{If}\left[\text{PrimeQ}[p],\frac{p^2+1}{p^2-1},1\right] $$ in Mathematica 12.0, it gives out the value $1$. The result is ridiculous, for that according to ...
user avatar
  • 225
0 votes
1 answer
91 views

Return last value of While function

I want to make a function that performs a multiplication with Inner i number of times using a ...
user avatar
2 votes
1 answer
72 views

Set default product

I want to set a default product in Mathematica in place of the standard product. Specifically, I want to change the standard product for CenterDot so that when I ...
user avatar
1 vote
3 answers
84 views

Summation and product term expressed in Mathematica [duplicate]

I have the following term which I would like to express correctly in Mathematica: $$\sum_{i=1}^{m}\frac{1}{\prod_{j=1,j\neq i}^m(\rho_i-\rho_j)}$$ This means that for $m=3$ for example you should ...
user avatar
  • 181
5 votes
2 answers
161 views

How to write down a product with omitted terms?

I have the following term which I would like to express correctly in Mathematica: $$ \prod_{j=1,j\neq i}^m(\rho_i-\rho_j) $$ Can you please help?
user avatar
  • 181
3 votes
1 answer
518 views

Outer (dyadic) product between vectors of the same index in two lists

I have two lists of vectors and I want to take the outer product between elements in the lists of the same index. Using either Outer or TensorProduct works for e.g. the first two indices: ...
user avatar
1 vote
2 answers
91 views

Where is the "mistake in the recursion" while there is no recursion? [closed]

So my code is as follows xi = Exp[2*Pi I/13] tauA = xi + xi^(-1) sigma[tau_, n_] := tau^n Product[(x - sigma[tauA, i]), {i, 3, 8}] // FullSimplify This should ...
user avatar
  • 115
3 votes
1 answer
211 views

How to create a dot product version of the product function

I would like to create a function to matrix multiply (dot product) n matrices together, where n is large, for example M1*M2*M3*M4*M5*...*Mn I know there is the 'product' function that can do this ...
user avatar
2 votes
1 answer
41 views

How to PowerExpand a generic Product?

I have: PowerExpand[Log[Product[f[i], {i, 1, n}]]] // InputForm (* Output: Log[Product[f[i], {i, 1, n}]] *) However, I would expect to get the following as the ...
user avatar
3 votes
4 answers
493 views

Dot product result has wrong dimension [closed]

I'm doing a small project and I've encountered a problem while using Mathematica. I should mention that I'm kinda new to this software, so maybe it's just something I haven't grasped yet. Anyway, I ...
user avatar
  • 35
4 votes
2 answers
191 views

Why does this simple ratio of products not simplify?

Why does this ratio of products not Simplify to a[n]? Clear[a,k,n] $Assumptions={n>1} Simplify[ Product[a[k], {k, 1, n}] / Product[a[k], {k, 1, n - 1}] ] ...
user avatar
  • 847
2 votes
2 answers
239 views

Sums of products with $ n $ variables

I want to be able to compute a function of $ n $ indices which looks as follows if $ n>2 $: $$ \sum_{(i=1,j=1,k=1,l=1,...), (i\neq j\neq k \neq l \neq ...)}^{n} x_{i}x_{j}(x_{k}^2+y_{k}^2)(x_{l}^...
user avatar
1 vote
2 answers
310 views

Calculating the series expansion of a theta function

I have defined the q-theta function as follows: $$\theta(x;q) = \prod_{k=0}^{\infty} (1-q^k x)(1-q^{k+1}/x)$$ I want to calculating, using this, the series expansion of the following series: $$\...
user avatar
  • 203