# Taylor series

1. Jan 4, 2006

### *Alice*

Can anyone please give me a hint on any of the following Taylor expansions? That would be so helpful!!

for all three: Find the first non-zero term in the Taylor series about x = 0

problem 1

$$\frac{1} {sin^2x} - \frac{1} {x^2}$$

everytime I differentiate the result is zero...so that can't be right

problem 2

$$\frac{(sinx - tan^{-1})} {x^2ln(1+x)}$$

problem 3

$$\frac{(e^{2x} - 2e^x + 1)} {cos(3x) - 2cos(2x) + cosx}$$

Last edited: Jan 4, 2006
2. Jan 4, 2006

### Fermat

Problem 1
Get the series expansion for sinx.
Since you only want the 1st non-zero term in the final expression, then just take the 1st two terms in the expansion for sinx as a reasonable approximation.
Now get the binomial expansion of {sin(x)}^-2
Subtract the 1/x² term

Problem 2
do similarly for ln(1+x) as I suggested you do for Problem 1.

Can you now do problem 3 ?

3. Jan 5, 2006

### *Alice*

Thanks Fermat - it's much appreciated!
I have been able to expand the above functions. However, I'm not quite sure about the following:
If you take only the first non-zero term of every individual function and then add it together and get zero again, you obviously need to take into account the next non-zero term as well.
e.g. $$(sin(x))^{-2}= \frac{1} {x^2} - \frac{1} {x^2} = 0$$
so now, if I do it again, do I need to take all non-zero terms of sinx x up to the second non-zero term, or just the second one.
i.e.
either $$(sin(x))^{-2}= \frac{1} {x^2} - \frac{1} {3} -\frac{1} {x^2} = - 1/3$$
or: $$(sin(x))^{-2}= \frac{1} {3} -\frac{1} {x^2}$$

Last edited: Jan 5, 2006
4. Jan 5, 2006

### Fermat

You should take the 1st two terms only for the exapansion of sinx.
You could take more, but you would be left with extra terms that you don't need, and the working out would take that much longer.

sinx = x - x^3/3! = x - x^3/6 = x(1 - x²/6)
{sinx}^-2 = x^-2{1 - x²/6}^-2 = (1/x²){1 + (-2)(-x²/6) + ...}
{sinx}^-2 = (1/x²)(1 + x²/3) = 1/x² + 1/3
{sinx}^-2 - 1/x² = 1/3
==================

So, the 1st non-zero term is 1/3.

When working this out, you should only take enough terms to get your answer. Just taking the 1st term in the expansion of sinx gives you zero, so that doesn't work. So take another term in the expansion.
This will give you two terms which is handy for using the binomial expansion.
If two terms still didn't work, then you would have to take three terms, but in using the binomial expansion, you would have to bracket two of the terms together, binomially expand them, then expand the bracketed terms. which could end up being a lot of a work!

Using the binomial expansion is a useful trick when you have functions in the denominator.

5. Jan 5, 2006

### *Alice*

thanks fermat!

So now for b I got 1/x

and for c I got

-1/X^2

which I got doing the following:

$$\frac {(-1)^2 * (-e^{x}+1)^2} {cos(3x)-2cos2x + cosx}$$

so now expand the individual terms:

$$cos3x = 1 - 9x^2/2 ...$$

$$-2cos2x = -2 - 4x^2 ...$$

$$cosx = 1 - x^2/2 ...$$

$$(1 - e^{x})^2 = 1 - 2e^{x} ....$$

hence the first non-zero term is:

$$\frac{1} {1 - 4.5x^2 - 2 -4x^2 +1 - 0.5 x^2}$$

i.e. $$\frac{1} {x^2}$$

is that correct?

note: You said that "If two terms still didn't work, then you would have to take three terms," so basically that would mean that I need two terms in the nomator as well?! So the solution should be:

$$\frac{1 - 2e^x} {x^2}$$

Last edited: Jan 5, 2006
6. Jan 5, 2006

### Fermat

For (b), you've missed out a bit somewhere.
For (c), you've missed out using the numerator.

b)
sin(x) = x - x^3/6
atan(x) = x - x^3/3

.: sin(x) - atan(x) = x - x^3/6 - x + x^3/3
sin(x) - atan(x) = x^3/6
{sin(x) - atan(x)}/x² = x/6
====================

ln(1+x) = x - x²/2 + x^3/3

using only the 1st two terms in the series,

{ln(1+x)}^-1 = (x - x²/2)^-1 = (1/x)(1 - x/2)^-1 = (1/x)(1 + (-1)(-x/2) + ...)
{ln(1+x)}^-1 = (1/x + 1/2)
=====================

.: {sin(x) - atan(x)} / {x²ln(1+x)} = {x/6} * {1/x + 1/2} =1/6 + x/12
{sin(x) - atan(x)} / {x²ln(1+x)} = 1/6 + x/12
==================================

So 1st non-zero term is 1/6
======================

You can check the validity of your answer by trying both the original expression and your derived approximaiton for small values of x.
e.g.
x = 0.1: {sin(x) - atan(x)} / {x²ln(1+x)} = {sin(0.1) - atan(0.1)} / {0.1²ln(1.1)} = 0.1729
x = 0.1: 1/6 + x/12 = 1/6 + 0.1/12 = 0.175 <-- checks OK.

c)
Your expression for the denomonator is almost correct, but missing a change of sign. The denominator should be -x².
The numerator is (e^x - 1)² (you don't need the (-1)² bit) which becomes,
2x + x², using the 1st two terms on the maclaurin series for e^x (and e^2x).

So,
{2x + x²} /{-x²} = -1 -2/x

from which the 1st non-zero term is: -1
==============================

N.B. the 1st term will always be the term with the lowest power of x, which here (and in part (b) also) is zero.
If you had a series with 1/x² - 1/x + 4 + 2x + 3x² - ..., then the 1st non-zero term would be 1/x² because it has the lowest power of x.

7. Jan 5, 2006

### Fermat

That comment/suggestion was for using the binomial theorem to create a series for an expression.
But you should always use what terms you have in the numerator. Just using one term gave the wrong answer, although it looks as though you had figured it out as possibly being wrong, with your last suggestion/question.

8. Jan 7, 2006

### benorin

An alternate approach (using derivatives)

As for problem 1:

note that

$$\frac{1}{\sin^2x}-\frac{1}{x^2}=\csc^2x-\frac{1}{x^2}$$
$$=\frac{d}{dx}\left( -\cot x +\frac{1}{x}\right)$$
$$= \frac{d}{dx}\left[ -\left(\frac{1}{x}-\frac{1}{3}x-\frac{1}{45}x^3-\cdot\cdot\cdot \right) +\frac{1}{x}\right]$$
$$= \frac{d}{dx}\left(\frac{1}{3}x+\frac{1}{45}x^3+\cdot\cdot\cdot \right)$$
$$=\frac{1}{3}+\frac{1}{15}x^2+\cdot\cdot\cdot$$

but I have assumed that you know the Taylor Series for cot(x).

Last edited: Jan 7, 2006