Chebyshev-Polynome

Graphen der Chebyshev-Polynome

plot1 = 
      Plot[Evaluate[Table[ChebyshevT[k, x], {k, 0, 5}]], {x, -1, 
          1}]

Nullstellen der Chebyshev-Polynome

Solve[Cos[n ArcCos[x]] == 0, x]

plot2 = 
      Graphics[{PointSize[0.02], 
          Table[Point[{Cos[(1/4) ((π/2) + k π)], 0}], {k, 0, 
              3}]}]

Show[plot1, plot2]

Berechnung der Chebyshev-Entwicklung für (x^5)

(x^5) - (∑_(k = 0)^5) c[k] ChebyshevT[k, x] // Expand

sol = 
      Solve[CoefficientList[
            (x^5) - (∑_(k = 0)^5) c[k] ChebyshevT[k, x], x] == 0, 
        Table[c[k], {k, 0, 5}]]

(∑_(k = 0)^5) c[k] T[k, x] /. sol[[1]]

Übungsaufgabe

(5  (x^5) - 3  (x^4) + 2  (x^2) - 7) - (∑_(k = 0)^5) c[k] 
          ChebyshevT[k, x]

sol = 
      Solve[CoefficientList[(5  (x^5) - 3  (x^4) + 2  (x^2) - 
                  7) - (∑_(k = 0)^5) c[k] ChebyshevT[k, x], 
            x] == 0, Table[c[k], {k, 0, 5}]]

(∑_(k = 0)^5) c[k] T[k, x] /. sol[[1]]

beste gleichmäßige Approximation vierten Grades

appr = (∑_(k = 0)^4) c[k] T[k, x] /. sol[[1]]

appr = (∑_(k = 0)^4) c[k] ChebyshevT[k, x] /. sol[[1]] // 
        Expand

Plot[{5  (x^5) - 3  (x^4) + 2  (x^2) - 7, appr}, {x, -1, 
        1}]

Numerische Integration

Rechteckapproximation

<< Graphics`FilledPlot`

PlotRechteck[f_, {x_, a_, b_}, n_] := 
      Module[{plot1, plot2}, 
        plot1 = Plot[f, {x, a, b}, DisplayFunction -> Identity, 
            PlotStyle -> {RGBColor[1, 0, 0], 
                Thickness[0.01]}]; 
tab = {{a, 
              f /. x -> a}}; 
Do[
          AppendTo[
            tab, {a + k (( b - a)/n), 
              f /. x -> a + (k - 1) ((b - a)/n)}]; 
          AppendTo[
            tab, {a + k (( b - a)/n), 
              f /. x -> a + k (( b - a)/n)}], {k, 1, 
            n}]; 
plot2 = 
          FilledListPlot[tab, DisplayFunction -> Identity]; 
        Show[plot2, plot1, 
          DisplayFunction -> $DisplayFunction]]

PlotRechteck[Sin[x], {x, 0, 2  π}, 16]

PlotRechteck[(Sqrt[1 - (x^2)]), {x, -1, 1}, 16]

Trapezapproximation

PlotTrapez[f_, {x_, a_, b_}, n_] := 
      Module[{plot1, plot2}, 
        plot1 = Plot[f, {x, a, b}, DisplayFunction -> Identity, 
            PlotStyle -> {RGBColor[1, 0, 0], Thickness[0.01]}]; 
        plot2 = FilledListPlot[Table[{x, f}, {x, a, b, ((b - a)/n)}], 
            DisplayFunction -> Identity]; 
        Show[plot2, plot1, 
          DisplayFunction -> $DisplayFunction]]

PlotTrapez[Sin[x], {x, 0, 2  π}, 8]

PlotTrapez[(Sqrt[1 - (x^2)]), {x, -1, 1}, 16]

globale Approximation in Intervall [a,b]

linear (Trapez)

tab = Table[{x, f[x]}, {x, a, b, ((b - a)/1)}]

pol = InterpolatingPolynomial[tab, x]

int = (∫_a^b) pol \[DifferentialD]x // Factor

Fehler:

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

fehler /. {f[x_] -> A + B x + C (x^2)} // Factor

quadratisch (Simpsonregel)

tab = Table[{x, f[x]}, {x, a, b, ((b - a)/2)}]

pol = InterpolatingPolynomial[tab, x]

Simplify[pol]

int = (∫_a^b) pol \[DifferentialD]x // Factor

Fehler:

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

fehler /. {f[x_] -> A + B x + C (x^2) + D (x^3) + E (x^4)} // 
      Factor

kubisch (3/8-Regel)

tab = Table[{x, f[x]}, {x, a, b, ((b - a)/3)}]

pol = InterpolatingPolynomial[tab, x]

Simplify[pol]

int = (∫_a^b) pol \[DifferentialD]x // Factor

Fehler:

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

fehler /. {f[x_] -> A + B x + C (x^2) + D (x^3) + E (x^4)} // 
      Factor