How to use the Simpson 1/3 rule to write this program

• To: mathgroup at smc.vnet.net
• Subject: [mg76104] How to use the Simpson 1/3 rule to write this program
• From: Evanescence <origine26 at yahoo.com.tw>
• Date: Wed, 16 May 2007 05:33:30 -0400 (EDT)

```Hello Dear all:
My questions are as follows:
First I have some functions are as follows:
K[z_,x_] is a function of z and x.
B[x_,y_] is a function of x and y.
F[x_] is a function of x.
Z[x_] is a function of x.
A[x_,y_] is a function of x and y.
G[x_] is a function of x.
U[x_] is a function of x.

Then I have a integration as follows:
L[x_,y_,z_]:=(x*K[z,x])*(B[x,y]*F[x]*Z[x]+2*(A[x,y]-B[x,y]*G[x])*U[x])
L[x,y,z] integrate to x , and the upper limit is 32 , the lower limit
is 0
So the integration form actually is a function of y and z.

Now I want to use Simpson 1/3 rule to repreaent the integration , so
the integration becomes as follows
(Assume I use the division is 1/2)
W[y_,z_]:=(1/3)*(32-0/64)*(0+4(((1/2)*K[z,
1/2])*(B[1/2,y]*F[1/2]*Z[1/2]+2*(A[1/2,y]-B[1/2,y]*G[1/2])*U[1/2]))+
2(((1)*K[z,1])*(B[1,y]*F[1]*Z[1]+2*(A[1,y]-
B[1,y]*G[1])*U[1]))+
4(((3/2)*K[z,
3/2])*(B[3/2,y]*F[3/2]*Z[3/2]+2*(A[3/2,y]-B[3/2,y]*G[3/2])*U[3/2]))+
2(((2)*K[z,2])*(B[2,y]*F[2]*Z[2]+2*(A[2,y]-
B[2,y]*G[2])*U[2]))+
4(((5/2)*K[z,
5/2])*(B[5/2,y]*F[5/2]*Z[5/2]+2*(A[5/2,y]-B[5/2,y]*G[5/2])*U[5/2]))+
.............................................................................................................
+
4(((63/2)*K[z,
63/2])*(B[63/2,y]*F[63/2]*Z[63/2]+2*(A[63/2,y]-
B[63/2,y]*G[63/2])*U[63/2]))+
(((32)*K[z,
32])*(B[32,y]*F[32]*Z[32]+2*(A[32,y]-B[32,y]*G[32])*U[32])))

My question is how to writr a computer program to represent W[y_,z_]
and I can set the upper limit ,the lower limit,and the division in
myself.