Questions tagged [products]
Questions about the use of `Product`, `NProduct`, and other types of multiplication, like `Dot`.
109
questions
1
vote
0
answers
47
views
Plot of some complicated functions containing special functions under both Sum and Product
I am trying to plot the $|f(\theta,\phi)|^2$, where the expression of $f(\theta,\phi)$ is as under:
$$ f =\sum_{n_j}\Pi_{j_x,j_y,j_z}P_{n_j}\sum_{l}A_s \text{e}^{-ia(l_1q_x+l_2q_y+l_3q_z)}\times
\...
1
vote
0
answers
65
views
Taking the derivative of a product
EDIT: see here
I am new to Mathematica and I am trying to work though deriving the maximum likelihood estimator for the Poisson distribution as an exercise to familiarize myself with how Mathematica ...
0
votes
0
answers
77
views
Kronecker Product for arbitrary number of spins
I want to write a function that can perform the following kronecker product:
...
1
vote
2
answers
254
views
How to define replacement rule for Minkowski inner product
following question,
I have an expression that consists of several Minkowski inner products between 2 four vectors written as in Mathematika:
...
4
votes
2
answers
147
views
Symmetric product
Let define the full symmetrization of a tensor $e_1 \otimes ... \otimes e_N$ by
$$ Sym : e_1 \otimes ... \otimes e_N \rightarrow \frac{1}{N!} \sum_{\pi \in S_N} e_{\pi^{-1} (1)} \otimes ... \otimes e_{...
1
vote
2
answers
109
views
Simplify a fraction of symbolic product
How can I convince mathematica to simplify the ratio of these two symbolic products. You can see that the terms in the denominator are present in the numerator.
...
2
votes
1
answer
69
views
2
votes
1
answer
90
views
Dropping non-commutative product in the end
Suppose my expressions are given as a combinations of non-commutative products, i.e., $2 X**Y**Z + 3 Y**Z**X$, I want to make this as commutative product and get $5 X**Y**Z$. And want similar things ...
0
votes
1
answer
58
views
Symbolic re-assignment of products
Suppose I have some symbolic tensors $X,Y$ and I want to assign
X.Y
into something else without specifying what $Y$ is. For example, I may want $Y$ to serve as ...
6
votes
2
answers
202
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 ...
1
vote
3
answers
69
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 ...
0
votes
1
answer
588
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 ...
4
votes
1
answer
197
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, ...
5
votes
2
answers
285
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?
2
votes
0
answers
76
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??
0
votes
1
answer
67
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 < ...
1
vote
0
answers
67
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^{(\...
2
votes
2
answers
270
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}}...
2
votes
1
answer
151
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 ...
1
vote
2
answers
61
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?
1
vote
1
answer
50
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 ...
0
votes
0
answers
103
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 ...
5
votes
2
answers
299
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 ...
1
vote
3
answers
173
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 ...
1
vote
2
answers
55
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 ...
0
votes
0
answers
43
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 ...
1
vote
0
answers
179
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 ...
2
votes
1
answer
157
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 ...
1
vote
0
answers
824
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 ...
1
vote
0
answers
149
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]]
...
1
vote
1
answer
72
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 ...
2
votes
0
answers
55
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
...
5
votes
1
answer
107
views
How can I tell `Dot` to behave automatically linear?
I would like the number $a$ to be taken out:
...
12
votes
0
answers
261
views
Why is Product[1 + 1/k^5, {k, 1, Infinity}] equal to zero in 12.1?
Bug introduced in 12.1. Fixed in 12.2.
In all versions up to 12.0 it is
...
1
vote
1
answer
111
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
...
3
votes
1
answer
79
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 ...
8
votes
2
answers
288
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
...
4
votes
3
answers
415
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" ...
9
votes
2
answers
221
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 ...
1
vote
0
answers
118
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
...
1
vote
0
answers
65
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 ...
11
votes
1
answer
265
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 ...
1
vote
1
answer
238
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....
1
vote
2
answers
138
views
2
votes
1
answer
83
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 ...
1
vote
1
answer
210
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 ...
11
votes
1
answer
273
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 ...
0
votes
1
answer
153
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 ...
2
votes
1
answer
82
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 ...
1
vote
3
answers
86
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 ...