RechenwegWS 2026/27
Rechenweg · Analysis · Numerik
AnalysisBeispiel 434·Numerik (Kondition, Fehlerfortpflanzung)

Relative Fehlerfortpflanzung für √x, eˣ, ln x, sin x

PDF

Mit Hilfe der Näherung

Δf(x)f(x)=xf′(x)f(x) Δxx\frac{\Delta f(x)}{f(x)} = \frac{xf'(x)}{f(x)}\,\frac{\Delta x}{x}

für den relativen Fehler der Funktion f(x)f(x) finde man Fehlerschätzungen für die folgende Rechenoperationen: f(x)=xf(x) = \sqrt{x}, f(x)=exf(x) = e^x, f(x)=ln⁡(x)f(x) = \ln(x) und f(x)=sin⁡(x)f(x) = \sin(x).

Lösung

Lösung verborgen – erst selbst probieren!

Überblick

Die Näherung entsteht aus Δf≈f′(x) Δx\Delta f \approx f'(x)\,\Delta x (Linearisierung, Mittelwertsatz) durch Division durch f(x)f(x) und Erweitern mit xx. Der Faktor κf(x)=xf′(x)f(x)\kappa_f(x) = \frac{x f'(x)}{f(x)} heißt (relative) Konditionszahl: Er gibt an, um welchen Faktor ein relativer Eingangsfehler verstärkt wird. Wir berechnen κf\kappa_f für die vier Funktionen und deuten das Ergebnis: ∣κ∣≤1|\kappa| \le 1 gut konditioniert, ∣κ∣≫1|\kappa| \gg 1 schlecht konditioniert.

Herleitung der Näherung

Δf=f(x+Δx)−f(x)≈f′(x) Δx⟹Δff(x)≈f′(x) Δxf(x)=xf′(x)f(x)⋅Δxx.\Delta f = f(x + \Delta x) - f(x) \approx f'(x)\,\Delta x \quad\Longrightarrow\quad \frac{\Delta f}{f(x)} \approx \frac{f'(x)\,\Delta x}{f(x)} = \frac{x f'(x)}{f(x)}\cdot\frac{\Delta x}{x}.

(a) f(x)=xf(x) = \sqrt{x}, x>0x > 0

f′(x)=12xf'(x) = \frac{1}{2\sqrt{x}}, also κ=x⋅12xx=x2x=12,Δxx≈12 Δxx.\kappa = \frac{x\cdot\frac{1}{2\sqrt x}}{\sqrt x} = \frac{x}{2x} = \frac12, \qquad \frac{\Delta\sqrt{x}}{\sqrt x} \approx \frac12\,\frac{\Delta x}{x}. Der relative Fehler wird halbiert – das Wurzelziehen ist für alle x>0x > 0 sehr gut konditioniert.

(b) f(x)=exf(x) = e^x

f′(x)=exf'(x) = e^x, also κ=xexex=x,Δexex≈x⋅Δxx=Δx.\kappa = \frac{x e^x}{e^x} = x, \qquad \frac{\Delta e^x}{e^x} \approx x\cdot\frac{\Delta x}{x} = \Delta x. Der relative Fehler des Ergebnisses ist etwa gleich dem absoluten Fehler des Arguments. Für große ∣x∣|x| wird ein relativer Eingangsfehler um den Faktor ∣x∣|x| verstärkt (z. B. x=10x = 10: zehnfach), für ∣x∣≤1|x| \le 1 ist die Exponentialfunktion gut konditioniert.

(c) f(x)=ln⁡xf(x) = \ln x, x>0x > 0, x≠1x \ne 1

f′(x)=1xf'(x) = \frac1x, also κ=x⋅1xln⁡x=1ln⁡x,Δln⁡xln⁡x≈1ln⁡x Δxx.\kappa = \frac{x\cdot\frac1x}{\ln x} = \frac{1}{\ln x}, \qquad \frac{\Delta\ln x}{\ln x} \approx \frac{1}{\ln x}\,\frac{\Delta x}{x}. In der Nähe von x=1x = 1 ist ln⁡x≈0\ln x \approx 0 und ∣κ∣|\kappa| sehr groß – dort ist der Logarithmus schlecht konditioniert (z. B. x=1,1x = 1{,}1: κ=1ln⁡1,1≈10,5\kappa = \frac{1}{\ln 1{,}1} \approx 10{,}5). Für große oder sehr kleine xx ist ∣κ∣<1|\kappa| < 1.

(d) f(x)=sin⁡xf(x) = \sin x, sin⁡x≠0\sin x \ne 0

f′(x)=cos⁡xf'(x) = \cos x, also κ=xcos⁡xsin⁡x=xcot⁡x,Δsin⁡xsin⁡x≈xcot⁡x⋅Δxx.\kappa = \frac{x\cos x}{\sin x} = x\cot x, \qquad \frac{\Delta\sin x}{\sin x} \approx x\cot x\cdot\frac{\Delta x}{x}.

  • Für x→0x \to 0 gilt xcot⁡x→1x\cot x \to 1 (wegen sin⁡xx→1\frac{\sin x}{x} \to 1): gut konditioniert.
  • In der Nähe von x=kπx = k\pi, k≠0k \ne 0, ist sin⁡x≈0\sin x \approx 0, während xcos⁡x↛0x\cos x \not\to 0: ∣κ∣→∞|\kappa| \to \infty, schlecht konditioniert (z. B. x=3x = 3: κ=3cot⁡3≈−21\kappa = 3\cot 3 \approx -21).
  • Bei großen ∣x∣|x| wächst κ\kappa typischerweise wie ∣x∣|x|.
Ergebnis
f(x)f(x) κf(x)=xf′(x)f(x)\kappa_f(x) = \frac{xf'(x)}{f(x)} relativer Fehler Δff\frac{\Delta f}{f} schlecht konditioniert
x\sqrt x 12\frac12 12Δxx\frac12\frac{\Delta x}{x} nie
exe^x xx Δx\Delta x für großes ∣x∣\vert x\vert
ln⁡x\ln x 1ln⁡x\frac{1}{\ln x} 1ln⁡xΔxx\frac{1}{\ln x}\frac{\Delta x}{x} nahe x=1x = 1
sin⁡x\sin x xcot⁡xx\cot x xcot⁡x Δxxx\cot x\,\frac{\Delta x}{x} nahe x=kπx = k\pi (k≠0k \ne 0), großes ∣x∣\vert x\vert
Probe

Python: Relative Störung Δxx=10−6\frac{\Delta x}{x} = 10^{-6} und tatsächliche relative Änderung von ff geteilt durch 10−610^{-6}: x\sqrt{x} bei x=4x = 4: 0,499999880{,}49999988 (Theorie 0,50{,}5); exe^x bei x=10x = 10: 10,0000510{,}00005 (Theorie 1010); ln⁡x\ln x bei x=1,1x = 1{,}1: 10,4920510{,}49205 (Theorie 10,4920610{,}49206); sin⁡x\sin x bei x=3x = 3: −21,04576-21{,}04576 (Theorie 3cot⁡3=−21,045763\cot 3 = -21{,}04576) ✓.

Hilfreiches

Relative Konditionszahl

κf(x)=xf′(x)f(x),Δff≈κf(x) Δxx.\kappa_f(x) = \frac{x f'(x)}{f(x)}, \qquad \frac{\Delta f}{f} \approx \kappa_f(x)\,\frac{\Delta x}{x}.

Linearisierung

Für differenzierbares ff gilt f(x+Δx)=f(x)+f′(x)Δx+o(Δx)f(x + \Delta x) = f(x) + f'(x)\Delta x + o(\Delta x); für kleine Δx\Delta x ist also Δf≈f′(x)Δx\Delta f \approx f'(x)\Delta x.

Typische Fehler
  • Absoluten und relativen Fehler verwechseln: bei exe^x ist der relative Ergebnisfehler gleich dem absoluten Eingangsfehler.
  • Kondition (Eigenschaft des Problems) mit Stabilität (Eigenschaft des Algorithmus) verwechseln.
  • Bei ln⁡\ln und sin⁡\sin die Stellen mit f(x)=0f(x) = 0 übersehen, an denen der relative Fehler explodiert.

Verwandte Beispiele: Bsp. 431, Bsp. 432, Bsp. 433.