Using Variables in Maple for Quantum Calculations and Fourier Analysis

  • Context: Maple 
  • Thread starter Thread starter Lyuokdea
  • Start date Start date
  • Tags Tags
    Maple
Click For Summary

Discussion Overview

The discussion revolves around using variables in Maple for quantum calculations and Fourier analysis, specifically focusing on how to assign properties to variables such as being integers or multiples of 2Pi to streamline calculations and improve the presentation of results.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about how to assign variables in Maple to specific types, such as integers or real numbers, to facilitate quantum calculations involving Fourier analysis.
  • Another participant suggests that Maple automatically handles variable types and provides examples of how to define variables and use them in expressions.
  • A participant clarifies that they want to keep the variable in symbolic form (e.g., n) while ensuring that it is treated as an integer to avoid complications in integration involving cosine factors.
  • A later reply introduces the use of the 'assume' command in Maple to specify that a variable is an integer, which can help achieve the desired results in calculations.

Areas of Agreement / Disagreement

Participants express different levels of understanding regarding the automatic handling of variable types in Maple. There is no consensus on the best approach to achieve the desired results, as some participants provide solutions while others seek clarification.

Contextual Notes

There are mentions of subtle differences between Pi and pi in Maple, which may affect the results. The discussion does not resolve how these differences impact the calculations.

Who May Find This Useful

This discussion may be useful for users of Maple who are working on quantum calculations and Fourier analysis, particularly those interested in variable assignments and mathematical representation in their computations.

Lyuokdea
Messages
154
Reaction score
0
Is there anyway to use a variable in Maple but assign the variable to be an integer, or a multiple of 2Pi, or to be a real number, or anything like that?

For instance, I want to do a quantum calculation, involving Fourier analysis, but I want the computer to know that the n's and m's I'm inputting need to be integers, otherwise I get cos(n*x) factors flying around, how do I make this look nicer?

~Lyuokdea
 
Physics news on Phys.org
I don't quite understand the problem. This should be basically automatic in maple.

If for instance you write

n := 2;
cos(n*x);

you should see nice-looking formulas. For multiples of pi, use

n := 2 * Pi;

There are some subtle differences between Pi and pi in maple, if you don't like the results you get with one, try the other.
 
right, but I don't want n to be 2, I want to see the results in terms of n, so that I know which factors are coming up, but I want it to assume n is an integer so that it integrates without a bunch of messy cos factors that will either be 1 or 0.

~Lyuokdea
 
Lyuokdea said:
right, but I don't want n to be 2, I want to see the results in terms of n, so that I know which factors are coming up, but I want it to assume n is an integer so that it integrates without a bunch of messy cos factors that will either be 1 or 0.

~Lyuokdea
You can do this with the assume command :
>assume(n, integer);
>cos(n*Pi);
result : (-1)^n
 
sweet, thanks man

~Lyuokdea
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K