MHB Improving the Accuracy of a Taylor Series for exp(tan x) Near x = π/4

  • Thread starter Thread starter ognik
  • Start date Start date
  • Tags Tags
    Series
ognik
Messages
626
Reaction score
2
I got a series which was accurate for x=0, but less so for x= $ \frac{\pi}{4}\: (2.422\: instead\: of \: 2.718) $ and decreasing accuracy for $ \frac{\pi}{2} < x < \frac{\pi}{4} $

I used 1st 3 terms of $ e^{x} = 1 + x + \frac{{x}^{2}}{2!} + \frac{{x}^{3}}{3!} + $
$ \therefore e^{Tan(x)} = 1 +Tan(x) + \frac{{\left(Tan(x)\right)}^{2}}{2!} $
I used Tan(x) (from a previous exercise $ = x + \frac{{x}^{3}}{3} + \frac{2{x}^{2}}{15} + $
and finally, discarding terms > x5:
$ e^{Tan(x)}= 1 + x + \frac{1}{2}{x}^{2} + \frac{{x}^{3}}{3} + \frac{{x}^{4}}{3} + \frac{2{x}^{2}}{15} $
Am I close? (I 'feel' like the expansion should be accurate to the 1st decimal at least). Is there a better way to do the expansion (using Taylor though)?
Thanks for reading.
 
Physics news on Phys.org
ognik said:
I got a series which was accurate for x=0, but less so for x= $ \frac{\pi}{4}\: (2.422\: instead\: of \: 2.718) $ and decreasing accuracy for $ \frac{\pi}{2} < x < \frac{\pi}{4} $

I used 1st 3 terms of $ e^{x} = 1 + x + \frac{{x}^{2}}{2!} + \frac{{x}^{3}}{3!} + $
$ \therefore e^{Tan(x)} = 1 +Tan(x) + \frac{{\left(Tan(x)\right)}^{2}}{2!} $
I used Tan(x) (from a previous exercise $ = x + \frac{{x}^{3}}{3} + \frac{2{x}^{2}}{15} + $
and finally, discarding terms > x5:
$ e^{Tan(x)}= 1 + x + \frac{1}{2}{x}^{2} + \frac{{x}^{3}}{3} + \frac{{x}^{4}}{3} + \frac{2{x}^{2}}{15} $
Am I close? (I 'feel' like the expansion should be accurate to the 1st decimal at least). Is there a better way to do the expansion (using Taylor though)?
Thanks for reading.

The reason you're getting "decreasing accuracy" is because the series is incorrect. When you are close to 0, the mistaken terms don't make that much difference, but the further away you go, the more they will.

Your approach is correct, but where you have substituted in tan(x), you need to put the WHOLE tan(x) series and then expand up to whatever term you want to go to (you said $\displaystyle \begin{align*} x^5 \end{align*}$)...

$\displaystyle \begin{align*} \mathrm{e}^{\tan{(x)}} &= 1 + \tan{(x)} + \frac{\tan^2{(x)}}{2} + \frac{\tan^3{(x)}}{3!} + \frac{\tan^4{(x)}}{4!} + \frac{\tan^5{(x)}}{5!} + \dots \\ &= 1 + \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) + \frac{1}{2} \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) ^2 + \frac{1}{6} \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) ^3 + \frac{1}{24} \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) ^4 + \frac{1}{120} \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) ^5 \\ &= 1 + x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots + \frac{1}{2} \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) + \frac{1}{6} \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) ^2 \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) + \frac{1}{24} \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) ^2 \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) ^2 + \frac{x^5}{120} + \dots \\ &= 1 + x + \frac{x^3}{3} + \frac{2x^5}{15} + \frac{1}{2} \left( x^2 + \frac{x^4}{3} + \frac{x^4}{3} + \dots \right) + \frac{1}{6} \left( x^2 + \frac{2x^4}{3} + \dots \right) \left( x + \frac{x^3}{3} + \frac{2x^5}{15} + \dots \right) + \frac{1}{24} \left( x^2 + \frac{2x^4}{3} + \dots \right) \left( x^2 + \frac{2x^4}{3} + \dots \right) + \frac{x^5}{120} + \dots \\ &= 1 + x + \frac{x^3}{3} + \frac{2x^5}{15} + \frac{x^2}{2} + \frac{x^4}{3} + \frac{1}{6} \left( x^3 + \frac{x^5}{3} + \frac{2x^5}{3} + \dots \right) + \frac{x^4}{24} + \dots + \frac{x^5}{120} + \dots \\ &= 1 + x + \frac{x^3}{3} + \frac{2x^5}{15} + \frac{x^2}{2} + \frac{x^4}{3} + \frac{x^3}{6} + \frac{x^5}{6} + \frac{x^4}{24} + \frac{x^5}{120} + \dots \\ &= 1 + x + \frac{x^2}{2} + \frac{x^3}{2} + \frac{3x^4}{8} + \frac{37x^5}{120} + \dots \end{align*}$
 
That is going beyond the call to do all those expansions, many thanks prove it - it showed me clearly that I was leaving out terms below x5 - but my curiosity is not completely assuaged ...

I tested your final series - again with x=pi/4 - and got 2.49015 which is ~0.23 from the exact solution of e = 2.71828
This suggests that I would need to expand to terms in x7 (or even higher) to get an error ~ 0.1
I am curious because during this chapter I have gained the impression that only 2 or 3 terms of a series is often a 'good' approximation. Is my intuition here correct, and is there some rule of thumb that helps to decide what order of term to expand to? Thanks again.
 
ognik said:
That is going beyond the call to do all those expansions, many thanks prove it - it showed me clearly that I was leaving out terms below x5 - but my curiosity is not completely assuaged ...

I tested your final series - again with x=pi/4 - and got 2.49015 which is ~0.23 from the exact solution of e = 2.71828
This suggests that I would need to expand to terms in x7 (or even higher) to get an error ~ 0.1
I am curious because during this chapter I have gained the impression that only 2 or 3 terms of a series is often a 'good' approximation. Is my intuition here correct, and is there some rule of thumb that helps to decide what order of term to expand to? Thanks again.

I get about 2.5089. It appears that this series converges very slowly. There is no real rule of thumb, but if you find that your series is not suitable, you may want to try centring your series nearer to where you want the series to be evaluated...
 
Prove It said:
... you may want to try centring your series nearer to where you want the series to be evaluated...

Just checking - in this case a Taylor series with a= $ \frac{\pi}{4} $ ?

I see a lot of stuff on the web, on speed of convergence - but it seems to be a little non-specific in terms of quantifying a rate of convergence ...and they require knowledge of the limit...
 
Back
Top