Napište funkci, která počítá rozvoj funkce 1 + x {\displaystyle {\sqrt {1+x}}} pro − 1 ≤ x ≤ 1. {\displaystyle -1\leq x\leq 1.}
1 + x = 1 + 1 2 x − 1 2 ⋅ 4 x 2 + 1 ⋅ 3 2 ⋅ 4 ⋅ 6 x 3 − 1 ⋅ 3 ⋅ 5 2 ⋅ 4 ⋅ 6 ⋅ 8 x 4 + … {\displaystyle {\sqrt {1+x}}=1+{1 \over 2}x-{1 \over {2\cdot 4}}x^{2}+{{1\cdot 3} \over {2\cdot 4\cdot 6}}x^{3}-{{1\cdot 3\cdot 5} \over {2\cdot 4\cdot 6\cdot 8}}x^{4}+\ldots }
Zkontrolujte s využitím standardní funkce std::sqrt(double)
[ Zpět ]