# Thread: Taylor polynomials... no way seems practical..

1. ## Taylor polynomials... no way seems practical..

e^(t)cos(t), find first 4 terms centered at 0.

Alright, I know of two methods for doing this, and both seem remarkably painful.

I thought of listing 4 terms of each series (e^t and cost) and just multiplying them as polynomials and combining like terms. This wildly confuses me..

Then, someone recommended that I use derivatives to find the coefficients. Differentiating that function 4 times would be outright terrible.

Which way is the recommended?

2. ## Re: Taylor polynomials... no way seems practical..

Originally Posted by OneMileCrash
e^(t)cos(t), find first 4 terms centered at 0.

Alright, I know of two methods for doing this, and both seem remarkably painful.

I thought of listing 4 terms of each series (e^t and cost) and just multiplying them as polynomials and combining like terms. This wildly confuses me..

Then, someone recommended that I use derivatives to find the coefficients. Differentiating that function 4 times would be outright terrible.

Which way is the recommended?
The first way is the easiest...

3. ## Re: Taylor polynomials... no way seems practical..

I went with the second way, finding the fourth derivative wasn't nearly as bad as I thought.

First way seems wildly harder still. Is it a matter of opinion or would you say that I'm just doing the first way incorrectly if I think that?

4. ## Re: Taylor polynomials... no way seems practical..

matter of opinion ... I just multiplied the polynomials up to $\displaystyle t^4$

$\displaystyle e^t\cos{t} \approx 1 + t - \frac{t^3}{3} - \frac{t^4}{6}$

5. ## Re: Taylor polynomials... no way seems practical..

well you don't want "the first four terms" of each series for the first method, you want the product of any terms that could contribute to the first 4 terms of the product.

so anything higher than a term of $\displaystyle t^3$ can be disregarded (but see below). if we write the coefficents of the terms for $\displaystyle e^t$ as $\displaystyle a_i$ and the terms for $\displaystyle \cos(t)$ as $\displaystyle b_i$, and the terms of $\displaystyle e^t\cos(t)$ as $\displaystyle c_i$, then:

$\displaystyle c_0 = a_0b_0$
$\displaystyle c_1 = a_0b_1 + a_1b_0$
$\displaystyle c_2 = a_0b_2 + a_1b_1 + a_2b_0$
$\displaystyle c_3 = a_0b_3 + a_1b_2 + a_2b_1 + a_3b_0$

note that all the odd terms $\displaystyle b_i$ are 0, since cosine is an even function. we have:

$\displaystyle a_0 = 1, a_1 = 1, a_2 = \frac{1}{2}, a_3 = \frac{1}{6}$
$\displaystyle b_0 = 1, b_2 = -\frac{1}{2}$ so:

$\displaystyle c_0 = (1)(1) = 1$
$\displaystyle c_1 = (1)(1) = 1$
$\displaystyle c_2 = (1)(-\frac{1}{2}) + (\frac{1}{2})(1) = 0$

$\displaystyle c_3 = (1)(-\frac{1}{2}) + (\frac{1}{6})(1) = -\frac{1}{3}$

if we must calculate the first 4 non-zero terms, we need to calculate:

$\displaystyle c_4 = a_0b_4 + a_1b_3 + a_2b_2 + a_3b_1 + a_4b_0$

$\displaystyle = (1)(\frac{1}{24}) + (\frac{1}{2})(-\frac{1}{2}) + (\frac{1}{24})(1) = -\frac{1}{6}$