0% found this document useful (0 votes)
46 views11 pages

CIVL3140 Assignment#1

The document discusses solving various mathematical problems using different numerical methods like bisection, Newton's, secant and fixed point iteration. [1] It asks to apply bisection method to find roots of cos(x) in an interval and discusses its convergence. [2] It involves solving a heat transfer problem to find depth to bury water main using closed form, bisection and Newton's method. [3] It discusses finding root of a 5th order polynomial using Newton's and fixed point iteration comparing their convergence. [4] It derives Newton's method from Taylor series expansion. [5] It involves solving an equilibrium equation for a structure using graphical and analytical methods.

Uploaded by

Malek Al-Asali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views11 pages

CIVL3140 Assignment#1

The document discusses solving various mathematical problems using different numerical methods like bisection, Newton's, secant and fixed point iteration. [1] It asks to apply bisection method to find roots of cos(x) in an interval and discusses its convergence. [2] It involves solving a heat transfer problem to find depth to bury water main using closed form, bisection and Newton's method. [3] It discusses finding root of a 5th order polynomial using Newton's and fixed point iteration comparing their convergence. [4] It derives Newton's method from Taylor series expansion. [5] It involves solving an equilibrium equation for a structure using graphical and analytical methods.

Uploaded by

Malek Al-Asali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CIVL 3140 Assignment #1

1. Consider applying the bisection method to the function f(x) = cos x over the interval [0, 2.8π].

(a) Confirm that the required starting condition for the bisection method is valid for this choice
of interval and function.

The bisection method is valid for this choice of interval as cos 0 is equivalent to 1, and cos
2.8π is equivalent to -1. Therefore this proves that there’s at least one root in interval [0, 2.8π]

(b) How many roots does f have in the given interval?

- Therefore, from the figure above it can be observed that there are three roots in the
interval [0, 2.8π]

(c) To which root do you expect the bisection method to converge and why? Run the bisection
m-file from class to confirm your answer.

Looking at the graph from part (b), my prediction was that it will converge at a point between
1.5-1.7 since that is the first point where the graph crosses the horizontal axis and converges,
and that is exactly happened when the bisection method was run as seen in the figure below
>> bisection (f, 0, 2.8*pi, 1000, 1e-6)

2. Here Ts is the constant surface temperature during the cold period, Ti is the initial soil
temperature before the cold snap, and α is the thermal conductivity of the soil. If x is measured in
meters and t in seconds, then α = 0.183 × 10−6m2/s. Let Ti = 10C, and Ts = −15C, and recall that
water freezes at 0◦C.

(a) Determine, in closed form, how deep a water main should be buried (to the nearest mm) so
that it will not freeze until at least 45 days exposure to these conditions.
(b) Solve the same problem using the bisection method.
(c) Solve the problem using Newton’s method with initial guess x1 = 0 and with x1 = 10. The
method converges in the first case but not in the second. Why? Experimentally determine the
window of convergence of Newton’s method for this problem.

After using the Newton’s method for x1 = 0 and x1 = 10, the method converges for x = 0 but
not for x = 10.

To better understand why it doesn’t converge at x1 = 10, I graphed the function below
The highlighted area represents the window of convergence which was found to be between 0
and 2.8 though experimenting with various values. From the graph above, we can see that
anything between 0 and 2.8 will converge and anything above that wont. Therefore, x1 = 10
did not converge as it was outside the convergence window and the graph stays in a straight
line suggesting it won’t converge again

(d) Solve the problem using the secant method. Use x1 = 0 as one of the initial points and
experiment with x2. Show that the secant method can behave as well or better than Newton’s
method for this problem.

The figure below shows the same problem solved using the secant method. After
experimenting with the secant method, I found that it works just as well as the newtons
method, but it has a larger window of convergence [0, 5.1], which suggests that it works a
little better than the newton method
3. The fifth order polynomial f(x) = 3x 5 + 5x 4 + x 3/3 + 1 has one real root, x ∗ ≈ −1.644666506.

(a) Plot the polynomial on the interval [−2, 1]. Hand in your plot with your assignment.

(b) Use Newton’s method with a tolerance of 10e−10 to find the root. By trying several different
initial values, x1, determine in what interval must you choose x1 in order achieve
convergence to x ∗. Explain why this is the case.
After trying multiple values of x1, the interval of convergence was found to be [-∞, 0), (0, ∞].
The reason is that the polynomial at zero is flat and changing in direction.

(c) Determine a function g(x) so that the fixed-point iteration method is guaranteed to converge
to x ∗. Explain why convergence is guaranteed for your choice of g.
(d) Using the fixed-point(...) function provided, apply the fixed-point method with this g(x) and a
tolerance of 10e−10.

(e) Choose x1 = −2 and compare the speed of convergence (number of iterations to achieve
tolerance) of the two methods. Does this agree with the content of the convergence theorems
for the two methods?

The fixed_point method was faster than the newton method as it didn’t need to do any
iterations to find the convergence, but the newton method needed 7 iterations. This does
agree with the content of the convergence theorems for the two methods
4. Expand the function f(x) in a Taylor series about x k. Retain linear only terms in x−x k and set x
to x k+1. Obtain Newton’s method for solving the problem f(x) = 0 by requiring f (x k+1) = 0.

5. Consider a single degree-of-freedom structure consisting of two rigid bars as shown.

(a) Explain these relations by clearly indicating the geometry they are derived from, e.g., label
triangles.
(b) from an appropriate free body diagram (show your work), in which K is the spring constant,
which relates linearly the spring force to the spring displacement. Take L = 5, θ = tan−1 3/4,
K = 200 and plot the function P(α) in a displacement control experiment (i.e., α is given) in
the range θ ≥ α ≥ −.8 in radians. You can plot using a decreasing scale with the Matlab
command set(gca,’xdir’,’reverse’).
(c) Using any method, solve the above equation for different (known) values of P to obtain α in
terms of P and trace the above force-displacement curve under load control. Are you able to
obtain points in the falling branch? Can you explain ascending and descending branches of
the force-displacement curve?

𝑃 = 4𝐾𝐿 ∙ 𝑡𝑎𝑛𝛼(𝑐𝑜𝑠𝛼 − 𝑐𝑜𝑠𝜃)

𝑃
𝑡𝑎𝑛𝛼 =
4𝐾𝐿(𝑐𝑜𝑠𝛼 − 𝑐𝑜𝑠𝜃)

𝑃
𝛼 = 𝑡𝑎𝑛-1 ( )
4𝐾𝐿(𝑐𝑜𝑠𝛼 − 𝑐𝑜𝑠𝜃)

You might also like