# Find first five terms of the power series representation for the function

f(x) = ${e^x cos(x^2)}$

So I have the answer which is ${1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+(\frac{1}{4!}-\frac{1}{2!})x^4+...}$

So I know that ${e^x = \sum\frac{x^n}{n!}}$ and that ${cos(x)=\sum(-1)^n\frac{x^{2n}}{(2n)!}}$

However I don't see/understand how this is the answer. The first 4 terms look like ${\sum e^x}$ then it changes which is due to the cosine I am guessing.

How can I represent ${cos(x^2)}$ as a series? I think it is ${\sum(-1)^n\frac{x^{4n}}{(2n)!}}$.

Furthermore how can I represent f(x) as a power series?

Thanks for any help in advance!

## 2 Answers

Your series for $e^x$ and $\cos(x^2)$ are correct. If you want to multiply two series, think about $(1+a_1x+a_2x^2+a_3x^3+\dots )(1+b_1x+b_2x^2+b_3x^3+\dots )=1+(a_1+b_1)x+(a_2+b_2+a_1b_1)x^2+\dots$
Can you see where each term in $x, x^2$ comes from? Can you do the $x^3$ term?

• So the ${x^3}$ term would be ${(a_3 + b_3 + a_2b_2)x^3}$? So, I think I get it why this works for ${e^xcos(x^2)}$ Since the series of ${cos(x^2)}$ jumps from 1 to ${\frac{-x^4}{2}}$ and thus its ${a_1,a_2,}$ and ${a_3}$ are all 0. – boidkan Aug 8 '14 at 3:06
• No, because $a_2$ and $b_2$ each come with $x^2$, so $a_2b_2$ is part of the $x^4$ term. But you are correct that the first three terms of $\cos (x^2)$ after the constant $1$ are zero. – Ross Millikan Aug 8 '14 at 3:08
• Shouldn't it be ${(a_n + a_n)x^n}$ for each term I am a bit confused with how you get the ${+a_nb_n}$ part such as in the ${x^2}$ term. – boidkan Aug 8 '14 at 3:14
• In my example, the term $a_1b_1x^2$ came from multiplying $a_1x$ and $b_1x$. That is why I asked what I did. I suggest you distribute the series by hand for at least the $x^3$ term and (even better) the $x^4$ term. It will help your insight. This is called convolution. – Ross Millikan Aug 8 '14 at 3:20
• The point of the problem is to multiply the power series instead of differentiating four times. The choice of five terms was to make the $\cos (x^2)$ have an effect. If you want to get the point, you need to understand those two sentences. – Ross Millikan Aug 8 '14 at 3:46

Or you could use the power series. Notice that $f(x) = e^x \cos(x^2)$ is infinitely differentiable. So if a power series expansion exists and is convergent in an interval then it is the same as the Taylor series for that function on that particular interval.

Hence $$f(x) = f(0) + \frac{f'(0)}{1!} x + \frac{f''(0)}{2!} x^2 + ... + \frac{f^{(n)}(0)}{n!} x^n + ...$$

where $f'(0), f''(0), f^{(n)(0)}$ are the first, second and $n$th derivative of $f(x)$ evaluated at $x = 0$.

Sop all you have to do is to diferentiate $f(x)$ 5 times and plug in $0$. Do this if you feel the computation is a little easier than multiplying the two power series for $e^x$ and $\cos (x^2)$. This method does not require the knowledge of those two either.

• Yes, I believe this is what the professor is wanting me to do. The derivatives get complicated fast! Thanks! – boidkan Aug 8 '14 at 3:36
• Yeah they do actually. Now that I think about it the 5th derivative will have 16 additive terms. So your choice. – Ishfaaq Aug 8 '14 at 3:37
• Well part (b) of the questions asks to find ${f^4(0)}$ So I think the professor used Ross's method for part (a) then used ${\frac{1}{4!}-\frac{1}{2!}}$ to solve for it which is -11. She only provided the answers and didn't show how she got them though. – boidkan Aug 8 '14 at 3:45