Computing Inner Product of f_1 Using Maple Procedure

In summary, the conversation is about writing a Maple procedure for the variational principle in quantum mechanics and finding the integral of a given function over a specific domain. The answer obtained through Maple's code is an approximate value, which may differ from the exact answer.
  • #1
latentcorpse
1,444
0
so I'm writing a maple procedure for the variational principle in quantum mechanics.

i have a function [itex]f_1(x,\alpha)=\cos{\alpha x}[/itex] for [itex]|x| \leq \frac{\pi}{2 \alpha}[/itex] and i need to compute [itex]\left \langle f_1 | f_1 \right \rangle[/itex]

i have the code:

restart;
assume(x,real);
assume(hbar,positive);
assume(omega,positive);
assume(e,positive);
assume(alpha,positive);
assume(m,positive);
f1:=cos(alpha*x);
conjf1:=conjugate(f1);
normaliseint:=int(conjf1*f1,-Pi/(2*alpha)..Pi/(2*alpha));

now the andwer should be [itex]\frac{\pi}{2}[/itex] (i did it by hand) but Maple keeps giving me

[itex]1/2\, \left( 2\,\cos \left( 1/2\,{\frac {\pi }{{\it \alpha}}} \right)
\sin \left( 1/2\,{\frac {\pi }{{\it \alpha}}} \right) {\it \alpha}+\pi
\right) {{\it \alpha}}^{-1}[/itex]

any ideas?
thanks.
 
Physics news on Phys.org
  • #2
The answer you are getting is correct. When you integrate a function over a finite domain, the integral will not necessarily be equal to the exact answer. The answer you got is the approximate integral of the function over the given domain.
 
  • #3


I would first commend you for using a computational tool like Maple to assist in your research on the variational principle in quantum mechanics. It is important to embrace technology in scientific research to increase efficiency and accuracy.

In regards to your question, the inner product of f_1 can be computed using the Maple procedure as follows:

1. First, we need to define the function f_1(x, alpha) in Maple using the "f1" variable. This can be done using the ":= " operator as shown in your code.

2. Next, we need to define the conjugate of f_1, which can be done using the "conjugate" function in Maple. This will be stored in the "conjf1" variable.

3. Then, we can compute the inner product using the "int" function in Maple, which represents the integration symbol. The limits of integration should be set to -Pi/(2*alpha) and Pi/(2*alpha) as shown in your code.

4. Finally, we can simplify the expression using the "simplify" function in Maple. This will give us the desired result of pi/2.

It is important to note that the result may appear different from what you calculated by hand due to the nature of symbolic computation. However, the result is mathematically equivalent and accurate.

I hope this helps in your research and further exploration of quantum mechanics. Keep up the good work!
 

What is the purpose of computing inner product of f_1 using Maple procedure?

The purpose of computing inner product of f_1 using Maple procedure is to find the angle between two vectors or to determine the projection of one vector onto another. It is a useful tool in linear algebra and can also be used in other areas of math and science.

How do I use Maple to compute the inner product of f_1?

To use Maple to compute the inner product of f_1, you will need to define the two vectors and then use the innerproduct() function. The function takes in two vectors as parameters and returns the inner product as the output.

What are the advantages of using Maple to compute the inner product of f_1?

There are several advantages of using Maple to compute the inner product of f_1. Maple is a powerful mathematical software that can handle complex calculations and can provide accurate results. It also allows for easy manipulation and visualization of the vectors and their inner product.

Can I compute the inner product of f_1 using other software or by hand?

Yes, you can compute the inner product of f_1 using other software such as MATLAB or by hand using the dot product formula. However, using a software like Maple can save time and reduce the chances of making errors in the calculation.

Are there any limitations to computing the inner product of f_1 using Maple?

There are no specific limitations to computing the inner product of f_1 using Maple. However, the accuracy of the result depends on the precision of the input vectors and the computational capabilities of your computer.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
991
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
344
  • Introductory Physics Homework Help
Replies
5
Views
470
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Advanced Physics Homework Help
Replies
24
Views
809
  • Advanced Physics Homework Help
Replies
3
Views
888
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
5K
  • Calculus and Beyond Homework Help
Replies
3
Views
561
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top