You are on page 1of 2

American University of Sharjah

College of Engineering, Mechanical Engineering Department
Numerical Methods (MCE 325); Spring 2016
Due: Wednesday Feb. 17 2016
Assignment Title: Numerical solution of nonlinear algebraic equations using different methods
(Bisection, Newton-Raphson, Secant) HW#1
All home works should have signed cover sheet
NOTE: Unless otherwise stated, all problems should be done using MATLAB, send me by e-mail
a soft copy of your program
HW_Q1) Water is flowing in a trapezoidal channel at a rate of Q = 20 m3/s. The critical depth y for
such a channel must satisfy the equation 𝑄
2 𝐵
=1 𝑔𝐴
3𝑐
where g = 9.81 m/s2, Ac = the cross-sectional area (m2), and B = the width of the channel at the
surface (m). For this case, the width and the cross-sectional area can be related to depth y by
B = 3 + y and
Ac = 3y + (y2)/2
Solve for the critical depth using
(a) Graphical method,
(b) Bisection,
(c) Newton Raphson
(d) Secant methods.
Stop if absolute value of the relative percentage error falls below 1% or the maximum number of
iterations exceeds 12. Discuss your results, comparing the error, convergence and the difficulty in
programing for each method
Note that the convergence rate is given by (see also course notes):

Where n=2 for Newton-Raphson, n=1 for Bisection, n=1.682 for the Secant, calculate the

constant for each iteration (i.e., 𝑪 = 𝒊+𝟏 𝒏
using the corresponding n values). Plot the C values
∈𝒊

versus the iteration number (i). Comment on the results.
HW_Q2) Find all possible values of x that satisfy the equation cos (5.2 x) = - cos( 4.8 x), where x
should be in radian, for the region [0,10]. Using Graphical, Bisection, Newton Raphson and Secant
methods. Also plot the converging rate versus number of iteration for each method. Compare the
four method results, and write your comments. Note in all method you should find all the roots
in a single run so that the program selects the initial guesses for all the roots.
Search the internet, and explore what physical phenomena the above equation represents.
HW_Q3) Use zero- through fourth-order Taylor series expansions to predict f (2.5) for f (x) = ln x
using a base point at x = 1. Compute the εt , the true percentage relative error, and the absolute true
error for each approximation. Discuss the meaning of the results. Plot your approximations one by
one on the same figure given each trial different line attribute

001 1) Solve for the first 3 iteration using hand calculation. Use the following parameter values in your computation: L= 600 cm. The equation for the resulting elastic curve is: Use bisection.000 piece of equipment for nothing down and $5.000 cm4.15. the value of x where dy/dx= 0). What interest rate are you paying? The formula relating present worth P. Q3) You buy a $25. Newton Raphson.500 per year for 6 years. E = 50. annual payments A. number of years n. Use the bisection.5 kN/cm. also you can do question from book Q1) A beam is loaded as shown in Fig. Newton Raphson and secant method to determine the point of maximum deflection (that is.Extra question for practicing do not submit. Then substitute this value into to determine the value of the maximum deflection. I =30. Comment on your results based on error convergence and difficulty of programing. 3) From the computer programs for each method plot the error versus number of iteration and write you comment on them Q2) Figure shows a uniform beam subject to a linearly increasing distributed load. and compare this number with the number that you get from the computer. showing iteration steps the error in each step 2) For Bisection method find the required number of iteration for the given error. P5. and Secant methods to solve for the position inside the beam where there is no moment. Assuming the stopping criteria  = 0.000 kN/cm2. and w0 =2. and interest rate i is .