Subjects algebra

Lagrange Polynomial 3A22Fc

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. Problem: Odrediti Lagranžov interpolacioni polinom za funkciju $f(x) = 1 - 3^x$ sa čvornim tačkama $x_i = i$, gde je $i = 0, 1, 2, 3$. 2. Prvo izračunavamo vrednosti funkcije u datim čvornim tačkama: $$f(0) = 1 - 3^0 = 1 - 1 = 0$$ $$f(1) = 1 - 3^1 = 1 - 3 = -2$$ $$f(2) = 1 - 3^2 = 1 - 9 = -8$$ $$f(3) = 1 - 3^3 = 1 - 27 = -26$$ 3. Lagranžov interpolacioni polinom je definisan kao: $$L(x) = \sum_{j=0}^3 f(x_j) \cdot l_j(x)$$ gde je $$l_j(x) = \prod_{\substack{0 \le m \le 3 \\ m \neq j}} \frac{x - x_m}{x_j - x_m}$$ 4. Izračunavamo svaki $l_j(x)$: - Za $j=0$: $$l_0(x) = \frac{(x-1)(x-2)(x-3)}{(0-1)(0-2)(0-3)} = \frac{(x-1)(x-2)(x-3)}{(-1)(-2)(-3)} = \frac{(x-1)(x-2)(x-3)}{-6}$$ - Za $j=1$: $$l_1(x) = \frac{(x-0)(x-2)(x-3)}{(1-0)(1-2)(1-3)} = \frac{x(x-2)(x-3)}{1 \cdot (-1) \cdot (-2)} = \frac{x(x-2)(x-3)}{2}$$ - Za $j=2$: $$l_2(x) = \frac{(x-0)(x-1)(x-3)}{(2-0)(2-1)(2-3)} = \frac{x(x-1)(x-3)}{2 \cdot 1 \cdot (-1)} = \frac{x(x-1)(x-3)}{-2}$$ - Za $j=3$: $$l_3(x) = \frac{(x-0)(x-1)(x-2)}{(3-0)(3-1)(3-2)} = \frac{x(x-1)(x-2)}{3 \cdot 2 \cdot 1} = \frac{x(x-1)(x-2)}{6}$$ 5. Sada formiramo polinom: $$L(x) = f(0)l_0(x) + f(1)l_1(x) + f(2)l_2(x) + f(3)l_3(x)$$ $$= 0 \cdot l_0(x) + (-2) \cdot \frac{x(x-2)(x-3)}{2} + (-8) \cdot \frac{x(x-1)(x-3)}{-2} + (-26) \cdot \frac{x(x-1)(x-2)}{6}$$ 6. Pojednostavimo svaki član: $$-2 \cdot \frac{x(x-2)(x-3)}{2} = \cancel{-2} \cdot \frac{x(x-2)(x-3)}{\cancel{2}} = -x(x-2)(x-3)$$ $$-8 \cdot \frac{x(x-1)(x-3)}{-2} = \cancel{-8} \cdot \frac{x(x-1)(x-3)}{\cancel{-2}} = 4x(x-1)(x-3)$$ $$-26 \cdot \frac{x(x-1)(x-2)}{6} = -\frac{26}{6} x(x-1)(x-2) = -\frac{13}{3} x(x-1)(x-2)$$ 7. Konačno, polinom je: $$L(x) = -x(x-2)(x-3) + 4x(x-1)(x-3) - \frac{13}{3} x(x-1)(x-2)$$ 8. Razvijamo svaki proizvod: $$-x(x-2)(x-3) = -x(x^2 - 5x + 6) = -x^3 + 5x^2 - 6x$$ $$4x(x-1)(x-3) = 4x(x^2 - 4x + 3) = 4x^3 - 16x^2 + 12x$$ $$-\frac{13}{3} x(x-1)(x-2) = -\frac{13}{3} x(x^2 - 3x + 2) = -\frac{13}{3} x^3 + 13 x^2 - \frac{26}{3} x$$ 9. Sabiramo sve članove: $$L(x) = (-x^3 + 5x^2 - 6x) + (4x^3 - 16x^2 + 12x) + \left(-\frac{13}{3} x^3 + 13 x^2 - \frac{26}{3} x\right)$$ $$= \left(-1 + 4 - \frac{13}{3}\right) x^3 + \left(5 - 16 + 13\right) x^2 + \left(-6 + 12 - \frac{26}{3}\right) x$$ $$= \left(\frac{-3}{3} + \frac{12}{3} - \frac{13}{3}\right) x^3 + 2 x^2 + \left(6 - \frac{26}{3}\right) x$$ $$= \left(-\frac{4}{3}\right) x^3 + 2 x^2 + \left(\frac{18}{3} - \frac{26}{3}\right) x = -\frac{4}{3} x^3 + 2 x^2 - \frac{8}{3} x$$ 10. Finalni Lagranžov interpolacioni polinom je: $$\boxed{L(x) = -\frac{4}{3} x^3 + 2 x^2 - \frac{8}{3} x}$$