Problems 2

5
Source: Chapra 5 th edition I) BRACKETING METHODS 1. Determine the real roots of f(x) = -0.5x 2 + 2.5x + 4.5: (a) Graphically (b) Using the quadratic formula (c) Using three iterations of the bisection method to determine the highest root. Employ initial guesses of xt = 5 and xu = 10. Compute the estimated error Ɛ a and the true error Ɛ t after each iteration 2. Locate the first nontrivial root of sin x = x 3 , where x is in radians. Use a graphical technique and bisection with the initial interval from 0.5 to 1. Perform the computation until Ɛ a is less Ɛ s = 2%. Also perform an error check by substituting your final answer into the original equation. 3. A beam is loaded as shown in figure. Use the bisection method to solve for the position inside the beam where there is no moment. 4. Determine the real root of f(x)=5x 3 -5x 2 +6x-2: (a) Graphically (b) Using bisection to locate the root. Employ initial guesses of x t =0 and x u =1 and iterate until the estimated error Ɛ a falls below a level of Ɛ s =10%. 5. Determine the positive real root of ln(x 4 )=0.7 (a) graphically, (b) using three iterations of the bisection method, with initial guesses of 100lb 10 3’ 3’ 2’ 4’

Transcript of Problems 2

Page 1: Problems 2

Source: Chapra 5th edition

I) BRACKETING METHODS

1. Determine the real roots of f(x) = -0.5x2 + 2.5x + 4.5:(a) Graphically(b) Using the quadratic formula(c) Using three iterations of the

bisection method to determine the highest root. Employ initial guesses of xt = 5 and xu = 10. Compute the estimated error Ɛa

and the true error Ɛt after each iteration

2. Locate the first nontrivial root of sin x = x3, where x is in radians. Use a graphical technique and bisection with the initial interval from 0.5 to 1. Perform the computation until Ɛa is less Ɛs = 2%. Also perform an error check by substituting your final answer into the original equation.

3. A beam is loaded as shown in figure. Use the bisection method to solve for the position inside the beam where there is no moment.

4. Determine the real root of f(x)=5x3-5x2+6x-2:(a) Graphically(b) Using bisection to locate the

root. Employ initial guesses of xt=0 and xu=1 and iterate until the estimated error Ɛa falls below a level of Ɛs=10%.

5. Determine the positive real root of ln(x4)=0.7 (a) graphically, (b) using three iterations of the bisection method, with initial guesses of xl=0.5 and xu=2, and (c) using three iterations of the false-position method, with the same initial guesses as in (b).

6. Find the positive square root of 18 using the false-position method to within Ɛs=0.5%. Employ initial guesses of xl=4 and xu=5.

II) OPEN METHODS

1. Determine the real roots of f(x)=-1+5.5x-4x2+0.5x3: (a) graphically and (b) using the Newton-Raphson method to within Ɛs=0.01%.

2. Determine the roots of the following simultaneous nonlinear equations using (a) fixed-point iteration and (b) the Newton-Raphson method:y=-x2+x+0.75y+5xy=x2

employ initial guesses of x = y = 1.2 and discuss the results.

100lb/ft 100

3’ 3’ 2’ 4’

Page 2: Problems 2

Source: Chapra 5th edition

3. A mass balance for a pollutant in a well mixed lake can be written as

V dcdt

=W−Qc−kV √c

Given the parameter values V=1x106m3 /yr, W=1x106g/yr, and k=0.25m0.5/g0.5/yr, use the modified secant method to solve for the steady-state concentration. Employ an initial guess of c=4g/m3 and δ=0.5. Perform three iteration.

4. The “divide and average” method, an old-time method for approximating the square root of any positive number a, can be formulated as

x= x+a/ x2

Prove that this is equivalent to the Newton-Raphson algorithm.

5. Locate the first positive root ofF(x) = sin x + cos (1+x2) – 1Where x is in radians. Use four iterations of the secant method with initial guesses of (a) xi-1=1.0 and xi=3.0 (b) xi-1= 1.5 and xi=2.5 to locate the root. (d) Use the graphical method to explain your results.

6. Determine the real root of x3.5 = 80, with the modified secant method to within εs= 0.1% using an initial guess of xo= 3.5 and δ= 0.01

III) GAUSS ELIMINATION

1) Use Gauss elimination to solve:

8x1+2x2-2x3=-210x1+2x2+4x3=412x1+2x2+2x3=6Employ partial pivoting and check your answers by substituting them into the original equations.

2) Given the system of equations-3x2+7x3=2X1+2x2-x3=35x1-2x2=2(a) Compute the determinant(b) Use Cramer’s rule to solve for

the x’s.(c) Use Gauss elimination with

partial pivoting to solve for the x’s.

(d) Substitute your results back into the original equations to check your solution.

3) Use Gauss-Jordan elimination to solve:2x1+x2-x3=-38-5x1-x2+2x3=-343x1+x2-x3=-20Do not employ pivoting. Check your answers by substituting them into the original equations.

4) Develop, debug, and test a program in either a high-level language or macro language of you choice to multiply two matrices-that is [X]=[Y][Z], where [Y] is m by n and [Z] is n by p.

Page 3: Problems 2

Source: Chapra 5th edition

IV) LU DECOMPOSITION AND MATRIX INVERSION

1. Solve the following system of equations using LU decomposition with partial pivoting:2x1 – 6x2 – x3 = - 38-3x1 – x2 +7x3 = -34-8x1 + x2 – 2x3 = -20

2. Determine the total flops as a function of the number of equations n for the (a) decomposition, (b) forward-substitution, and (c) back substitution phases of the LU decomposition version of Gauss elimination.

3. Use LU decomposition to determine the matrix inverse for the following system. Do not use a pivoting strategy, and check your results verifying that [A][A]-1=[I].10X1 + 2X2 – X3 = 27-3X1 – 6X2 + 2X3 = -61.5X1 + X2 + 5X3 = -21.5

4. Use iterative refinement techniques to improve x1=2, x2=-3 and x3=8, which are approximate solutions of2x1 + 5x2 + x3 = -56x1 + 2x2 + x3 = 12x1 + 2x2 + x3 = 3

5. Let the function be defined on the interval [0,2] as follows:

F(x) = ax + b, 0<=x<=1Cx + d, 1<=x<=2

Determine the constants a, b, c and d so that the function f satisfies the following: F(0)=f(2)=1 F is continuous on the entire

interval a + b = 4

Source:

NUMERICAL METHODS FOR ENGINEERS

Fifth Edition

Steven C. Chapra

Raymond P. Canale

Mc Graw Hill