Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4578839

Browse files
author
Oleksandr Kulkov
authored
fix rendering
1 parent 6b28246 commit 4578839

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/algebra/polynomial.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,11 @@ $$\boxed{A(x) = \sum\limits_{i=1}^n y_i \prod\limits_{j \neq i}\dfrac{x-x_j}{x_i
287287

288288
Computing it directly is a hard thing but turns out, we may compute it in $O(n \log^2 n)$ with a divide and conquer approach:
289289

290-
Consider $P(x) = (x-x_1)\dots(x-x_n)$. To know the coefficients of the denominators in $A(x)$ we should compute products like: \[P_i = \prod\limits_{j \neq i} (x_i-x_j)\]
290+
Consider $P(x) = (x-x_1)\dots(x-x_n)$. To know the coefficients of the denominators in $A(x)$ we should compute products like:
291+
292+
$$
293+
P_i = \prod\limits_{j \neq i} (x_i-x_j)
294+
$$
291295

292296
But if you consider the derivative $P'(x)$ you'll find out that $P'(x_i) = P_i$. Thus you can compute $P_i$'s via evaluation in $O(n \log^2 n)$.
293297

0 commit comments

Comments
 (0)