Numerical Methods in Engineering
HOMEWORK
Dr. Ayşe Çağıl KANDEMİR
Rsc. Asst. Mehmet ÖKSÜZ
Date: April 8, 2020; Deadline : April 15, 2020; 17:00
Question 1:
Determine the real root of
𝑓(𝑥) = 𝑥 2 − 2𝑒 −𝑥 𝑥 3 − 𝑒 −3𝑥
(a) Using the Newton-Raphson method (4 iterations, x0 =1).
(b) Using the Secant method (4 iterations, x -1 = 2 and x0 = 1).
Question 2:
Use simple fixed-point iteration to locate the root of
𝑓(𝑥) = 𝑐𝑜𝑠(𝑥) − 𝑥
Use an initial guess of x0 = 0.75 and iterate until 𝜀𝑎 ≤ 0.1%.
Question 3:
Use least-squares regression to fit a straight line to
x 0 0.1 0.2 0.4 0.5 0.7 0.8 1
y 0 1.3 2.0 2.4 2.8 2.7 2.4 2.1
(a) Along with the slope and intercept, compute the standard error of the estimate and
the correlation coefficient. Plot the data and the straight line. Assess the fit.
(b) Re-compute (a), but use polynomial regression to fit a parabola to the data. Compare
the results with those of (a).
Question 4:
Fit the following data with the power model (y =axb). Use the resulting power equation
to predict y at x = 9:
x 2.5 3.5 5 6 7.5 10 12.5 15 17.5 20
y 13 11 8.5 8.2 7 6.2 5.2 4.8 4.6 4.3
Numerical Methods in Engineering
HOMEWORK
Dr. Ayşe Çağıl KANDEMİR
Rsc. Asst. Mehmet ÖKSÜZ
Date: April 8, 2020; Deadline : April 15, 2020; 17:00
Question 5:
Determine the distance traveled for the following data:
t (min) 1 2 3.25 4.5 6 7 8 9 9.5 10
V (m/s) 5 6 5.5 7 8.5 8 6 7 7 5
(a) Use the trapezoidal rule
(b) The best combination of the trapezoidal and Simpson’s rules,
(c) Analytically integrating third-order polynomials determined by regression.
Question 6:
The following data was collected for a cross-section of a river (y=distance from bank,
H=depth, and U=velocity):
y, m 0 1 3 5 7 8 9 10
H, m 0 1 1.5 3 3.5 3.2 2 0
U, m/s 0 0.1 0.12 0.2 0.25 0.3 0.15 0
Use numerical integration to compute the
(a) average depth,
(b) cross-sectional area,
(c) average velocity, and
(d) the flow rate.
Note that the cross-sectional area (Ac) and the flow rate (Q) can be computed as;