(1) (2) Příklad číslo 2 with CurveFitting : P PolynomialInterpolation 9, 3, 4.5, 10, 5.5, 12.5 , 9 sin 9 , 3 sin 3 , 4.5 sin 4.5 , 10 sin 10 , 5.5 sin 5.5 , 12.5 sin 12.5 , x, form = Lagrange ; 0.003023431595 9 sin 9 x 3 x 4.5 x 10 x 5.5 x 12.5 0.0006683375104 3 sin 3 x 9 x 4.5 x 10 x 5.5 x 12.5 0.01186016795 x 9 x 3 x 10 x 5.5 x 12.5 0.002308802309 10 sin 10 x 9 x 3 x 4.5 x 5.5 x 12.5 0.01739486503 x 9 x 3 x 4.5 x 10 x 12.5 0.002671037186 x 9 x 3 x 4.5 x 10 x 5.5 expand evalf P ; 3.09117017 x 2.21991785 x 2 0.545203514 x 3 0.0513743551 x 4 0.001661922286 x 5 2.88384950 plot x sin x , P , x = 0 ..15, color = blue, green , thickness = 3, legend = "Původní funkce", "Lagrangeův polynom" ; Původní funkce Lagrangeův polynom 0 5 10 15 0 10 20 30 40 50