Message Boards Message Boards

0
|
3318 Views
|
3 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Use Simpson2D rule?

Posted 5 years ago

I want to know how to use Simpson2D rule. I got confused, because on http://mathfaculty.fullerton.edu/mathews/n2003/simpsons2Drule/SimpsonsRule2DMod/Links/SimpsonsRule2DMod_lnk_5.html it gives the rule as Simpson2D[a,b,c,d,m,n] where c, d are lower and upper limits of the integration dx, and a, b are lower and upper limits of the integration dy. From the context it seems the function must be in the form of f(x,y). However, when I use the rule, to find out

va1=Simpson[a,b, c. d,m, n],
a=0, b=1.26, c=0.17,d=0.44, m=10,n=10

I got an answer

Smpson2D[1, 1.2, 0.17, 0.44, 10, 10]

I want to know: 1. how to specify the function, does it have to have the form f(x,y) 2. How to write the syntax. For example, if f(x,y)= Sin[x] Cos[y], integrate from x=0 to 1, from y=0.1 to 0.2. how to write the syntax so that I can get a numerical answer answer. This is my actual file. Only the last 6 entries deals with the use of Simpson2D Your help will be much appreciated. Hong-Yee Chiu, hongychiu@gmail.com

Attachments:
POSTED BY: Hong-Yee Chiu
3 Replies

Follow the link you shall see this page for all required packages. Click

Numerical Analysis-Numerical Methods Mathematica 5.0 Notebooks

Download the package from Wolfram Library and upzip the compressed folder. Find

NumericalMethodsMathematica2006/0714SimpsonsRule2D

There you go! The code is compatible with the latest version of Wolfram Language V 12.

sample

POSTED BY: Shenghui Yang
Posted 5 years ago

Shenghui Yang: Thank you, your fast response is much appreciated,

POSTED BY: Hong-Yee Chiu
Posted 5 years ago

It works fine. Thanks for prompt and accurate reply.

POSTED BY: Hong-Yee Chiu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract