evaluate a integral by taylor series

2008-01-28 4:53 am
http://www.hkedcity.net/sch_files/a/kst/kst-06185/public_html/esinln.jpg

correct your answer in 4 decimal places!!
==============================

the first step in my mind is find out the taylor series of e^x,sinx and lnx, and then multiply them all to obtain a new polynomial approximation so that we can integrate it without difficulties.

but the questions are....

1. although i can find the taylor series of e^x,sinx and lnx easily, how can we ensure the accuracy (4 deci. places)?

回答 (1)

2008-01-28 8:47 am
✔ 最佳答案

It is not clear whether this exercise is to be done with the computer (programming) or by
hand, or by Excel.

I assume this is not a computer programming problem,
since the question is asked under mathematics.

First, itis important to find the proper expansions that are valid within the
range 0.5 to 1.0

For ex and sin(x), there is no problem, because the common expansions are
valid for all values of x.


e(x)=1+x+x2/2!+x3/3!+...xn/n!+.... (n = infinity)
sin(x)=x-x3/3!+x5/5!-... +(-1)n*x(2*n+1)/(2*n+1)!+..... (n=infinity)

For log(x), many expansions are valid for x=0 to 1 only.
So it is important to avoid those. You can use the following expansion which is valid
for 0 < x <= 2:


log(x)=(x-1)-(x-1)2/2+(x-1)3/3+(x-1)4/4-....+(-1)(n+1)*(x-1)n/n + ... (n= infinity)



By now, we have come up with three polynomials which converge reasonably well.

Using the fact that all the series converge at least as fast as a geometric series,
a rough calculation tells us that the accuracy of the individual series will not
require more than a power of 9 to evaluate to 4 decimal places.

For example, x^8/8!=.00002, (.5)^10/10=0.00009,
So by expanding to power 10 or 11 for sin(x) and exp(x), and to 12 terms for log(x), we
have sufficient accuracy for the original series.

We will revisit the accuracy aspect after we have integrated.

Now we multiply together the three polynomials, and integrate term by term.

Examine the resulting polynomial term by term for the worst case of x=1. We look for
the coefficient <0.0001 and the ratio with the next term sufficiently small so that the
truncation error is minimal.

By doing the calculations, we will conclude that the above terms should be sufficient, or
that the neglected terms are not contributing to accuracy required.

Here is a graph of the individual series, and we note that they are monotonic increasing
without discontinuities.

圖片參考:http://i263.photobucket.com/albums/ii157/mathmate/integral.png
Figure 1

If you follow through with the calculations, you will find that the resulting integral is

I(0.5 to 1) = -0.18402735...

The correct value by Romberg's numerical integration is 0.18402776346373.



2008-01-28 01:14:29 補充:
You will need to retain terms up to x^24 to get the precision required!


收錄日期: 2021-04-13 15:02:30
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080127000051KK03511

檢視 Wayback Machine 備份