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

  • Context: MHB 
  • Thread starter Thread starter ognik
  • Start date Start date
  • Tags Tags
    Series
Click For Summary

Discussion Overview

The discussion revolves around improving the accuracy of a Taylor series expansion for the function \( e^{\tan(x)} \) near \( x = \frac{\pi}{4} \). Participants explore the effectiveness of their series approximations and the implications of using different terms in the expansion.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant notes that their series is accurate at \( x = 0 \) but less so at \( x = \frac{\pi}{4} \), suggesting a need for more terms in the expansion to improve accuracy.
  • Another participant challenges the initial approach, indicating that the entire series for \( \tan(x) \) should be used in the expansion rather than truncating it early.
  • A later reply provides a detailed expansion of \( e^{\tan(x)} \), showing how to incorporate higher-order terms, but acknowledges that this may lead to complex calculations.
  • One participant tests the final series at \( x = \frac{\pi}{4} \) and finds a significant error from the exact value, prompting questions about the number of terms needed for a good approximation.
  • Another participant mentions the slow convergence of the series and suggests that centering the Taylor series at \( x = \frac{\pi}{4} \) might yield better results.

Areas of Agreement / Disagreement

Participants express varying opinions on the adequacy of their series expansions, with some agreeing on the need for more terms while others question the effectiveness of their approaches. The discussion remains unresolved regarding the optimal number of terms for accurate approximation.

Contextual Notes

There are limitations in the assumptions made about the convergence and accuracy of the series, as well as the dependence on the specific expansion point. The discussion highlights the complexity of determining the appropriate order of terms in a Taylor series.

Who May Find This Useful

Readers interested in series expansions, Taylor series, and approximation methods in mathematics may find this discussion relevant.

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...
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 17 ·
Replies
17
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K