# General square form of Taylor expansion polynomial

Suppose we have a Taylor expansion for a function $$f$$ with respect to t up to $$M$$-th order.

$$$$T_M = \sum^M_{k=0}\frac{1}{k!}f^k(x)\Delta t^k = f(x) + f'(x)\Delta t + \frac{1}{2}f''(x)\Delta t^2 + \cdots$$$$

What would be the general form of $$T_M^2$$ with respect to $$\Delta t$$?

$$$$T_M\times T_M = (\sum^M_{k=0}\frac{1}{k!}f^k(x)\Delta t^k)^2 = (???) + (???)\Delta t + (???)\Delta t^2 + \cdots$$$$

Perhaps Multinomial theorem can help?

• It's just the general form for squaring a polynomial, but you can drop higher order terms if all you want is the $M$th order approximation. Note: the $1/k!$ is inside the summation. May 27 '19 at 13:51

Since we are squaring a sum we can utilize $$\left( \sum_{k=1}^{n} a_k \right)^2 = \sum_{k=1}^{n} \sum_{j=1}^{n} a_ka_j$$ Applying this formula onto our problem yields
$$\left(\sum_{k=0}^{M} \frac{1}{k!}f^k(x)\Delta t^k\right)^2 = \sum_{k=0}^{M}\sum_{j=0}^{M} \frac{1}{k!}\frac{1}{j!}f^k(x)f^j(x)\Delta t^{k+j}$$ Taking a closer look at the coefficients of $$\Delta t^{k+j}$$, we see that there are $$k+j+1$$ different combinations of $$k$$ and $$j$$. For example ($$k+j=3$$ cf. Jose Brox' answer), we have the combinations for: $$(k,j) \in \{(0,1),(1,2),(2,1),(3,0)\}$$
Thus we can rewrite the above sum $$\sum_{k=0}^{M}\sum_{j=0}^{M} \frac{1}{k!}\frac{1}{j!}f^k(x)f^j(x)\Delta t^{k+j} = \sum_{k=0}^{M}\left[ \sum_{j=0}^{k}\frac{1}{j!}\frac{1}{(k-j)!}f^j(x)f^{k-j}(x)\right]\Delta t^k$$ where the coefficient corresponding to the $$k$$-th exponent is $$\sum_{j=0}^{k}\frac{1}{j!(k-j)!}f^j(x)f^{k-j}(x)$$
• In the second last equation, is that truncated to the order $M$? Jun 5 '19 at 10:32
• My fault, I think it should be $k$ instead of $M$ in the second sum term. Nov 5 '19 at 15:58
Like with usual polynomial multiplication, the term of degree $$k$$ comes from adding up all products of two monomials whose degrees sum to $$k$$. For example, for degree $$3$$ you have $$(0,3)+(1,2)+(2,1)+(3,0)$$.