integrate in excel

4
t f(t) Num. Integration 1 Error 0 0 0.052 0.103813 0.002699128225 0.002702 0.000902309 0.992436 0.12 0.237703 0.01431064674 0.014331 0.001423125 0.27 0.514136 0.070698543096 0.071146 0.006324264 0.33 0.613117 0.104516128405 0.105004 0.0046668 0.47 0.807558 0.203963375072 0.205106 0.005602047 0.521 0.863415 0.24657318766 0.247753 0.004783949 0.598 0.930582 0.315642077734 0.316958 0.004170614 0.71 0.988652 0.423119179795 0.424887 0.004178693 0.8 0.999574 0.51258932126 0.5146 0.003922126 0.95 0.9463 0.658529848064 0.661645 0.004730135 0.99 0.917438 0.695804608924 0.698939 0.004505328 1.15 0.745705 0.82885606232 0.833138 0.005166094 1.3 0.515501 0.92344655612 0.928444 0.005412138 1.33 0.463191 0.938126945672 0.943129 0.005332142 1.42 0.297041 0.972337413402 0.977432 0.005239842 1.5 0.14112 0.989863867777 0.994996 0.005184936 1.62 -0.09825 0.992436152636 0.997581 0.00518401 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 f(t) vs. t f(t) Roy Haggerty: Function of time: use sine function as example: f(t) = v0 sin(w t) Roy Haggerty: This is the numerical integration along the funct using the "trapezoidal rule The value shown is the integral from the origin to the time given in that row. For your numerical integration, you will want copy the equation from C5 t your excel spreadsheet. Be careful that references in equation are correct - i.e. you may need to modify references to rows or colum to match your data. Roy Haggerty: This is the integral of the function from 0 to 1.62.

Upload: mukesh-karunanethy

Post on 31-Jan-2016

11 views

Category:

Documents


0 download

DESCRIPTION

Describes the steps to Integrate using Trapezoidal rule in excel sheet

TRANSCRIPT

Page 1: Integrate in Excel

t f(t) Num. Integration 1 Error

0 00.052 0.103813 0.0026991282247 0.002702 0.0009023093 0.9924360.12 0.237703 0.0143106467402 0.014331 0.00142312460.27 0.514136 0.0706985430962 0.071146 0.00632426360.33 0.613117 0.104516128405 0.105004 0.00466679980.47 0.807558 0.2039633750715 0.205106 0.0056020470.521 0.863415 0.2465731876599 0.247753 0.00478394920.598 0.930582 0.3156420777342 0.316958 0.0041706140.71 0.988652 0.4231191797945 0.424887 0.00417869320.8 0.999574 0.5125893212597 0.5146 0.0039221260.95 0.9463 0.6585298480644 0.661645 0.00473013540.99 0.917438 0.6958046089238 0.698939 0.0045053281.15 0.745705 0.8288560623204 0.833138 0.0051660941.3 0.515501 0.9234465561203 0.928444 0.00541213841.33 0.463191 0.9381269456716 0.943129 0.00533214221.42 0.297041 0.9723374134023 0.977432 0.00523984241.5 0.14112 0.9898638677769 0.994996 0.00518493571.62 -0.098249 0.9924361526358 0.997581 0.0051840101

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-0.2

0

0.2

0.4

0.6

0.8

1

1.2

f(t) vs. t

t

f(t)

Roy Haggerty:Numerical integration from A3B3 to A21B21using trapezoidal rule. This is a more sophisticated way to implement the same numerical integration as given along column C, but it saves space and work. Note the answer is the same as given in cell C21, however.

You may copy the equation from this cell and implement it in your spreadsheet. Be careful, however, to modify the first and last cell locations properly.

Roy Haggerty:Function of time: use sine function as example: f(t) = v0 sin(w t)

Roy Haggerty:This is the numerical integration along the function using the "trapezoidal rule".The value shown is the integral from the origin to the time given in that row.

For your numerical integration, you will want to copy the equation from C5 to your excel spreadsheet. Be careful that references in equation are correct - i.e., you may need to modify references to rows or columns to match your data.

Roy Haggerty:This is the integral of the function from 0 to 1.62.

A2
Roy Haggerty: Time
B2
Roy Haggerty: Function of time: use sine function as example: f(t) = v0 sin(w t)
C2
Roy Haggerty: This is the numerical integration along the function using the "trapezoidal rule". The value shown is the integral from the origin to the time given in that row. For your numerical integration, you will want to copy the equation from C5 to your excel spreadsheet. Be careful that references in equation are correct - i.e., you may need to modify references to rows or columns to match your data.
D2
Roy Haggerty: This is the true value - since the function is a simple trigonometric one, the integral is known analytically.
E2
Roy Haggerty: This is the error between the numerical integral and the true value. A perfect numerical integration would leave 0 error. Note that integration using the central rectangle rule results in error that gets smaller in proportion to the distance between data points squared. In other words, 10 times as many data points would yield an integration that is 100 times more accurate.
F5
Roy Haggerty: Numerical integration from A3B3 to A21B21 using trapezoidal rule. This is a more sophisticated way to implement the same numerical integration as given along column C, but it saves space and work. Note the answer is the same as given in cell C21, however. You may copy the equation from this cell and implement it in your spreadsheet. Be careful, however, to modify the first and last cell locations properly.
C21
Roy Haggerty: This is the integral of the function from 0 to 1.62.
E21
Roy Haggerty: Note that the error is about 0.5%. The error will decrease as the square of the separation distance in t.
Page 2: Integrate in Excel

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8-0.2

0

0.2

0.4

0.6

0.8

1

1.2

f(t) vs. t

t

f(t)

Page 3: Integrate in Excel

0 0 0 0 #DIV/0!

Page 4: Integrate in Excel

v0= 1w= 2

Roy Haggerty:Numerical integration from A3B3 to A21B21using trapezoidal rule. This is a more sophisticated way to implement the same numerical integration as given along column C, but it saves space and work. Note the answer is the same as given in cell C21, however.

You may copy the equation from this cell and implement it in your spreadsheet. Be careful, however, to modify the first and last cell locations properly.

Roy Haggerty:This is the numerical integration along the function using the "trapezoidal rule".The value shown is the integral from the origin to the time given in that row.

For your numerical integration, you will want to copy the equation from C5 to your excel spreadsheet. Be careful that references in equation are correct - i.e., you may need to modify references to rows or columns to match your data.

Roy Haggerty:This is the second parameter used in the trigonometric equation in Column B.

Changing this value is equivalent to changing the spacing between the time data points. You may modify this and see how the integration's accuracy changes (as well as the function).

I3
Roy Haggerty: This is a parameter used in the function in Column B.
I4
Roy Haggerty: This is the second parameter used in the trigonometric equation in Column B. Changing this value is equivalent to changing the spacing between the time data points. You may modify this and see how the integration's accuracy changes (as well as the function).