Set 3

advertisement
EGR 511
NUMERICAL METHODS
__________________
LAST NAME, FIRST
PROBLEM SET #3
1. (P. 14.5 Chapra) Find the minimum value of f(x, y) = (x  2)2 + (y  3)2 starting at x = 1
and y = 1, using one iteration of the steepest descent method.
Ans: x = 2 and y = 3  f(x, y) = 0
2. (P. 14.6 Chapra) Perform one iteration of the steepest ascent method to locate the
maximum of f(x, y) = 3.5x + 2y + x2  x4  2xy  y2 using initial guesses x = 0 and y = 0.
Ans: x = 0.9766 and y = 0.5581
3. Let f(x) = x  x 2 and P2(x) be the interpolation polynomial on x0 = 0, x1 and x2 = 1.
Find the largest value of x1 in (0,1) for which f(0.5) – P2(0.5) = -0.25.
Ans: x1 = 0.872675
4. Let P3(x) be the interpolation polynomial for the data (0,0), (0.5, y), (1,3), and (2,2).
Find y if the coefficient of x3 in P3(x) is 6.
Ans: y = 4.25
5. Show that the following sequences {pn} converge linearly to p = 0. How large must n
be before |pn – p|  510-2?
1
1
a) pn = , n  1
b) pn = 2 , n  1
n
n
Ans: a) n = 20 and b) n = 5
6. For the given functions f(x), let x0 = 0, x1 = 0.6, and x2 = 0.9. Construct the Lagrange
interpolating polynomials of degree 1 and 2 to approximate f(0.45) and find the error
bound and the actual error.
a) f(x) = cos x
b) f(x) = 1  x
c) f(x) = tan x
Ans:
f(x)
cos x
P1(x=0.45)
error bound
actual error
P2(x=0.45)
error bound
actual error
0.86900
0.03375
3.144510-2
0.89810
5.062510-3
2.35710-3
1 x
1.19868
4.6510-2
5.4761610-2
1.20343
6.9810-3
7.357310-4
tan x
0.5131
0.220
0.03005
0.454614
0.151
0.02844
7. Construct a divided-difference table from:
x
f(x)
0.5
-1.1518
-0.2
0.7028
0.7
-1.4845
0.1
-0.14943
0.0
0.13534
Use the divided-difference table to estimate f(0.15), using
a) a polynomial of degree 2 through the first three points.
b) a polynomial of degree 2 through the last three points.
c) a polynomial of degree 3 through the first four points.
d) a polynomial of degree 3 through the first four points.
e) a polynomial of degree 4.
Which three points are best to use for constructing the quadratic if we want f) f(0.15)? g)
f(-0.1)? h) f(1.2)?
Ans:
a)  0.35871
b)  0.28514
c)  0.28941
d)  0.28938
e)  0.28939
f) f(0.15): use 0, 0.1, 0.5
g) f(-0.1): use  0.2, 0, 0.1
h) f(1.2): use 0.1, 0.5, 0.7
8. (P. 14.10 Chapra) Develop a one-dimensional equation in the pressure gradient
direction at the point (4, 2). The pressure function is
f(x, y) = 5x2y  8y2  7x2
Ans:
g(h) = 16 + 2880h + 29376h2 + 138240h3
Download