Homework 1 Problem 1

advertisement
Homework 1
Problem 1
a) Write a program for solving f (x) = 0 (x ∈ R1 ) using
• bisection method
• Newton’s method
• secant method
b) Test your programs on the following functions:
For bisection method:
• 1/x − 2x on [0, 1]
• 2−x + ex + 2 cos(x) − 6 on [1, 3]
For Newton’s method:
• 1/x − 2x with x0 = 1
• x − tan(x) on x0 = 4.5
Problem 2
The velocity of a nonNewtonian fluid flowing in a circular tube can be expressed as
u
umean
=
3n + 1
(1 − (r/R)1+1/n )
n+1
where umean is the mean velocity of the fluid, r is radial distance from the center of the tube,
R is the radius of the tube, and n is a constant whose value depends on the fluid (for example,
n = 1 for Newtonian fluid, n = 3 for a dilatant fluid, and n = 1/3 for a pseudoplastic fluid).
Assume you were able to measure u/umean = 0.9 at r/R = 0.8. Determine the value of n of
a fluid.
Problem 3
Find the solution of the equations
x21 + x22 − 8x1 − 4x2 + 11 = 0
x21 + x22 − 20x1 + 75 = 0
by taking starting point as x1 = 2, x2 = 4.
1
(1)
Download