Вы находитесь на странице: 1из 5

Taylor Expansions in 2d

In your rst year Calculus course you developed a family of formulae for approximating a
function F(t) for t near any xed point t
0
. The crudest approximation was just a constant.
F(t
0
+ t) F(t
0
)
The next better approximation included a correction that is linear in t.
F(t
0
+ t) F(t
0
) + F

(t
0
)t
The next better approximation included a correction that is quadratic in t.
F(t
0
+ t) F(t
0
) + F

(t
0
)t +
1
2
F

(t
0
)t
2
And so on. The approximation that includes all corrections up to order t
n
is
F(t
0
+ t) F(t
0
) + F

(t
0
)t +
1
2!
F

(t
0
)t
2
+
1
3!
F
(3)
(t
0
)t
3
+ +
1
n!
F
(n)
(t
0
)t
n
You may have also found a formula for the error introduced in making this approximation. The
error E
n
(t) is dened by
F(t
0
+ t) = F(t
0
) + F

(t
0
)t +
1
2!
F

(t
0
)t
2
+ +
1
n!
F
(n)
(t
0
)t
n
+ E
n
(t)
and obeys
E
n
(t) =
1
(n+1)!
F
(n+1)
(t

)t
n+1
for some (unknown) t

between t
0
and t
0
+ t. Even though we do not know what t

is, we can
still learn a lot from this formula for E
n
. If we know that

F
(n+1)
(t)

M
n+1
for all t between
t
0
and t
0
+ t, then

E
n
(t)


M
n+1
(n+1)!
t
n+1
, which tells us that E
n
(t) goes to zero like the
(n + 1)
st
power of t as t tends to zero.
We now generalize all this to functions of more than one variable. To be concrete and to save
writing, well just look at functions of two variables, but the same strategy works for any number
of variables. Well also assume that all partial derivatives exist and are continuous. Suppose that
we wish to approximate f(x
0
+ x, y
0
+ y) for x and y near zero. The trick is to write
f(x
0
+ x, y
0
+ y) = F(1) with F(t) = f(x
0
+ tx, y
0
+ ty)
and think of x
0
, y
0
, x and y as constants so that F is a function of the single variable t. Then
we can apply our single variable formulae with t
0
= 0 and t = 1. To do so we need to compute
various derivatives of F(t) at t = 0, by applying the chain rule to
F(t) = f
_
x(t), y(t)
_
with x(t) = x
0
+ tx, y(t) = y
0
+ ty
October 28, 2011 Taylor Expansions in 2d 1
Since
d
dt
x(t) = x and
d
dt
y(t) = y, the chain rule gives
dF
dt
(t) =
f
x
_
x(t), y(t)
_
d
dt
x(t) +
f
y
_
x(t), y(t)
_
d
dt
y(t)
= f
x
(x
0
+ tx, y
0
+ ty)x + f
y
(x
0
+ tx, y
0
+ ty)y
d
2
F
dt
2
(t) =
_
f
x
x
_
x(t), y(t)
_
d
dt
x(t) +
f
x
y
_
x(t), y(t)
_
d
dt
y(t)
_
x
+
_
f
y
x
_
x(t), y(t)
_
d
dt
x(t) +
f
y
y
_
x(t), y(t)
_
d
dt
y(t)
_
y
=

2
f
x
2
x
2
+

2
f
yx
yx +

2
f
xy
xy +

2
f
y
2
y
2
=

2
f
x
2
x
2
+ 2

2
f
xy
xy +

2
f
y
2
y
2
and so on. Its not hard to prove by induction that, in general, for any natural number k,
F
(k)
(t) =
k

=0
_
k

k
f
x

y
k
(x
0
+ tx, y
0
+ ty)x

y
k
where
_
k

_
=
k!
!(k)!
is the standard binomial coecient. So when t = 0,
F(0) = f(x
0
, y
0
)
dF
dt
(0) =
f
x
(x
0
, y
0
)x +
f
y
(x
0
, y
0
)y
1
2!
d
2
F
dt
2
(0) =
1
2

2
f
x
2
(x
0
, y
0
)x
2
+

2
f
xy
(x
0
, y
0
)xy +
1
2

2
f
y
2
(x
0
, y
0
)y
2
1
k!
d
k
F
dt
k
(0) =

0,mk
+m=k
1
!m!

k
f
x

y
m
(x
0
, y
0
) x

y
m
Subbing these into
f(x
0
+ x, y
0
+ y) = F(t
0
+ t)

t
0
=0,t=1
=
n

k=0
1
k!
F
(k)
(0) + E
n
(1)
gives
f(x
0
+ x, y
0
+ y) =

0,mn
+mn
1
!m!

+m
f
x

y
m
(x
0
, y
0
) x

y
m
+ E
n
= f(x
0
, y
0
)
+ f
x
(x
0
, y
0
)x + f
y
(x
0
, y
0
)y
+
1
2
_
f
xx
(x
0
, y
0
)x
2
+ 2f
xy
(x
0
, y
0
)xy + f
yy
(x
0
, y
0
)y
2
_
+ E
2
If all partial derivatives of f of order n + 1 are bounded in magnitude by M, then

E
n

=
1
(n+1)!

F
(n+1)
(t

1
(n+1)!
n+1

=0
_
n+1

_
M|x|

|y|
n+1
=
M
(n+1)!
_
|x| +|y|
_
n+1
October 28, 2011 Taylor Expansions in 2d 2
Example. In this example, we nd the second order Taylor expansion of f(x, y) =
_
1 + 4x
2
+ y
2
about (x
0
, y
0
) = (1, 2) and use it to compute approximately f(1.1 , 2.05). We rst compute all
partial derivatives up to order 2 at (x
0
, y
0
).
f(x, y) =
_
1 + 4x
2
+ y
2
f(x
0
, y
0
) = 3
f
x
(x, y) =
4x

1+4x
2
+y
2
f
x
(x
0
, y
0
) =
4
3
f
y
(x, y) =
y

1+4x
2
+y
2
f
y
(x
0
, y
0
) =
2
3
f
xx
(x, y) =
4

1+4x
2
+y
2

16x
2
[1+4x
2
+y
2
]
3/2
f
xx
(x
0
, y
0
) =
4
3

16
27
=
20
27
f
xy
(x, y) =
4xy
[1+4x
2
+y
2
]
3/2
f
xy
(x
0
, y
0
) =
8
27
f
yy
(x, y) =
1

1+4x
2
+y
2

y
2
[1+4x
2
+y
2
]
3/2
f
yy
(x
0
, y
0
) =
1
3

4
27
=
5
27
So the quadratic approximation to f about (x
0
, y
0
) is
f
_
x
0
+ x, y
0
+ y
_
f(x
0
, y
0
) + f
x
(x
0
, y
0
)x + f
y
(x
0
, y
0
)y
+
1
2
_
f
xx
(x
0
, y
0
)x
2
+ 2f
xy
(x
0
, y
0
)xy + f
yy
(x
0
, y
0
)y
2
_
= 3 +
4
3
x +
2
3
y +
10
27
x
2

8
27
xy +
5
54
y
2
In particular, with x = 0.1 and y = 0.05,
f(1.1 , 2.05) 3 +
4
3
(0.1) +
2
3
(0.05) +
10
27
(0.01)
8
27
(0.005) +
5
54
(0.0025) = 3.1691
The actual value, to four decimal places, is 3.1690.
Example. In this example, we nd the third order Taylor expansion of f(x, y) = e
2x
sin(3y) about
(x
0
, y
0
) = (0, 0) in two dierent ways. The rst way uses the canned formula. We rst compute
all partial derivatives up to order 3 at (x
0
, y
0
).
f(x, y) = e
2x
sin(3y) f(x
0
, y
0
) = 0
f
x
(x, y) = 2e
2x
sin(3y) f
x
(x
0
, y
0
) = 0
f
y
(x, y) = 3e
2x
cos(3y) f
y
(x
0
, y
0
) = 3
f
xx
(x, y) = 4e
2x
sin(3y) f
xx
(x
0
, y
0
) = 0
f
xy
(x, y) = 6e
2x
cos(3y) f
xy
(x
0
, y
0
) = 6
f
yy
(x, y) = 9e
2x
sin(3y) f
yy
(x
0
, y
0
) = 0
f
xxx
(x, y) = 8e
2x
sin(3y) f
xx
(x
0
, y
0
) = 0
f
xxy
(x, y) = 12e
2x
cos(3y) f
xxy
(x
0
, y
0
) = 12
f
xyy
(x, y) = 18e
2x
sin(3y) f
xyy
(x
0
, y
0
) = 0
f
yyy
(x, y) = 27e
2x
cos(3y) f
yyy
(x
0
, y
0
) = 27
October 28, 2011 Taylor Expansions in 2d 3
So the Taylor expansion, about (0, 0) to order three is
f(x, y) =

0,m3
+m3
1
!m!

+m
f
x

y
m
(0, 0) x

y
m
+ E
3
(x, y)
=
1
0!1!
3y +
1
1!1!
6xy +
1
2!1!
12x
2
y
1
0!3!
27y
3
+ E
3
(x, y)
= 3y + 6xy + 6x
2
y
9
2
y
3
+ E
3
(x, y)
A second way to get the same result exploits the single variable Taylor expansions
e
x
= 1 + x +
1
2!
x
2
+
1
3!
x
3
+
sin y = y
1
3!
y
3
+
Replacing x by 2x in the rst and y by 3y in the second and multiplying the two together, keeping
track only of terms of degree at most three, gives
f(x, y) = e
2x
sin(3y)
=
_
1 + (2x) +
1
2!
(2x)
2
+
1
3!
(2x)
3
+
__
(3y)
1
3!
(3y)
3
+
_
=
_
1 + 2x + 2x
2
+
4
3
x
3
+
__
3y
9
2
y
3
+
_
= 3y
9
2
y
3
+ 6xy + 6x
2
y +
just as in the rst computation.
Problem 1 Derive the Taylor expansion, to order 2 in powers of x, y and z, of
f
_
x
0
+ x, y
0
+ y, z
0
+ z
_
Answer: In general, the expansion to order N is
f(x
0
+ x, y
0
+ y, z
0
+ z) =

0,m,n2
+m+nN
1
!m!n!

+m+n
f
x

y
m
z
n
(x
0
, y
0
, z
0
) (x)

(y)
m
(z)
n
+ E
n
Problem 2 Find the second order Taylor expansion of f(x, y) =
1
1+x
2
+y
2
about (x
0
, y
0
) = (1, 1).
Answer: f(1 + x, 1 + y) =
1
3

2
9
x +
2
9
y +
1
27
x
2

8
27
xy +
1
27
y
2
+
Problem 3 Find the second order Taylor expansion of f(x, y, z) =
1
1+x
2
+y
2
+z
2
about (x
0
, y
0
, z
0
) =
(0, 0, 0).
Answer: f(x, y, z) = 1 x
2
y
2
z
2
+
October 28, 2011 Taylor Expansions in 2d 4
Problem 4 Find the second order Taylor expansion of f(x, y) = e
x+2y
about (x
0
, y
0
) = (0, 0).
Bound the error of this approximation if |x| 0.1 and |y| 0.1.
Answer: f(x, y) = 1 + x + 2y +
1
2
x
2
+ 2xy + 2y
2
+ E
2
(x, y) with

E
2
(x, y)


(0.3)
3
3!
e
0.3
when
|x| 0.1 and |y| 0.1. (Of course there are many other correct bounds on

E
2
(x, y)

.)
Problem 5 The function z = f(x, y) solves the equation x + 2y + z + e
2z
= 1. Find the Taylor
polynomial of degree two for f(x, y) in powers of x and y.
Answer: f(x, y) =
1
3
x
2
3
y
2
27
x
2

8
27
xy
8
27
y
2
+
Problem 6 Suppose that f(x, y) is a polynomial of degree n. Prove that for all real numbers x
0
,
y
0
, x and y,
f(x
0
+ x, y
0
+ y) =

0,mn
+mn
1
!m!

+m
f
x

y
m
(x
0
, y
0
) (x)

(y)
m
Note that this formula is exact. There is no error term E
n
.
October 28, 2011 Taylor Expansions in 2d 5

Вам также может понравиться