1. Feladat
f(x)=Ln(x)+(n+1)!1fn+1(ξ)wn(x)
Ln(x)=x0−h−x0x−x0⋅x0−h−(x0+h)x−(x0+h)⋅f(x0−h)+x0−(x0−h)x−(x0−h)⋅x0−(x0+h)x−(x0+h)⋅f(x0)+x0+h−(x0−h)x−(x0−h)⋅x0+h−x0x−x0⋅f(x0+h)
Ln(x)=2h2(x−x0)(x−x0−h)⋅f(x0−h)−h2(x−x0+h)(x−x0−h)⋅f(x0)+2h2(x−x0+h)(x−x0)⋅f(x0+h)
Ln(x)=2h21((x−x0)(x−x0−h)f(x0−h))−2(x−x0+h)(x−x0−h)f(x0)+(x−x0+h)(x−x0)f(x0+h)
f′(x0)≈Ln′(x0)
2. Feladat
f′′(x0)≈Ln′′(x0)
3. Feladat
f(x+h)=f(x)+hf′(x)+2h2f′′(x)+6h3f′′′(x)+O(h4)
f(x−h)=f(x)−hf′(x)+2h2f′′(x)−6h3f′′′(x)+O(h4)
f(x)=f(x)
(1) + (2) - 2*(3)
f(x+h)+f(x−h)−2f(x)=h2f′′(x)+O(h4)
⟹f′′(x)=h2f(x+h)+f(x−h)−2f(x)+O(h2)
4. Feladat
f(x+2h)=f(x)+2hf′(x)+24h2f′′(x)+68h3f′′′(x)+O(h4)
f(x−h)=f(x)−hf′(x)+2h2f′′(x)−6h3f′′′(x)+O(h4)
f(x)=f(x)
f′′(x)≈?αf(x+2h)−(α+β)f(x)+βf(x−h)
(1) + 2*(2)
f(x+2h)+2f(x−h)=3f(x)+3h2f′′(x)+f′′′(x)+O(h4)
(1) + 2*(2) - 3(3)
f(x+2h)+2f(x−h)−3f(x)=3h2f′′(x)+f′′′(x)+O(h4)
f′′(x)=3h2f(x+2h)+2f(x−h)−3f(x)−f′′′(x)+O(h2)
tehát α=1 és β=−3 ekkor −(α+β)=−(1−3)=−(−2)=2 és így tényleg másodrendű az approximáció
6. Feladat
D0=−2100⋮01−210⋮001−21⋮0001−2⋮0…………⋱…0000⋮−2
related: NumMod 1