MACM 316 Computing Assignment 5
Please read the Guidelines for Assignments first.
Submit a one-page PDF report to Canvas and upload you Matlab scripts (as m-files). Do not
use any other file formats.
Keep in mind that Canvas discussions are open forums

1) The error is computed by the formula |x* - bn|,
where x* is the exact minimum value and bn is the
approximated minimum at n iteration. In this case,
we will assume the x* is zero for f(x) = -cos(x).
From the plot, we can see the error is being
reduced

Figure 1
Figure 3(zoomed)
Figure 2
Figure 4
A.) Figure 1 is the representative plots of the output as a function of x, which with 6 different
number of n. Which n is 35, 40, 45, 50, 55, 60, respectively.
B.) The smallest

tri = [-1,1/2,1]; 0efining the triples
x = 0; 0efining x
N = 100; 0efinie number of iteration
alpha = (3 - sqrt(5)/2; 0efining r
k = 8; 0efine k
err = zeros(1,N);
for i = 1:N
%updating the value of x
if (tri(3) - tri(2) > (tri(2) - tri(1)
x = tri(2) + alp

John Kluesner
Numerical Analysis
Quiz 5 Solution
Question: Consider the sequence pn =
1
.
n3
5 March 2016
At what rate does pn converge to 0?
Solution: The definition of rate of convergence tells us to look at the limit
|pn+1 p|
n |pn p|
lim
for some posi

John Kluesner
Numerical Analysis
Quiz 2 Solution
29 January 2016
Question: Factor the following matrix into LU decomposition using the LU factorization algorithm
with lii = 1 for all i.
1 1 0
2
2 3
1 3 2
Solution: We start by performing Gaussian eliminati

John Kluesner
Numerical Analysis
Quiz 7 Solution
Question: A natural cubic spline S on [0, 2] is defined by
(
S0 (x) = 1 + 2x x3
S(x) =
S1 (x) = 2 + b(x 1) + c(x 1)2 + d(x 1)3
18 March 2016
on [0, 1)
.
on [1, 2]
Find b, c, and d.
Solution: To make S a nat

John Kluesner
Numerical Analysis
Quiz 3 Solution
6 February 2016
Question: Consider the following matrix:
2 1
A=
1 2
Answer the following three questions. Justify your answer for each.
1. What is |A| ?
2. What is the spectral radius of A?
3. Is the matrix

MACM 316 Computer Assignment 5
By Prithi Pal Singh 301270075
Submission Date: 16 March 2016
Objective: To predict the population of British Columbia at first January of consecutive years from
2011 to 2020 using interpolation technique estimated through La

Computing assignment 3
Yi Jiang 301294453
1
p = 213 = 2.7589
There are 4 subquestions and each one have an iterating formula
I marked down the absolute error (| |) of each formula in each iteration in the following table
Iteration
A: | |
B: | |
C: | |
D:

Langrange Interpolation: Estimating the population of British Columbia
This assignment is to construct the fourth degree Lagrange interpolating polynomial which
agrees with an unknown population function at five given data points, or control points, and p

Assignment5 Report
This assignment is asking to use the matlab to estimate the population of the BC
from January 1st of 2011 to January 1st of 2020 by using the Lagrange Interpolation.
The assignment gives us the population of the BC from July 1st of 2011

Computing Assignment 3
Cathy Li (301170256)
For this assignment, we are to complete iterations to see how the given methods proposed compute to
3
21. The given methods consists of
(a) pn = (20pn-1 +(21/pn-1)/21
(b)pn = pn-1 cfw_[(pn-1)^3 -21] / [3(pn-1)^2

MACM316 Computing Assignment 4
Given 4 different equations in question 2 exercise 2.4, 3 different methods (Newton, Modified Newton, and
Steffenson) are used to calculate a specific root.
My stopping condition for the iterations is : abs( 1 ) < 105 , 105

MACM 316 ASSIGNMENT 4
I will be using three different methods which are Newtons Method, the Modified Newtons Method
and Steffensons Method, and comparing the efficiency and accuracy of the different methods to
compute the root approximations of question 2

MACM 316 Computing Assignment 4
Diana Koval ID301246881
While working on this assignment I wrote a Matlab script to solve Exercise 2 (Section 2.4, Burden 10E) using
three different iteration methods: Newtons, modified Newtons and Steffensens. Results are

MACM 316 Computing Assignment 3
Correy Lim 301140852
The objective of this paper is to demonstrate convergence to p = 21 1/3, or divergence, among the following equations from Question
5 in Exercise Set 2.2 of Numerical Analysis 10th Edition, with the ini

MACM
Assignment 2
Ron Dan
301130601 D-103
The purpose of this assignment is using Crout factorization to solve a linear system Ax=b.
Crout factorization is a specific type of LU decomposition of a matrix and it has the property that
the upper triangular m

Assignment 2 report
Cheng Chen 301230921
In this assignment, the question provides a given matrix A and the right hand side term
b that need to be coded, and asks to solve the system of the linear equations using Crout
factorization algorithm (from https:

% Introduce a small value of x
x = 1.2e-5
% Suppose that cosine was computed to just 10 digits. The result, f, is an
% error
c = round(cos(x),10,'significant')
f = fl(fl(1-c)/fl(x^2)
pause
% Plot the result. We expect something near 0.5
x = (-.5:.01:.5);

a
MACM 316 Midterm: 12:30—13:20 Fri Feb 28, 2014
Answer all 6 questions. Closed book. One-sided cheat sheet and calculator permitted. Explain
all steps: Do not expect marks to be granted for a correct answer if the intermediate steps are
omitted.
1. (2 ma

5D1B3533-4224-4E7E-AE4D-663F3DB33DBB E 1-; E
midterm—316-spring—2Dl6—ch0b
f
#130 l of 12
IEL.
SFU Macm 316
Midterm Test: Feb 24, 2016
Last Name:
First N ame:
-—-—-—._._
Email:
ID:
Instructions: 50 minutes. Answer all 5 questions. Closed book.
One-sided ch

% Taylor polynomials approximating smooth functions (sin(x) in this script)
x = -5:.01:5;
figure(1)
plot(x,sin(x),'r')
hold on
pause
% Linear and quadratic approximation in black
plot(x,x,'k')
pause
% Cubic and degree-4 approximation in blue
plot(x,x-x^3/

MACM 316 Quiz 6: March 11, 2016
Name (PRINTED): Student Number:
Instrﬁotions: Closed book. No calculators. 15 Minutes. Show all steps.
Let P3(m) be the Lagrange interpolating polynomial for the data. (‘1,0), (0,0), (1,3) and
(2, 0). Find the coefﬁcient of