You are on page 1of 4

SetDirectory@"UsersezpawnDocuments"D;

data = Import@"ClassExample2.csv"D
x
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

y
0
1.4307
1.4291
1.0098
0.9953
0.9961
1.0008
1.0035
1.0106
1.9299
2.1969
2.2142
2.189
2.0622
1.8937
1.0654

y2
0
0.71535
0.71455
0.5049
0.49765
0.49805
0.5004
0.50175
0.5053
0.96495
1.09845
1.1071
1.0945
1.0311
0.94685
0.5327

ListPlot@
Table@
8data@@i, 1DD, data@@i, 3DD<,
8i, 3, 17<D,
Filling Axis,
PlotRange 880, 17<, 80, 2<<
D
2.0

1.5

1.0

0.5

0.0

10

15

f = Interpolation@Table@
8data@@i, 1DD, data@@i, 3DD<,
8i, 3, 17<D,
InterpolationOrder 1
D
InterpolatingFunction@H 1. 15. L, <>D

Printed by Mathematica for Students

Calc2Project.nb

Plot@f@xD,
8x, 1, 17<,
AspectRatio Automatic,
PlotRange All,
AxesOrigin 80, 0<
D
1.0
0.5
-0.5

10

15

Show@
Plot@f@xD,
8x, 1, 17<,
PlotRange All,
AspectRatio Automatic,
AxesOrigin 80, 0<
D
,
ListPlot@
Table@
8data@@i, 1DD, data@@i, 3DD<,
8i, 3, 17<
D,
Filling Axis,
AspectRatio Automatic
D
D

1.0
0.5
5

10

-0.5

ParametricPlot3D@
8x, f@xD * Cos@tD, f@xD * Sin@tD<,
8x, 1, 15<,
8t, 0, 2 <,
AxesOrigin 80, 0<,
Boxed False,
AxesLabel 8x, y, z<
D

Printed by Mathematica for Students

15

Calc2Project.nb

0.502088

1.0
0.5
0.0
-0.5
-1.0

Using the Trapezoidal Rule :


b-a
AHy0 L2 + 2 Hy1 L2 + 2 Hy2 L2 + ... + 2 Hyn-1 L2 + Hyn L2 E ;
2n
The Area under the curve :

Printed by Mathematica for Students

10

Calc2Project.nb

15 - 1
In[520]:=

AH1.4307L2 + 2 H1.4291L2 + 2 H1.0098L2 + 2 H0.9953L2 +

2 H15L
2 H0.9961L2 + 2 H1.0008L2 + 2 H1.0035L2 + 2 H1.0106L2 + 2 H1.9299L2 + 2 H2.1969L2 +
2 H2.1242L2 + 2 H2.189L2 + 2 H2.0622L2 + 2 H1.8937L2 + H1.0654L2 E N
Out[520]=

0.466667H70.7187L
Which approximates to : 33.0021 in2 ...
Therefore, to find the volume we would multiply this by since :

In[516]:=

Volume of a cylinder = r2
which in this case would mean :
b-a
HL
AHy0 L2 + 2 Hy1 L2 + 2 Hy2 L2 + ... + 2 Hyn-1 L2 + Hyn L2 E
2n

15 - 1
In[519]:=

HL

AH1.4307L2 + 2 H1.4291L2 + 2 H1.0098L2 + 2 H0.9953L2 +

2 H15L
2 H0.9961L2 + 2 H1.0008L2 + 2 H1.0035L2 + 2 H1.0106L2 + 2 H1.9299L2 + 2 H2.1969L2 +
2 H2.1242L2 + 2 H2.189L2 + 2 H2.0622L2 + 2 H1.8937L2 + H1.0654L2 E N
Out[519]=

3.14159 0.466667H70.7187L
This approximates to 103.6790 in3

Printed by Mathematica for Students

You might also like