# Finding the first 5 terms of a Maclaurin Series using division?

I'm trying to find the first five terms of a Maclaurin series using division.

Is there possibly a shorter way because every time I try to do it for $$\frac{\sin x}{e^x}$$

I get the wrong answer: $x-2x^3/3+\cdots$

I don't really like polynomial long division.

This is how I set it up:

x - x^3/3! + x^5/5! - x^7/7! ÷ 1 + x + x^2/2! + x^3/3! + x^4/4!

I'm still getting the same answer.

-
Either you divide, or you compute the series by computing the derivatives of $\sin x/e^x$ directly. The series does not start like you say it does, so your computation is wrong. In any case, "I don't really like polynomial long division" is not exactly motivation... –  Mariano Suárez-Alvarez Mar 28 '11 at 3:07
I've tried long division and that's the answer I get. –  user8640 Mar 28 '11 at 3:11
Well, you are doing it wrong, then! The series for that function starts $x - x^2 + x^3/3 + \cdots$ By the way, why do you think the result you get is weird? –  Mariano Suárez-Alvarez Mar 28 '11 at 3:13
@Mariano Suárez-Alvarez: Because it's not the right answer. –  user8640 Mar 28 '11 at 3:29
Oh. You could probably edit the body of the question to replace weird by wrong, which is much more clear :) –  Mariano Suárez-Alvarez Mar 28 '11 at 3:34

You can avoid division by writing $$\frac{\sin x}{e^x}=e^{-x} \sin x.$$ Multiply the series for $e^{-x}$ and $\sin x$ together to get the result.

-
Does that really save work? –  t.b. Mar 28 '11 at 3:22
@Theo: Since both the series for $\sin x$ and for $e^{-x}$ are pretty easy, I would say it kind of does... –  Arturo Magidin Mar 28 '11 at 3:24
For general $f(x)/g(x)$, this probably isn't much savings. But since we happen to know the series for $1/g(x)$ here, yeah, I think it helps. –  Michael Lugo Mar 28 '11 at 4:19

Here are the first two terms:

$x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dfrac{x^7}{7!} + \cdots$

$=x\left(1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \dfrac{x^4}{4!}+ \dfrac{x^5}{5!}+ \dfrac{x^6}{6!}\cdots\right) -x^2 -\dfrac{2x^3}{3}-\dfrac{x^4}{6}-\dfrac{x^5}{30}-\dfrac{x^6}{120}-\dfrac{x^7}{5040}-\cdots$

$= (x-x^2)\left(1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \dfrac{x^4}{4!}+ \dfrac{x^5}{5!}+ \dfrac{x^6}{6!}\cdots\right) +\dfrac{x^3}{3}+\dfrac{x^4}{3}+\dfrac{2x^5}{15}+\dfrac{x^6}{30}+\dfrac{17x^7}{2520}+\cdots$

and you can continue from there, taking the first term of the residual of the second part as the next term to put into the multiplication in the first part.

-

First off, $\sin(x)/e^x = Im(e^{(i-1)x})$ so the desired series is:
$$0+(-1)x^1/1!+(-2)x^2/2!+(-1+3)x^3/3!+(-4+4)x^4/4! + ...$$
So it looks to me like you're going to have to go to 6th order to get the first five nonzero terms, depending on what they mean by "terms". Now as to doing the division,
$$(x - x^3/3! + x^5/5! - x^7/7!) / (1 + x + x^2/2! + x^3/3! + x^4/4!)$$
The first result is $x$. So you multiply the $e^x$ by $x$ and subtract. The remainder is:
$$-x^2-(1/3!+1/2!)x^3 - x^4/4!+(1/5!-1/4!)x^5...$$ So the next term is $-x^2$. Continue on with this...

-

HINT $\$ It's the imaginary part of an expression, and every coefficient of $\rm\:x^{4\:n}\:$ is zero by multisection / symmetry, so you need only compute it up to $\rm\:x^3\:.$

-