# Need help with maclaurin series question

1. Mar 11, 2005

### Yura

its using the Maclaurin series, i have already worked out the equations:

cos x = 1 - (x^2)/2! + (x^4)/4! - (x^6)/6! + (x^8)/8! - (x^10)/10! + ...
e^x = 1 + x + (x^2)/2! +(x^3)/3! + (x^4)/4! + (x^5)/5! + (x^6)/6! + ...

how do i use these two results to obtain the first 6 terms on the maclaurin series for e^x.cos x?

i've been working at this question for ages and cannot get it.
thanks heaps if anyone can help me out.

2. Mar 11, 2005

### BobG

You want the first terms of $$cos x e^x$$?

You do it the same way you did each term individually. You find the first derivative (you need the product rule), the second derivative (even longer), the third derivative (not so bad - a couple of terms in the second derivative cancelled out), and so on.

Evaluate each of those derivatives and apply them the same way you did when you found each individual term.

Edit: Your first 6 coefficients should wind up being 1,1,0,-2,-4, and 0 if you find your derivatives correctly.

3. Mar 11, 2005

### Yura

ok i'll try that, thanks for that. i didnt think to try it
thanks again

4. Mar 11, 2005

### shmoe

You can also multiply the series together, keeping as many terms as necessary:

e^x.cos x=(1 + x + (x^2)/2! +(x^3)/3! +...)(1 - (x^2)/2! + (x^4)/4! -...)
=1(1 - (x^2)/2! + (x^4)/4! -...)+x(1 - (x^2)/2! + (x^4)/4! -...)+x^2/2!(1 - (x^2)/2! + (x^4)/4! -...)+.....

Distribute over the brackets and collect terms. How many terms you need from each bracket depends on how many terms in the final series you want.

5. Mar 11, 2005

### Yura

hmm.. i just tried it in maple 6 but it didn't come out too well because i cant really work it.. i think i'll try it manually for now. i'll try work it your method aswell shmoe.
thanks

6. Mar 11, 2005

### shmoe

code that works in maple V:

series(exp(x)*cos(x),x=0,6);

Change the 6 if you want more or less terms.

But do it by hand too!

7. Mar 12, 2005

### Yura

ah k, thanks

8. Mar 12, 2005

### Yura

sorry about this but i've done the code for maple and it worked but i was trying to do it manually aswell but i cant seem to get past the third differentiation.
i was using maple 6 to solve it but it was only giving me partial differentiations and i couldnt complete it.

this is what i have (im not sure if its right) so far:
f(x) = e^x*cosx
f^1(x) = e^x*ln(e)*cosx - e^x*sinx
f^2(x) = e^x*ln(e)^2*cosx - 2e^x*ln(e)*sinx - e^x*cosx

and thats about how far i got. i tried getting to the next one but i keep messing it up and getting it all wrong. could someone please help me do this. i dont know what im going to do because i need ssix terms and if some of the terms wind up like (sin 0) then i'll need to do alot of differentiations...
is there a shortcut rule to differentiating this?
help is really appreciated.

9. Mar 12, 2005

### shmoe

No shortcut I can think of. This is probably why you were given the series for e^x and cos(x), multiplying the series is less work and less error prone (to me anyways).

to differentiate a function 6 times in maple you can use diff(f(x),x,x,x,x,x,x); Change the number of x's to change the number of times you differentiate.

10. Mar 12, 2005

### Data

Don't forget that $$\ln{e} = 1$$!

11. Mar 12, 2005

### SomeRandomGuy

Why are you trying to differentiate the terms? The method your doing is like trying to shovel snow with a spoon... it's way to hard. You know the series for cos(x) and e^x, just multiply the 2 series together term by term like someone said.

12. Mar 12, 2005

### Yura

thanks, i think i have the series now:
f(x) = 1 + x – (x^3)/3 – (x^4)/6 – (x^5)/30 + (8x^7)/7!

but im not sure why they left the 2nd derivitive out in maple 6 but not the 6th one

Last edited: Mar 12, 2005
13. Mar 12, 2005

### shmoe

In the answer you're quoting from maple the last term isn't 0*x^6, it's O(x^6). This is the usual Big-Oh notation.

14. Mar 12, 2005

### Yura

ah, ok thanks!