Numerische Integration

Romberg-Verfahren

Trapez1 = T[1, 1] == h[1]/2 (f[x[0]] + f[x[4]])

Trapez2 = 
      T[2, 1] == h[2]/2 (f[x[0]] + 2  f[x[2]] + f[x[4]])

Trapez3 = 
      T[3, 1] == h[3]/2 (f[x[0]] + 2  f[x[1]] + 2  f[x[2]] + 
              2  f[x[3]] + f[x[4]])

Simpson1 = 
      T[2, 2] == h[2]/3 (f[x[0]] + 4  f[x[2]] + f[x[4]])

Simpson2 = 
      T[3, 2] == h[3]/3 (f[x[0]] + 4  f[x[1]] + 2  f[x[2]] + 
              4  f[x[3]] + f[x[4]])

Solve[{Simpson1, Trapez1, Trapez2, h[1] == 2  h[2], 
        h[2] == 2  h[3]}, {T[2, 2], T[1, 1], 
        T[2, 1]}, 
{f[x[0]], f[x[2]], f[x[4]]}]

Solve[{Simpson2, Trapez2, Trapez3, h[1] == 2  h[2], 
        h[2] == 2  h[3]}, {T[3, 2], T[2, 1], T[3, 1]}, {f[x[0]], 
        f[x[1]], f[x[2]], f[x[3]], f[x[4]]}]

Clear[T]
T[j_, 
        1] := ((b - a)/(2^j)) (f[a] + 
            2 (∑_(k = 1)^((2^(j - 1)) - 1))f[
                  a + k (( b - a)/(2^(j - 1)))] + 
            f[b])
T[j_, 
        k_] := (1/((4^(k - 1)) - 1)) ((4^(k - 1)) T[j, k - 1] - 
            T[j - 1, k - 1])

Collect[T[1, 1], f[_], Factor]

Collect[T[2, 1], f[_], Factor]

Collect[T[3, 1], f[_], Factor]

Collect[T[2, 2], f[_], Factor]

Collect[T[3, 2], f[_], Factor]

Collect[T[3, 3], f[_], Factor]

f[x_] := (E^(((x^2)/2))); a = 0; b = 1;

int = (∫_a^b) f[x] \[DifferentialD]x

int = N[int]

T[1, 1]

T[1, 1] // N

T[2, 2] // N

T[3, 3] // N

T[4, 4] // N

int

Table[T[j, k], {j, 5}, {k, 5}] // N

Clear[f, a, b]