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
1
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: 87
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.
 

FAQ: Creating a Summation Expression with k and m Variables

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.

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.

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.

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.

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

Replies
2
Views
8K
Replies
1
Views
3K
Replies
5
Views
1K
Replies
44
Views
6K
Replies
2
Views
2K
Replies
3
Views
2K
Back
Top