ApproxInt.nb In[1]:= Out[1]= In[2]:= Out[2]= Integrate@Sin@xD x, 8x, 1, 3<D - SinIntegral@1D + SinIntegral@3D Integrate@Sin@xD x, 8x, 1, 3<D N 0.902569 H* Trapezoidal Rule, FHxL=HSin xLx, n=2, Delta x=H3-1L2=1, x0=1, x1=2, x2=3, T2=HDelta xL2*HFHx0L+2FHx1L+FHx2LL *L In[3]:= Out[3]= In[4]:= Out[4]= In[5]:= T2 = 1 2 * HSin@1D 1 + 2 Sin@2D 2 + Sin@3D 3L N 0.898904 ErrorTrapezoidal2 = Integrate@Sin@xD x, 8x, 1, 3<D - T2 0.00366525 Plot@Sin@xD x, 8x, 1, 3<D 0.8 0.6 Out[5]= 0.4 0.2 1.5 In[6]:= 2.0 Integrate@Exp@- x ^ 2D, 8x, 0, 1<D 2.5 3.0 1 Π Erf@1D Out[6]= 2 In[7]:= Out[7]= NIntegrate@Exp@- x ^ 2D, 8x, 0, 1<D 0.746824 H*Midpoint Rule, FHxL=E^H-x^2L,n=4, Delta x=H1-0L4=14, x0=0, x1=14, x2=24, x3=34, x4=1, m1=18, m2=38, m3=58, m4=78, M4=HDelta xL*HFHm1L+FHm2L+FHm3L+FHm4LL *L In[8]:= Out[8]= In[9]:= Out[9]= M4 = 1 4 * HExp@- H1 8L ^ 2D + Exp@- H3 8L ^ 2D + Exp@- H5 8L ^ 2D + Exp@- H7 8L ^ 2DL N 0.748747 ErrorMidpoint4 = Integrate@Exp@- x ^ 2D, 8x, 0, 1<D - M4 - 0.001923 1 ApproxInt.nb In[10]:= Plot@Exp@- x ^ 2D, 8x, 0, 1<D 1.0 0.9 0.8 Out[10]= 0.7 0.6 0.5 0.2 0.4 0.6 0.8 1.0 2
© Copyright 2025 Paperzz