MAT 402 - WINTER 2012
Homework 3
Ryan Szypowski
Due March 4, 2012
1. Consider the Initial Value Problem
y = (1 + t2 ) arctan y,
y(0) = 1.
0t1
(a) Show that the given initial value problem is well-posed by showing that f (t, y)
satises a Lipschitz conditio
MAT 402 - WINTER 2012
Homework 4 Solution
Ryan Szypowski
Due February 14, 2012
1. Using the denition, show that the trapezoid rule has degree of precision 1. That is,
show that
I(1) = I1,closed (1), I(x) = I1,closed (x), but I(x2 ) = I1,closed (x2 ).
Solu
%Honors Contract
function [ X ] = GaussJordanPivot( a, b )
%GaussJordan is a function that takes two matrices to form an augmented matrix
%and uses Gauss elimination to create an upper triangular matrix and
'ackwards substitution to find the output answer
function [ a, E ] = myCubicFit( x,y )
%myCubicFit is a function that takes two sets of vector data, and produces a
%cubic relationship using least squares method
%x = x vector
%y = y vector
%a = coefficient vector
%E = error
m =3; %order 3 polynomial
n =
function FxNS = myBisectMethod (f, a, b, imax, E)
xOLD=0;
tols = 100;
i= 0;
Fa = f(a); Fb = f(b);
if Fa*Fb > 0
disp('Error: The function has the same sign at points a and b.')
else
disp ('iteration
a
b
(xNS)
Solution
f(xNS) eRe
TolS')
end
while (E < tols)
function [ Xs ] = mySecant( f,X1,X2,imax, Err )
%mySecant is a function that takes an anonymous function over an
%and an initial estimate and returns the root, if present. Otherwise it displays
an
%error message if iterations are exceeded
0 = an anonymous
function [ X ] = myGaussPivot( a, b )
%myGauss is a function that takes two matrices and outputs an answer matrix.
%The function combines a and b matrixes to form an augmented matrix,
%uses Gauss elimination to create an upper triangular matrix and
'ackwa
function [ oneNorm ] = myOneNorm( A )
%myOneNorm is a function that finds the One-Norm of a given matrix, A, and
%outputs the One-Norm as a solution.
%
myOneNorm is given a matrix, A, and uses a summation of the columns to
%
find the largest sum of the ma
function [xNS] = myRegulaFalsi (f, a, b, imax, E)
%myBisectMethod is a function that takes an anonymous function over an
%interval [a,b] and returns the root, if present. Otherwise it displays an
%error message.
0 = an anonymous function
%a = lower bound
function [ yp ] = myFirstDerivOrder2( x, y)
%myFirstDerivOrder2 is a function that attempts to find analytical
0erivatives of a set of data in the form of vectors, x and y, thus
%producing an answer vector for the rate-of-change at each respective
0ata po
%Problem 3
function [ X ] = myGaussPivot( a, b )
%myGauss is a function that takes two matrices and outputs an answer matrix.
%The function combines a and b matrixes to form an augmented matrix,
%uses Gauss elimination to create an upper triangular matrix
function [ Estimate ] = myCubicSplineEval(x,y, x1)
%UNTITLED5 Summary of this function goes here
%
Detailed explanation goes here
[A] = myCubicSplineCoeffs(x,y); 0inds the coefficients of a given set of data
and produes a single vector with the given data
function [ X ] = myGaussPartialPivot( a, b )
%myGauss is a function that takes two matrices and outputs an answer matrix.
%The function combines a and b matrixes to form an augmented matrix,
%uses Gauss elimination to create an upper triangular matrix and
function [ Xs ] = myNewton( f,df,Xest,imax, Err)
%myNewton is a function that takes an anonymous function over an
%initial estimate and returns the root, if present. Otherwise it displays an
%error message if iterations are exceeded
0 = an anonymous funct
function [ a, E ] = myLinReg( x, y )
%myLinReg is a function that takes two sets of vector data, and produces a
%linear relationship using least squares method
%x = x vector
%y = y vector
%a = coefficient vector
%E = error
%Find number of entries in x
N =
function [ vector ] = myCubicSplineCoeffs(x,y)
%MyCubicSplineCoeffs is a function that produces a series of cubic spline
0unctions over distinct intervals. These intervals are designated input
NULLalues. The function takes two vectors, x and y, and produc
MAT 402 WINTER 2012
Name:
Test #2
Please show all of your work. Answers without justifaction may be worth 0.
Please make your answers easy to read. This means it should be clear what you are doing
from one step to the next and your work should be legible.
MAT 402 WINTER 2012
Name:
Test #1 Solutions
Please show all of your work. Answers without justifaction may be worth 0.
Please make your answers easy to read. This means it should be clear what you are doing
from one step to the next and your work should b
MAT 402 - WINTER 2012
Homework 6 Solutions
Ryan Szypowski
Due March 8, 2012
1. Prove that the so-called Optimal RK2 Method, given by
w0 =
wi+1 = wi + h
1
3
f (ti , wi ) + f
4
4
ti +
2h
2h
, wi + f (ti , wi )
3
3
,
is consistent and stable.
Solution: Firs
MAT 402 - WINTER 2014
Homework 4
Ryan Szypowski
Due March 13, 2012
1. Kuttas method is a three stage Runge-Kutta method with tableau
0
1
2
1
2
1 1 2
1
6
2
3
1
6
Prove that it is consistent and stable.
2. Consider the two step Adams-Moulton method (also ca
MAT 402 - WINTER 2014
Homework 4
Ryan Szypowski
Due March 13, 2012
1. Kuttas method is a three stage Runge-Kutta method with tableau
0
1
2
1
2
1 1 2
1
6
2
3
1
6
Prove that it is consistent and stable.
Solution: For this tableau, we can identify that
1
2
1
MAT 402 - WINTER 2014
Homework 1
Ryan Szypowski
Due January 28, 2014
1. Let f (x) = sin x . Compute the cubic interpolant of f , P0,1,2,3 (x), which interpolates
2
at x0 = 2, x1 = 1, x2 = 1, x3 = 2. Do this using Newton form and provide the
divided dieren
MAT 402 - WINTER 2014
Homework 2
Ryan Szypowski
Due February 11, 2014
1. Let f (x) = ex . Use the second-order centered dierence forumla to approximate f (0)
using h = 0.1, 0.05, 0.025. Verify that the method seems to be second order by computing the erro
MAT 402 - WINTER 2012
Homework 3
Ryan Szypowski
Due March 4, 2012
1. Consider the Initial Value Problem
y = (1 + t2 ) arctan y,
y(0) = 1.
0t1
(a) Show that the given initial value problem is well-posed by showing that f (t, y)
satises a Lipschitz conditio
MAT 402 - WINTER 2012
Homework 1 Solutions
Ryan Szypowski
Due January 17, 2012
1. Let f (x) = sin x . Compute the cubic interpolant of f , P0,1,2,3 (x), which interpolates
2
at x0 = 2, x1 = 1, x2 = 1, x3 = 2. Do this using Newton form and provide the
divi
MAT 402 - WINTER 2012
Homework 1
Ryan Szypowski
Due January 17, 2012
1. Let f (x) = sin x . Compute the cubic interpolant of f , P0,1,2,3 (x), which interpolates
2
at x0 = 2, x1 = 1, x2 = 1, x3 = 2. Do this using Newton form and provide the
divided dieren
MAT 402 - WINTER 2012
Homework 3
Ryan Szypowski
Due January 31, 2012
1. Let f (x) = ex . Produce a polynomial interpolant of f which interpolates the following
information: f (0), f (0), f (0), f (ln 2). Use this interpolant to approximate f (0.5).
What i
MAT 402 - WINTER 2012
Homework 2
Ryan Szypowski
Due January 24, 2012
1. Setup: In this problem, we will work through building the rst few orthogonal polynomials in the family of Jacobi polynomials with = = 1. What this means is that
we are making them ort
MAT 402 - WINTER 2012
Homework 3 Solutions
Ryan Szypowski
Due January 31, 2012
1. Let f (x) = ex . Produce a polynomial interpolant of f which interpolates the following
information: f (0), f (0), f (0), f (ln 2). Use this interpolant to approximate f (0.
MAT 402 - WINTER 2012
Homework 2 Solutions
Ryan Szypowski
Due January 24, 2012
1. Setup: In this problem, we will work through building the rst few orthogonal polynomials in the family of Jacobi polynomials with = = 1. What this means is that
we are makin