Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Write a computer program to using Simpson's rule

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74016] Write a computer program to using Simpson's rule
  • From: "Evanescence" <origine26 at yahoo.com.tw>
  • Date: Tue, 6 Mar 2007 05:28:15 -0500 (EST)

Hello Dear all:
My questions are as follows:
First I definite as follows functions.
B[=A3f_, =A3b_] function of =A3f, =A3b
A[=A3f_, =A3b_] function of =A3f, =A3b
F[=A3f_] function of =A3f
G[=A3f_] function of =A3f
K[=A3i_, =A3f_] function of =A3i, =A3f
Z[=A3f_] function of =A3f
U[=A3f_] function of =A3f

Then I want to write a computer program about Simpson's 1/3 rule that
can express below function
L[=A3b_, =A3i_] :=(1/3)*((16-0)/32)*(0+4(((1/2)*K[=A3i, 1/2] )*(B[1/2,
=A3b]*F[1/2]*(Z[1/2])+2*( A[1/2, =A3b]-B[1/2, =A3b]*G[1/2])*U[1/2]))+2
(((1)*K[=A3i, 1] )*(B[1, =A3b]*F[1]*(Z[1])+2*( A[1, =A3b]-B[1 =A3b]*G[1])*U=
[1]))
+4(((3/2)*K[=A3i, 3/2] )*(B[3/2, =A3b]*F[3/2]*(Z[3/2])+2*( A[3/2, =A3b]-B[3=
/2,
=A3b]*G[3/2])*U[3/2]))
+2(((2)*K[=A3i, 2] )*(B[2, =A3b]*F[2]*(Z[2])+2*( A[2, =A3b]-B[2,
=A3b]*G[2])*U[2]))
+=2E.......................................................................
+(((16)*K[=A3i, 16] )*(B[16, =A3b]*F[16]*(Z[16])+2*( A[16, =A3b]-B[16,
=A3b]*G[16])*U[16])))

the 16 is upper limit of integration
and the 0 is lower limit of integration
subdivision is 1/2

I want to write a computer program using the Simpson's rule that can
choose the subdivision by myself(maybe can choose 0.001 or 0.002
etc...)and upper and lower limit can choose by myself too,final can
express the above function.

Thank you
Evanescence 2007 03 06



  • Prev by Date: logical/set theoretic programming
  • Next by Date: Re: Rigid body equations
  • Previous by thread: Re: logical/set theoretic programming
  • Next by thread: Re: Write a computer program to using Simpson's rule