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

  • MHB
  • Thread starter ognik
  • Start date
  • Tags
    Series
In summary, the conversation discusses the accuracy of a series for x=0 and for x= $ \frac{\pi}{4} $, as well as the decreasing accuracy for $ \frac{\pi}{2} < x < \frac{\pi}{4} $. The speaker shares their approach of using the first three terms of $ e^{x} $ and substituting in $ tan(x) $, but notes that the series is incorrect and suggests using the whole $ tan(x) $ series. The speaker also mentions the need to expand to higher terms, possibly up to x7, in order to get a smaller error. They express their curiosity about the convergence rate and inquire about using a Taylor series with a center at
  • #1
ognik
643
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
  • #2
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*}$
 
  • #3
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.
 
  • #4
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...
 
  • #5
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...
 

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

What is the general form of the series for exp(tan x)?

The general form of the series for exp(tan x) is:
sum from n=0 to infinity of (tan^n(x))/n!

How is the series for exp(tan x) derived?

The series for exp(tan x) can be derived using the Maclaurin series expansion for the trigonometric function tangent and the exponential function. By substituting the Maclaurin series for tangent into the Maclaurin series for exponential, we can obtain the series for exp(tan x).

What is the convergence of the series for exp(tan x)?

The series for exp(tan x) converges for all values of x. However, it may not converge uniformly for all values of x.

How accurate is the series for exp(tan x)?

The accuracy of the series for exp(tan x) depends on the number of terms used in the series. As more terms are added, the accuracy of the approximation increases.

How is the series for exp(tan x) used in real-world applications?

The series for exp(tan x) has various applications in mathematics, physics, and engineering. It is commonly used to approximate complicated functions and to solve differential equations. It also has applications in signal processing and control systems.

Similar threads

Replies
3
Views
2K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
17
Views
3K
Replies
1
Views
2K
Replies
4
Views
2K
Back
Top