A Sample Calculation

advertisement
A Sample Calculation
This sample calculation contains just about everything that can come up in manipulating
series: expanding functions (powers and logarithms) for small argument, multiplying two
expansions, and substituting one series expansion into another series expansion. If you can
do this one, you can do anything. The goal is to expand the function
f (x) = 1 +
i
3 3(1 + x)1/2 h
+
ln (1 + x)1/2 − x1/2
x
x3/2
for small x. First, note that (1 + x)1/2 appears more than once. From
(1 + x)p = 1 + p x +
we have
(1 + x)1/2 = 1 + 12 x + 12
1
p(p − 1) x2 + O(x3 ),
2
1
− 12 x2 = 1 + 12 x − 18 x3 + O(x3 ).
2
Thus, the argument of the logarithm is 1 + y, where
y = −x1/2 + 12 x − 18 x2 + O(x3 ).
From the series for the logarithm,
ln(1 + y) = y − 12 y 2 + 13 y 3 − 14 y 4 + 15 y 5 + O(y 5),
and so in terms of x the logarithmic factor is
2
1
1
1
1
1
1/2
2
1/2
2
ln (1 + y) = −x
+ 2 x − 8 x − 2 −x
+ 2x− 8x
3
4
1
1
1
1
1
1
1/2
2
1/2
2
+ 3 −x
+ 2x− 8x
− 4 −x
+ 2x− 8x
5
+ 15 −x1/2 + 12 x − 18 x2 + O(x3 ).
We have already left out terms of order x3 , and so all the powers of y should be truncated
at that order:
y 2 = x − x3/2 + 14 x2 + 14 x5/2 + O(x3 )
y 3 = −x3/2 + 32 x2 − 34 x5/2 + O(x3 )
y 4 = x2 − x5/2 2 − 2x5/2 + O(x3 )
y 5 = −x5/2 + O(x3 )
and
1
ln (1 + y) = −x1/2 + 12 x − 18 x2 −
x − x3/2 + 14 x2 + 14 x5/2
2
3
4
+ 13 −x3/2 + 32 x2 − 34 x5/2 − 14 x2 − 2x5/2
1
5/2
+ O(x3 ).
+ 5 −x
2
In this expression, contributions linear in x appear in the first and second parentheses, with
coefficients + 12 and − 12 , and so cancel. Contributions in x2 appear in each of the first four
terms, with coefficients − 18 , − 18 , + 12 , and − 14 , and also cancel. This leaves
3 x5/2 + O(x3 ).
ln (1 + y) = −x1/2 + 16 x3/2 − 40
Thus, the full function is
ih
i
3
3 h
1
1
1
3
2
3
1/2
3/2
5/2
3
f (x) = 1 + +
1 + 2 x − 8 x + O(x ) −x
+ 6x
− 40 x
+ O(x )
x x3/2
ih
i
3 3h
3 x2 + O(x3 )
=1+ +
1 + 12 x − 18 x2 + O(x3 ) −1 + 16 x − 40
x x
i
3 3h
2 x2 + O(x3 ) = 2 x + O(x2 ).
=1+ +
−1 − 13 x + 15
5
x x
The terms of order 1/x and the terms of order 1 cancel (as did several terms of odd order in
x1/2 ).
This is not just an empty exercise; even if one were to evaluate the function numerically,
two terms of order 1/x must cancel to leave a result of order x, and with finite precision this
eventually just doesn’t work. For single precision floating point numbers, where the fractional
accuracy of a given number is of order 10−7 , the subtraction stops giving a meaningful answer
when x = 10−3 as in the plot. The solid line shows the direct, single-precision evaluation of
f (x); the dashed lines show the small-x and large-x approximations. The “approximation”
−3
is more accurate than the numerical evaluation for x <
∼ 10 .
Download