quietrain said:
haha..
as a matter of fact, i actually read that page before coming here, in part to double check whether i understood correctly
so if i understood correctly, taylor series is something like this
i have function say 10
taylor expansion does something like 1+3+5 which is approximately 10
? "10" is not a function, it is a number. It makes no sense to talk about a Taylor series for a number.
lets take the example in the wiki page, where the first graph showed sin x
is it saying that the first term, which is the first degree polynomial, is the red straight line in the first graph of the wiki page?
so that the green, which is degree 3, is solely due to just the term in taylor expansion with power 3? i.e, it doesn't include the first term, 2nd term of taylor expansion. or does it include every smaller degree terms before it? since they say i have better approximation as i increase the degrees, i assume it includes every smaller degree terms before it?
Yes, every higher degree includes the lower degree terms- this a a polynomial, not a mononial. Taylor series, by the way, have the nice property that if you increase the degree, the coefficients of all lower powers stay the same. Some other ways of approximating functions by polynomials don't have that property- to increase the degree of the polynomial, you have to recalculate all coefficients.
then what about 2,4,6 etc? why aren't they showed?
sin(x) is an
odd function- sin(-x)= -sin(x). Since the only "odd" polynomials are those with only odd power (that's where the term came from) all the coefficients of the even powers are 0. "Adding" an even power term doesn't change the polynomial.
Another way to see that is to observe that all even derivatives of sin(x) are either sin(x) or -sin(x), and sin(0)= 0.
but with regards to the centered at what point, is my point in post 1 correct? wiki doesn't seem to explain much about centering.
what does it mean?
The Taylor series of a function f(x), centered at x= a, is, as that Wikipedia article says,
\sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!} (x- a)^n
It isn't really necessary to state the "center" since it is clearly shown in that "(x- a)".
The Taylor series for e^x, centered at x= 0, is NOT just the single number e^0= 1, it is, rather, the infinite power series
e^0+ \frac{e^0}{1!}(x- 0)+ \frac{e^0}{2!}(x-0)^2+ \cdot\cdot\cdot+ \frac{e^0}{n!}(x-0)^n+ \cdot\cdot\cdot
= 1+ x+ \frac{1}{2}x^2+ \cdot\cdot\cdot+ \frac{1}{n!}x^n+ \cdot\cdot\cdot
since all derivatives of e^x are e^x and, of course, e^0= 1.
(That includes both even and odd powers because e^{x} is neither "even" nor "odd" function: e^{-x}\ne e^x, e^{-x}\ne -e^x.)
The Taylor series for e^x, centered at x= 1, instead, would be
= e+ e(x-1)+ \frac{e}{2}(x- 1)^2+ \cdot\cdot\cdot+ \frac{e}{n!}(x-1)^n+ \cdot\cdot\cdot
since now we evaluate the evaluate the derivative at x= 1 and e^1= e.
By the way, it is interesting to look at Taylor series for
polynomials. Suppose f(x)= x^4- 3x^2+ 2x+ 1. f(0)= 1, f'(0)= 2, f''(0)= -6, f^(3)(x)= 0, and f^(4)(0)= 24 and all higher derivatives are identically 0 so the Taylor polynomials of degrees 1 through 4, centered at x= 0, are degree 1: f(0)+ f'(0)x= 1+ 2x, degree 2: f(0)+ f'(0)x+ (f''(0)/2)x^2= 1+ 2x- 3x^2, degree 3: f(0)+ f'(0)x+ (f''(0)/2)x^2+ (f'''(0)/3!)x^3= 1+ 2x- 3x^2, degree 4: f(0)+ f'(0)x+ (f''(0)/2)x^2+ (f'''(0)/3!)x^3+ (f^(4)(0)/4!)x^4= 1+ 2x- 3x^2+ x^4. That is, the Taylor polynomials of degree less than 4 are just the terms up to that degree while the Taylor series of degree 4 or higher (including the "infinite" series) is just the polynomial itself.
But suppose we wanted the Taylor series for that polynomial centered at 1 rather than 0:
f(1)= 1- 3+ 2+ 1= 1, f'(1)= 4- 6+ 2= 0, f''(1)= 12- 6= 6, f'''(1)= 24, and f^(4)(1)= 24 so the Taylor series is
1+ (0/1)(x- 1)+ (6/2)(x- 1)^2+ (24/6)(x- 1)^3+ (24/24)(x- 1)^4= 1+ 3(x-1)^2+ 4(x-1)^3+ (x-1)^4
And, indeed, if you multiply it out, you will see that
1+ 3(x-1)^2+ 4(x-1)^3+ (x-1)^4= 1+ 2x- 3x^2+ x^4
That's a convenient way of "shifting" a polynomial.