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 ID:
Signature and Date:
Problem
1
Score
Problem
/25
Sc
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 appropriate for implementing simple numerical algorithms as it
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 approximation to M for every h > 0 and that
M = N (h)
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 to compute the determinant of A.
(d) Use the LU factor
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 approximations.
(c) What is the absolute error of the nal app
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 unknown coecients a, b, c:
(a) p(x) = ax2 + bx + c.
(b)
Homework #7
1. (a) Draw a graph of the piecewise linear interpolating polynomial for the data given
in the following table:
01346
x
f (x) 1 0 1 2 1
(b) Write down the equation for the linear piece in the interval [4, 6].
(c) Suppose we create the piecewis
Homework #8
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 tting line in the least squares sense.
(c) Write down th
Math 174 Midterm
October 31, 2012
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 receive credit.
Print Name:
Student ID:
Signature and Date:
P
Math 174 Midterm 2
November 21, 2012
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 receive credit.
Print Name:
Student ID:
Signature and Date
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) Count the number of additions/subtractions and the nu
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 not converge
for the xed point function g (x) = 2x.
2. U
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 method of order 3 applied to the above IVP. Simplify
you
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 matrix,
0 1
4
2 0
2
A=
2 4
0
1 3 5
5
4
.
1
0
(a) Determi
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 developed
for xed point iterations, nd the largest interval a
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, quadratic, cubic,
and quartic pieces) for the following fun
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 function f (x) = x3 2.
(a) Show that f (x) has a root in the i
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 (fa*fc <= 0)
b = c;
fb = fc;
else
a = c;
fa = fc;
end
c =
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.000224729
(b) 42381900
(c) 2012.34 + 3.114
(d) 2.728 0.0036
(e
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 p|
= 1.
|pk1 p|2
Suppose |p0 p| = 106 and |p0 p| = 0.1.
Homework #9 1. Use Eulers method with stepsize h = 0.25 to solve the ODE y =y+t for y (1) given y (0) = 1. 2. Consider the ODE y = 2ty with y (0) = 2. The exact solution is y (t) = 2et . (a) Use Eulers method with stepsize h = 0.5 to approximate y (1) and
Homework #8 1. (a) Consider the data (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 tting line in the least squares sense. (c) Write down the normal
Homework #7 1. Consider data points (x0 - h, f (x0 - h), (x0 , f (x0 ), (x0 + h, f (x0 + h). (a) Find the interpolating polynomial of least degree p(x) passing through these points in Newton form. (b) Write down an approximation for f (x0 ) by simplifying
Homework #5 1. Perform three iterations of Jacobi method with starting guess x(0) = [0, 0, 0]t for the linear system 2 3 1 1 x 1 y = 0 . 0 2 10 2 2 5 z 2. (a) Write down the xed point problem x = Cx + d solved by Jacobi method for the linear system of equ
Homework #4 1. (a) Starting with the initial guess of 1, nd three additional approximations to the root of f (x) = x2 2 using Newtons method. (b) What is the absolute error of the nal approximation? 2. (a) Consider f (x) = x, x0 x, x < 0.
Starting with th
Homework #3 1. Suppose f is continuous and we know that f (x) < 0 in [1, 2] and f (x) > 0 in [2.5, 4], nd 3 approximations to the root of f (x) using the bisection method with starting interval [1, 4]. 2. (a) Starting with the initial guesses of 1 and 2,
Homework #2 1. (a) Find the PLU factorization of the matrix 2 0 1 1 1 2 0 1 A= 4 1 2 4 0 0 2 0
using Gaussian elimination with row pivoting. (b) Use these results to compute the determinant of A. (c) Use the PLU factorization and forward and back substi
Homework #1 1. (a) Write out the results of each step of Gaussian elimination on the augmented matrix form for the linear equation
2x 3y + z = 1 x+yz =2 4x + 4z = 1. (b) Use back substitution to solve for x, y , and z . (c) Write out the results of each