Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Integral zadane funkcije

In[222]:=

y@x_D = Sin@2 xD
yy@x_D = Integrate@y@xD, 8x, 0, x<D
Plot@8y@xD, yy@xD<, 8x, 0, 1.5<D

Out[222]=

Sin@2 xD

Out[223]=

Sin@xD2
1.0

0.8

0.6
Out[224]=

0.4

0.2

0.2

0.4

0.6

0.8

1.0

1.2

1.4

Numerical_integration.nb

Numeriko integriranje diskretnih podataka


In[207]:=

Out[207]=

Out[208]=

Out[209]=
Out[211]=

xz = 80, 0.052, 0.12, 0.27, 0.33, 0.47, 0.521, 0.598,


0.71, 0.8, 0.95, 0.99, 1.15, 1.3, 1.33, 1.42, 1.5, 1.62<
yz = y@xzD
dim = Dimensions@xzD@@1DD
yi@i_D := Piecewise@88xz@@iDD yz@@iDD 2, i < 1<,
8yi@i 1D + Hxz@@iDD xz@@i 1DDL Hyz@@iDD + yz@@i 1DDL 2, i > 1<<D
yyi = Table@yi@iD, 8i, dim<D
MatrixForm@Transpose@8xz, yz<DD;
pl1 = ListPlot@Transpose@8xz, yz<D, Joined TrueD;
pl2 = ListPlot@Transpose@8xz, yyi<D, Joined TrueD;
Show@pl1, pl2D
80, 0.052, 0.12, 0.27, 0.33, 0.47, 0.521, 0.598,
0.71, 0.8, 0.95, 0.99, 1.15, 1.3, 1.33, 1.42, 1.5, 1.62<

80, 0.103813, 0.237703, 0.514136, 0.613117, 0.807558,


0.863415, 0.930582, 0.988652, 0.999574, 0.9463, 0.917438,
0.745705, 0.515501, 0.463191, 0.297041, 0.14112, 0.0982486<
18

80, 0.00269913, 0.0143106, 0.0706985, 0.104516, 0.203963,


0.246573, 0.315642, 0.423119, 0.512589, 0.65853, 0.695805,
0.828856, 0.923447, 0.938127, 0.972337, 0.989864, 0.992436<
1.0

0.8

0.6
Out[215]=

0.4

0.2

0.5

1.0

1.5

You might also like