Computing Numerical Integrals with Maple

In summary, the speaker is new to Maplesoft software and is having trouble computing numerical integrals. They have defined mathematical functions using variables and used "subs" to input values. However, when they try to integrate the output, they only get the unevaluated integral. They are looking for assistance or suggestions on how to improve their approach. Another person suggests starting with a simpler example to better understand the software. Finally, there is a suggestion to try using "evalf" without integration to ensure there is only one variable present.
  • #1
WWCY
479
12
Hi all, I am new to the Maplesoft software and have been experiencing trouble computing numerical integrals.

I defined a few mathematical functions in terms of a few variables like so:
Screen Shot 2018-04-07 at 12.41.48 AM.png

I then used "subs" to input values to anything that isn't already a defined constant (like ##\hbar,\pi## and all that) into my function Psisq.

I took the entire chunk of the resulting output and placed it into evalf( int( output, x=-infinity..infinity ) ) but all I got was the unevaluated integral rather than a number.

Could anyone assist or even suggest a better way? Many thanks in advance!
 

Attachments

  • Screen Shot 2018-04-07 at 12.41.48 AM.png
    Screen Shot 2018-04-07 at 12.41.48 AM.png
    17.8 KB · Views: 1,282
Physics news on Phys.org
  • #2
Maybe you should start with something a little bit less complicated to learn how this all works.
 
  • #3
Dr.D said:
Maybe you should start with something a little bit less complicated to learn how this all works.
Thanks
 
  • #4
Maybe just evalf(output) without integration to make sure you only have 1 variable now.
 

Related to Computing Numerical Integrals with Maple

1. How can I use Maple to compute numerical integrals?

To use Maple for computing numerical integrals, you can use the built-in function int followed by the function or expression you want to integrate and the limits of integration. For example, to compute the integral of x^2 from 0 to 2, you would use the command int(x^2, x = 0..2). Maple will then provide the numerical result of the integral.

2. What is the advantage of using Maple for computing numerical integrals?

Maple is a powerful computational software that can handle complex mathematical expressions and functions. It also has built-in algorithms and methods for computing integrals, making it a reliable tool for numerical integration. Additionally, Maple provides visual representations of the results, making it easier to understand and verify the computations.

3. Can Maple handle improper integrals?

Yes, Maple can handle improper integrals by using the int function with the proper limits of integration. For example, to compute the integral of 1/x from 1 to infinity, you would use the command int(1/x, x = 1..infinity). Maple will then provide the numerical result of the improper integral.

4. How accurate are the results of numerical integrals computed with Maple?

The accuracy of the results depends on the complexity of the function or expression being integrated and the method used by Maple. Generally, Maple uses adaptive numerical integration methods that provide accurate results for most functions. However, it is always recommended to check the accuracy of the results by using different methods or increasing the number of integration points.

5. Can I save and export the results of numerical integrals computed with Maple?

Yes, you can save and export the results of numerical integrals computed with Maple in various formats, such as text, Maple worksheet, and PDF. This allows you to keep a record of your computations and use them for further analysis or presentations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
747
Replies
2
Views
208
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Computing and Technology
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top