Creating a Summation Expression with k and m Variables

In summary, the conversation discussed different ways to write a similar code to produce a specific output. The first code shown was \sum_{p^{m} \le x \atop \text{p is prime }m \ge 1 }, which could use some improvement in spacing and sizing. Another code suggested was \sum_{\substack{p^{m} \le x \\ \text{p is prime }m \ge 1}}, which utilizes the substack command and allows for better alignment. Additionally, the conversation mentioned the subarray environment as another option for aligning subscripts.
  • #1
alyafey22
Gold Member
MHB
1,561
0
How to write something similar to the following

View attachment 1121

Or is it better to write

\(\displaystyle \sum_{n=k ,m=1}^{k+1}\)
 

Attachments

  • multi-indexed sum.PNG
    multi-indexed sum.PNG
    1.4 KB · Views: 71
Last edited:
Physics news on Phys.org
  • #2
Try this syntax that produces the following output:

\large \sum_{p^{m} \le x \atop \text{p is prime }m \ge 1 }

\(\displaystyle \large \sum_{p^{m} \le x \atop \text{p is prime }m \ge 1 } \)

The spacing and sizing could use a little work but it's a good start for now.

EDIT: Just found another one on the same page. Try this code as well:

\large \sum_{\substack{p^{m} \le x \\ \text{p is prime }m \ge 1}}

\(\displaystyle \large \sum_{\substack{p^{m} \le x \\ \text{p is prime }m \ge 1}}\)
 
  • #3
There is also the subarray environment, which is similar to the regular array environment. It allows aligning the subscripts left or right.

\atop is a plain TeX command.
 

Related to Creating a Summation Expression with k and m Variables

1. How can I create a summation expression with multiple variables?

To create a summation expression with multiple variables, you can use the "sigma" notation, which is represented by the Greek letter sigma (Σ). The summation is written as Σi=1n f(xi), where f(x) is the function to be summed, i is the index variable, and n is the number of terms in the summation.

2. Can I use different variables in the upper and lower limits of the summation?

Yes, you can use different variables in the upper and lower limits of the summation. For example, the summation Σi=1n f(xi) can be written as Σk=1m f(xk), where k and m are different variables.

3. What is the purpose of using k and m variables in a summation expression?

The use of k and m variables in a summation expression allows for the flexibility to represent different values or terms in the summation. It also makes the expression more concise and easier to read.

4. Can I use more than two variables in a summation expression?

Yes, you can use more than two variables in a summation expression. The number of variables used will depend on the complexity of the summation and the number of terms that need to be represented.

5. How can I evaluate a summation expression with multiple variables?

To evaluate a summation expression with multiple variables, you can assign specific values to the variables and then perform the summation. For example, if you have the expression Σk=1m k2, you can evaluate it by assigning values to k, such as k=1, k=2, etc., and then summing up the terms to get the final result.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
8K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • Calculus
Replies
5
Views
1K
  • General Math
Replies
5
Views
966
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
634
Replies
5
Views
1K
Replies
26
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
44
Views
5K
Back
Top