Math 174 Final
December 14, 2012
Please put your name, ID number, and sign and date.
There are 8 problems worth a total of 200 points.
You must show your work to receive credit.
Print Name:
Student
AN INTRODUCTION TO MATLAB
MELVIN LEOK
MATLAB is an interactive environment for numerically manipulating arrays and matrices, as well as providing
tools for visualizing data. It is particularly appropr
Assigned: Tuesday, November 17, 2015
Due Date: Tuesday, November 24, 2015
MATH 174/274: Homework VIII
Numerical Integration & Differentiation
Fall 2015
1. DISCUSSION QUESTION:
Suppose that N (h) is an
Math 274 Final
December 13, 2013
Please put your name, ID number, and sign and date.
There are 2 problems worth a total of 50 points.
You must show your work to receive credit.
Print Name:
Student
Math 174 Midterm
October 30, 2013
Please put your name, ID number, and sign and date.
There are 4 problems worth a total of 100 points.
Calculators are allowed but you must show your work to receiv
Homework #1
1. Suppose we have a computer that performs 3-digit rounding. Find the absolute and
relative errors for the following numbers computed in the computer:
(a) 0.000224729
(b) 42381900
(c) 201
Homework #4
1. For each part, find the interpolating polynomial for the data points
(1, 2), (1, 3), (2, 2).
by writing down a linear system involving p(1) = 2, p(1) = 3, p(2) = 2 and solving
it for th
7a) f.m
function [output] = f(x)
output = cos(x)-x;
end
7b) falseposition.m
function [output] = falseposition(a,b,N)
fa = f(a);
fb = f(b);
c = b - fb* (b - a) / (fb - fa);
for i = 1:N
fc = f(c);
if (f
Homework #0
1. Suppose we have a computer that performs 3-digit rounding. Find the absolute and
relative errors for the results of each of the following numbers computed in the computer.
(a) 0.0002247
Homework #1
1. Let p be the exact solution and cfw_pk be a sequence of approximations satisfying
k=0
1
|pk p|
=.
|pk1 p|
10
Also let cfw_pk be another sequence of approximations satisfying
k=0
|pk
Homework #2
1. (a) Give a graphical description showing how xed point iterations converge for the
xed point function g (x) = x/2.
(b) Give a graphical description showing how xed point iterations do n
Homework #4
1. (a) Write out each step of Gaussian elimination on the augmented matrix for the
linear system
2x 3y + z = 1
x+yz = 2
4x + 4z = 1.
(b) Use back substitution to solve for x, y, z .
2. (a
Homework #5
1. (a) Give an example of a 2 2 matrix that doesnt have an LU factorization.
(b) Find the LU factorization of the matrix
2 0
1 1
1
2
0
1
.
A=
4
1 2 4
0
0
2
0
(c) Use the LU factorization
Math 174 Midterm 2
November 20, 2013
Please put your name, ID number, and sign and date.
There are 4 problems worth a total of 100 points.
Calculators are allowed but you must show your work to rec
Homework #3
1. (a) Starting with the initial guesses of p0 = 2 and p1 = 1, draw how two additional
approximations of the root of f (x) = x2 2 are calculated under the secant
method.
(b) Find the value
Homework #5
1. (a) Draw a graph of the piecewise linear interpolating polynomial for the data given
in the following table:
0 1 3 4 6
x
f (x) 1 0 1 2 1
(b) Write down the equation for the linear piece
MATH 174/274: Homework IX
Initial Value Problems for Ordinary Differential Equations
Fall 2015
1. Consider the following initial value problem (IVP):
y = y t2 + 1,
atb
y(a) =
Write down the Taylors m
Assigned: Tuesday Oct. 20, 2015
Due Date: Tuesday Oct. 27, 2015
MATH 174/274: Homework IV
Linear Algebra (Part II)
Fall 2015
1. Consider the following linear system,
Ax = b
where A is the following ma
Assigned: Tuesday Oct. 13, 2015
Due Date: Tuesday Oct. 20, 2015
MATH 174: Homework III
Linear Algebra (Part I)
Fall 2015
1. The function f (x) = cos(x) has a root at x = /2. Using the theory we develo
Assigned: Thursday Sep. 24, 2015
Due: Tuesday, Oct. 6, 2015
MATH 174/274: Homework 1
Taylor Series and Round-Off Error
Fall 2015
1. Compute the rst 5 terms in the Taylor series (constant, linear, quad
Assigned: Tuesday, Oct. 6, 2015
Due Date: Tuesday, Oct. 13, 2015
MATH 174: Homework 2
Rootfinding
Fall 2015
NOTE: For each homework assignment observe the following guidelines:
1. Consider the functio
Homework #6
1. (a) Consider the data points
(1, 1.1), (1, 1), (0, 0.9), (0.5, 1.8), (1, 3.2).
Write down the normal equations for linear least squares.
(b) Solve the normal equations to get the best f
Exam 1 Review SOLUTIONS
1. How many multiplications and additions/subtractions are there if we evaluate the
polynomial:
P (x) = 3x4 + 4x3 + 5x2 5x + 1
without nesting (direct evaluation)? How many flo
Summing vector
function [y] = summingvector(v,n)
y = v(1);
for step = 2:n
y = y+v(step);
end
end
(0)Square-root matrix
function [y,numofmult] = hw0(A,n)
numofmult = 0;
y = 0;
for i = 1:n
for j = 1:n
y
Math 174 Final
December 7, 2016
Please put your name, ID number, and sign and date.
There are 8 problems worth a total of 200 points.
You must show your work to receive credit.
Print Name:
Student
Math 174 Final
December 13, 2013
Please put your name, ID number, and sign and date.
There are 8 problems worth a total of 200 points.
You must show your work to receive credit.
Print Name:
Student
Homework #2
1. Let g(x) = 1/x + x/2 and consider the interval [1.4, 1.45].
(a) Show g(x) [1.4, 1.45] for x [1.4, 1.45] by finding the maximum and minimum
values of g in the interval.
(b) Find 0 k < 1
Homework #3
1. (a) Starting with the initial guesses of 1 and 2, draw how two approximations of the
root of f (x) = x2 2 are calculated under secant method.
(b) Find the values of the rst three approx
Homework #6
1. For each part, nd the interpolating polynomial for the data points
(1, 2), (1, 3), (2, 2).
by writing down a linear system involving p(1) = 2, p(1) = 3, p(2) = 2 and solving
it for the
Math 174/274 Midterm
January 28, 2009 Please put your name, ID number, and sign and date. There are 4 problems worth a total of 100 points. Calculators are allowed but you must show your work to recei