Jacobi-Verfahren für Gleichungssysteme - Newton-Verfahren für Nullstellen - Potenzreihen

1 Jacobi

IdentityMatrix[4]

e = {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}

a={{7,2,0,0} 1/7,{3,-8,2,0}(-1/8),{0,1,5,2} 1/5,{0,0,2,5} 1/5}; a//MatrixForm

b={1 1/7,2 (-1/8),0,-1 1/5}; b//MatrixForm

x[n_]:= b - (a-e).x[n-1];
x[1]={0,0,0,0};
Table[x[n],{n,1,100}]//N //MatrixForm

a={{7,2,0,0} 1/7,{3,-8,2,0}(-1/8),{0,1,5,12} 1/2,{0,0,2,5} 1/5}; a//MatrixForm

x[n_]:= b - (a-e).x[n-1];
x[1]={0,0,0,0};
Table[x[n],{n,1,100}]//N //MatrixForm

2 Jacobi

Remove["Global`*"]

id = IdentityMatrix[5];     id // MatrixForm

m1 = {4, 2, 0, 0 , 0} 1/4;
m2 = {3, -3, 2, 0, 
            0} (-1/3);
m3 = {0, 1, 5, 2, 0} 1/5;
m4 = {0, 0, 2, 5, 0} 1/5;
m5 = {0, 0, 0, 2, 5} 1/5;
A = {m1, m2, m3, m4, m5};
A // MatrixForm

b = {1/7, -1/4, 0, -1/5, 1/3}

y[0] = {0, 0, 0, 0, 0};

y[n_] := b - (A - id) . y[n - 1]; y[2]

b = {1/7, -1/4, 0, -1/5, 1/3};
y[0] = {0, 0, 0, 0, 0};
y[n_] := b - (A - id) . y[n - 1];
Table[Prepend[y[n], n], {n, 0, 100}] // N // MatrixForm

3 Newton

Remove["Global`*"]

x[1] = Pi/4;
f[t_] :=  Cos[t] - t;
x[n_] := 
        t - f[t]/f'[t]  /. t -> x[n - 1];
Table[{n, x[n]} // N, {n, 1, 10}]  // MatrixForm

Plot[E^t+Cos[t]-t^2,{t,-3,6}];

x[1] = -1;
f[t_] := E^t + Cos[t] - t^2;
x[n_] := 
        t - f[t]/f'[t]  /. t -> x[n - 1];
Table[{n, x[n]} // N, {n, 1, 5}]  // MatrixForm

x[1] = 3;
f[t_] := E^t + Cos[t] - t^2;
x[n_] := 
        t - f[t]/f'[t]  /. t -> x[n - 1];
Table[{n, x[n]} // N, {n, 1, 8}]  // MatrixForm

4 Potenzreihen

f[x_] := Sin[x]

?f

?Series

Series[f[x], {x, 0, 30}]

Normal[Series[f[x],{x,0,30}]]

Plot[
        Evaluate[{Sin[x], Normal[Series[f[x], {x, 0, 30}]]}], {x, -20, 
          20}];

Plot[Evaluate[{E^x}],{x,-15,5}];

Plot[Evaluate[{E^x,Normal[Series[E^x,{x,0,30}]]}],{x,-15,5}];