You are on page 1of 2

The American University in Cairo ENGR 313 – Engineering Analysis and Computations

School of Sciences and Engineering (SSE) Dr. Mohamad Yassine


Fall 2019 – 2020 Homework Set 1 – Due date Sun 29-9-2019 1:00pm

Problem No. (1)

a. Derive the infinite series approximation (i.e., Maclaurin series) of the following function,

𝑓(𝑥) = √𝑥 3 sin(𝑥)
b. Write a MATLAB function that takes from the user input values for x and n, and returns
the series up to the nth term,
c. Upgrade the function to calculate and store the value of the true percent relative error for
each value of k from k = 1 to k = n where n is the number of terms given by the user,
d. Upgrade your function to generate overlaid plots of the true f(x) vs th nth approximation
between x=0 to x=5π, and for n= 1, 3, 5, 7.
e. Label the x-axis, the y-axis and add a legend.
f. Upgrade your code to time itself and run the code for x= π and n=170 and report the final
plot, and the time of the calculation. From the MATLAB figure window, change the x-
axis and y-axis to appear in logarithmic scale instead of linear scale (that is change the
plot into log-log scale). Attach the figure with your solutions.
g. From your log-log plot, how many terms are enough to reach percent relative error less
than 10-13 %.
h. If you look at the series, there is an issue in using 200 terms or more in the series. What is
the issue?

Problem No. (2)

If water flow in river can be estimated using Manning’s Equation shown below,

where,
Q = flow (m3/s),
n = a roughness coefficient,
B = average river width (m),
H = average ricer depth (m), and
S = average river bed slope,

a. Propose a modified Manning’s formula that estimates the uncertainty in the river flow as
a function of the variation of river width and depth.
b. If an overall error of 10% is present in the measurements of B and H, what percentage of
error you would expect to observe in the quantity of the flow?
c. Which parameter is a bigger influence on the quantity of the flow, B or H? Show your
calculations.

Page | 1
The American University in Cairo ENGR 313 – Engineering Analysis and Computations
School of Sciences and Engineering (SSE) Dr. Mohamad Yassine
Fall 2019 – 2020 Homework Set 1 – Due date Sun 29-9-2019 1:00pm

Problem No. (3)

Part (a) of the figure shows a uniform beam subject to a linearly increasing distributed load. The
equation for the resulting elastic curve is (see part (b)):

Where W0 is the weight per unit length,


I is the moment of inertia,
L is the beam length,
E is the elastic modulus,
y is the vertical deflection, and
x is the distance along the beam.

Assume we have a beam that has a length of 500


cm, elastic modulus of 55000 kN/cm2,
moment of inertia of 30000 cm4,
and a weight per unit length of 2.2 kN/cm.

a. Write a MATLAB code to t find the point


of maximum deflection using the
bisection method,
b. Update your code to solve the problem
using the false-position method,
c. Report the number of iterations required
to reach a relative approximate error of
0.1% in each method.

d. Utilize the codes you developed so far to calculate the position of the maximum beam
deflections a function of the beam length (L). Vary L between 100 cm to 1000 cm. Plot
the final results,
e. Label the axes and comment on the result. Attach your code.
f. Based on your result, do you think it is possible that the position of maximum beam
deflection is located right at the middle of the beam? Explain your thinking!

Page | 2

You might also like