Search for a tool
Series Expansion

Tool to calculate series expansions (Taylor, etc.) allowing an approximation of a mathematical function or expression.

Results

Series Expansion -

Tag(s) : Functions

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our community Discord for help requests!


Thanks to your feedback and relevant comments, dCode has developed the best 'Series Expansion' tool, so feel free to write! Thank you!

Series Expansion

Series Expansion Calculator





Tool to calculate series expansions (Taylor, etc.) allowing an approximation of a mathematical function or expression.

Answers to Questions

How to calculate a series expansion?

To compute a (limited) series expansion of order $ n $ of a function $ f(x) $ in the neighborhood of a value $ a $, if the function is differentiable in $ a $, then it is possible to use the Taylor-Young formula which decomposes any function into:

$$ f(x) = f(a) + \frac{f'(a)}{1!}(x-a) + \frac{f^{(2)}(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^{n} + O(x^{n+1}) \\ = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^{k} + O(x^{n+1}) $$

with $ O (x^n) $ the Big O (Landau's asymptotic notation) indicating precision, a value tending to be negligible with respect to $ (x-a)^n $ in the neighborhood of $ a $.

Example: The exponential function (having an nth derivative easy to calculate) has a limited expansion in $ 0 $: $ \exp(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots + \frac{x^n}{n!} + O(x^n) $$

What are the series expansion of the usual functions?

Here is a form of the usual Taylor/Maclaurin series to know:

$ \exp(x) = $$$ \sum_{n=0}^{\infty} \frac{x^n}{n!} \\ = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots + \frac{x^n}{n!} + O(x^n+1) $$
$ \ln(1-x) = $$$ -\sum_{n=1}^{\infty} \frac{x^n}{n} \\ = -x- \frac{x^2}{2} - \frac{x^3}{3} - \cdots - \frac{x^n}{n} + O(x^n+1) $$
$ \ln(1+x) = $$$ \sum_{n=1}^{\infty} (-1)^{n+1} \frac{x^n}{n} \\ = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots + (-1)^{n+1} \frac{x^n}{n} + O(x^n+1) $$
$ (1+x)^a = $$$ \sum_{n=0}^{\infty}\binom{a}{n} x^n = \sum_{n=0}^{\infty} x^n \prod _{k=1}^{n}{\frac {\alpha -k+1}{k}} \\ = 1 + ax + \frac{a(a-1)}{2!}x^2 + \frac{a(a-1)(a-2)}{3!}x^3 + \cdots + \frac{a(a-1)(a-2)\cdots(a-n+1)}{n!}x^n + O(x^n+1) $$
$ (1+x)^{1/2} = \\ \sqrt{1+x} = $$$ 1 + \frac{1}{2}x - \frac{1}{8}x^2 + \frac{1}{16}x^3 - \frac{5}{128}x^4 + \frac{7}{256}x^5 + \cdots $$
$ (1+x)^{-1/2} = \\ \frac{1}{\sqrt{1+x}} = $$$ 1 -\frac{1}{2}x + \frac{3}{8}x^2 - \frac{5}{16}x^3 + \frac{35}{128}x^4 - \frac{63}{256}x^5 + \cdots $$
$ \frac{1}{1+x} = $$$ \sum_{n=0}^{\infty} (-1)^n x^n \\ = 1 - x + x^2 - x^3 + \cdots + (-1)^n x^n + O(x^n) $$
$ \frac{1}{(1+x)^2} = $$$ \sum_{n=0}^{\infty} (-1)^n nx^{n-1} \\ = 1 - 2x + 3x^2 - \cdots + (-1)^n nx^{n-1} + O(x^n) $$
$ \frac{1}{1-x} = $$$ \sum_{n=0}^{\infty} x^{n} \\ = 1 + x + x^2 + \cdots + x^n + O(x^n) $$
$ \frac{1}{(1-x)^2} = $$$ \sum_{n=1}^{\infty} nx^{n-1} \\ = 1 + 2x + 3x^2 + \cdots + nx^{n-1} + O(x^n) $$
$ \cos(x) = $$$ \sum^{\infty}_{n=0} \frac{(-1)^n}{(2n)!} x^{2n} \\ = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots + \frac{(-1)^n}{(2n)!} x^{2n} + O(x^{2n+1}) $$
$ \sin(x) = $$$ \sum^{\infty}_{n=0} \frac{(-1)^n}{(2n+1)!} x^{2n+1} \\ = x - \frac{x^3}{3!} + \frac{x^{5}}{5!} - \cdots + \frac{(-1)^n}{(2n+1)!} x^{2n+1} + O(x^{2n+2}) $$
$ \tan(x) = $$$ \sum^{\infty}_{n=1} \frac{B_{2n} (-4)^n (1-4^n)}{(2n)!} x^{2n-1} \\ = x + \frac{x^3}{3} + \frac{2x^5}{15} + \frac{17x^7}{315} + \cdots + \frac{B_{2n}(-4)^n(1-4^n)}{(2n)!} x^{2n-1} + O(x^{2n}) $$
$ \sec(x) = $$$ \sum^{\infty}_{n=0} \frac{(-1)^n E_{2n}}{(2n)!} x^{2n} \\ = 1 + \frac{x^2}{2} + \frac{5x^4}{24} + \cdots + \frac{(-1)^n E_{2n}}{(2n)!} x^{2n} + O(x^{2n+1}) $$
$ \arccos(x) = $$$ \frac{\pi}{2} - \sum^{\infty}_{n=0} \frac{(2n)!}{4^n (n!)^2 (2n+1)} x^{2n+1} \\ = \frac{\pi}{2} - x - \frac{x^3}{2 \times 3} - \frac{1 \times 3 \times x^5}{2 \times 4 \times 5} - \cdots - \frac{1 \times 3 \times 5 \cdots (2n-1)x^{2n+1}}{2 \times 4 \times 6 \cdots (2n) \times (2n+1)} + O(x^{2n+2}) $$
$ \arcsin(x) = $$$ \sum^{\infty}_{n=0} \frac{(2n)!}{4^n (n!)^2 (2n+1)} x^{2n+1} \\ = x + \frac{x^3}{2 \times 3} + \frac{1 \times 3 \times x^5}{2 \times 4 \times 5} + \cdots + \frac{1 \times 3 \times 5 \cdots (2n-1)x^{2n+1}}{2 \times 4 \times 6 \cdots (2n) \times (2n+1)} + O(x^{2n+2}) $$
$ \arctan(x) = $$$ \sum^{\infty}_{n=0} (-1)^{n}\frac{x^{2n+1}}{2n+1} \\ = x - \frac{x^3}{3} + \frac{x^5}{5} - \cdots + (-1)^{n}\frac{x^{2n+1}}{2n+1} + O(x^{2n+2}) $$
$ \cosh(x) = $$$ \sum^{\infty}_{n=0} \frac{x^{2n}}{(2n)!} \\ = 1 + \frac{x^2}{2!} + \frac{x^4}{4!} + \cdots + \frac{x^{2n}}{(2n)!} + O(x^{2n+1}) $$
$ \sinh(x) = $$$ \sum^{\infty}_{n=0} \frac{x^{2n+1}}{(2n+1)!} \\ = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \cdots + \frac{x^{2n+1}}{(2n+1)!} + O(x^{2n+2}) $$
$ \tanh(x) = $$$ \sum^{\infty}_{n=1} \frac{B_{2n} 4^n \left(4^n-1\right)}{(2n)!} x^{2n-1} \\ = x - \frac{x^3}{3} + \frac{2x^5}{15} - \frac{17x^7}{315} + \cdots + \frac{B_{2n} 4^n (4^{n}-1)}{(2n)!} x^{2n-1} + O(x^{2n}) $$
$ \operatorname{asinh}(x) = $$$ \sum^{\infty}_{n=0} \frac{(-1)^n (2n)!}{4^n (n!)^2 (2n+1)} x^{2n+1} \\ = x - \frac{x^3}{2 \times 3} + \cdots +(-1)^{n} \frac{1 \times 3 \times 5 \cdots (2n-1)x^{2n+1}}{2 \times 4 \times 6 \cdots (2n) \times (2n+1)} + O(x^{2n+2}) $$
$ \operatorname{atanh}(x) = $$$ \sum^{\infty}_{n=0} \frac{x^{2n+1}}{2n+1} \\ = x + \frac{x^3}{3} + \cdots + \frac{x^{2n+1}}{2n+1} + O(x^{2n+2}) $$

NB: $ B_n $ are the Bernoulli numbers and $ E_n $ are the Euler numbers

Source code

dCode retains ownership of the online 'Series Expansion' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for Series Expansion download for offline use on PC, tablet, iPhone or Android !

Need Help ?

Please, check our community Discord for help requests!

Questions / Comments

Thanks to your feedback and relevant comments, dCode has developed the best 'Series Expansion' tool, so feel free to write! Thank you!


Source : https://www.dcode.fr/series-expansion
© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.
Feedback