Yingjie Qi
304671980
Math-151B
Assignment 2
1. Modified Euler Method
w0 =
f ( t i , wi ) + f ( t i +1 , w i+ hf ( t i , wi ) ] , for i=0,1, N 1
h
wi +1=w i+
2
1
Then, rewrite the second equation w i+
Math 151B
Winter 2017
Homework 4
Due: Tuesday, March 7.
1
Part I (50%)
This part is required to be submitted in class.
2
(1) Let F : Rn Rn and g(~x) = kF (~x)k2 . Show that
g(~x) = 2J(~x)T F (~x),
whe
Name: Yingjie Qi
ID: 304671980
Math-151B
Assignment 1
"
1. (a) ! = ! cos ' , 0 t 1, y 0 = 1
Holding t constant and applying the Mean Value Theorem to the function f (t, y) = ! cos '
We find that wh
Math 151B
Winter 2017
Homework 1
Submit the homework in the discussion class, on Tuesday, Jan 24th.
1
Part I (50%)
This part is required to be submitted in class.
(1) Exercise 5.1.1.a
(2) Exercise 5.1
Lecture 20: Homotopy and Continuation Methods
1
Homotopy
Assume that x(0) is an initial estimate of the solution of F (x ) = 0. Define G : [0, 1] Rn ! Rn by
G( , x) = F (x) + (1
)[F (x)
F (x(0)] = F (
Lecture 17: Solving Nonlinear Systems of Equations
1
Functions for Several Variables
Uniqueness
Definition 1. A system of nonlinear equations of the form
8
f1 (x1 , x2 , . . . , xn ) = 0
>
>
>
>
< f2
Lecture 19: Steepest Descent Method
Motivation: quasi-Newtons methods, e.g., Broydens method, can achieve superlinear convergence
but depends on the initial guess. We will consider a method which is l
Lecture 18: Quasi-Newton Methods - Broydens Method
Drawback of Newtons method is that n2 partial derivatives of F (x) are required to compute and
evaluate, which is inconvenient in practice. To approx
Lecture 23: Householders Method
1
Householder Transformations
Definition 1. Let w
~ 2 Rn with kwk
~ 2 = 1. The matrix
2w
~w
~T
P = In
is called a Householder matrix. The linear transformation ~x 7! P
Name: Yingjie Qi
ID: 304671980
Math-151B
Assignment 1
'
1. (a) y = y cos t , 0 t 1, y ( 0 )=1
Holding t constant and applying the Mean Value Theorem to the function f (t , y)= y cos t
We find that whe
Math 151B
Winter 2017
Homework 2
Due: Tuesday, Feb 7th.
1
Part I (50%)
(1) Show that the Modified Euler method (p.286) is of order two.
(2) Use Theorem 5.20 to show that the Runge-Kutta method of orde
Part 2:
The following IVP
y' ( t ) =20 y +20 t 2+ 2t , 0 t 1
1
y (0)=
3
with the exact solution
1
y (t )=t 2 + e20t
3
(a) Eulers method
For h=0.2
ti
i
0
0
1
0.2
2
0.4
3
0.6
4
0.8
5
1.0
cfw_
For h=0.12
Yingjie Qi
304671980
Math-151B
Assignment 4
n
2
n
Let F : R R g ( x ) =F ( x )2
(1)
t
F( x )=( f 1 ( x ) , f 2 ( x ) , , f n ( x ) )
g ( x ) =f 1 ( x )2 +f 2 ( x )2 + ,+ f n ( x )2
[
f1
( x)
x1
J (
Part 2:
cfw_
y
y (t )=1+ , 1 t 2
t
(
)
y 1 =2
And the exact solution y (t )=tln ( t ) +2 t
(a) Using Taylors method of order two
2
h
w i+1=wi +hf ( t i , w i ) + f ' ( t i , wi )
2
For h = 0.2
ti
i
0
Math 151B
Winter 2017
Homework 3
Due: Tuesday, Feb 21.
Part I (50%)
This part is required to be submitted in class.
(1) Exercise 5.10.4.d
(2) Exercise 5.10.7
(3) Exercise 5.11.10
(4) Exercise 5.11.11
Yingjie Qi
304671980
Math-151B
Assignment3
1. The local truncation error term is given by part (a)
i +1 ( h ) =
h2
y ' ' ' ( i)
3
By the definition of consistent,
2
h
max y ' ' ' ( i )
0 i N 2 3
max
Part 2:
cfw_
y
y ,0 t 50
K
y ( 0 )= y 0
Given that y 0=1000, r=0.2, K=4000
And the exact solution is given by
y0 K
y (t )=
y 0 + ( K y 0 ) ert
y
y
Let f (t , y)=r 1
K
Using the Eulers method,
wi+ 1=w
Lecture 21: Eigenvalues, Orthogonal Matrices and Similarity Transformations
Definition 1. Let A 2 Rnn ,
is called eigenvalue of A if there exists 0 6= x 2 Rn such that
Ax = x.
Here x is called the eig
Lecture 25: Least Squares Approximation I
1
Data Fitting
Given a data set cfw_(xi , yi )m
i=1 , the data fitting problem is to find a polynomial of degree < m
Pn (x) = an xn + . . . + a1 x + a0 =
n
X
Lecture 14: Boundary Value Problem II
1
Nonlinear BVP - Shooting Method
To solve a nonlinear second-order BVP, we consider a sequence of IVPs
y 00 = f (x, y, y 0 ),
8 x 2 [a, b],
y(a) = , y 0 (a) = tk
Math 151B
Homework 3
Tong Mu
UID:704 450 302
1
Part I
5.10.7
Investigate the stability for the difference method
wi+1 = 4wi + 5wi1 + 2h[f (ti , wi )],
for i = 1, 2, ., N 1, with starting values w0 , w
Math 151B
Spring 2017
Homework 1
The due day is Thursday, April 20th.
1
Part I (50%)
This part is required to be submitted in class.
(1) Exercise 5.1.1.a
(2) Exercise 5.1.3:b,d
(3) Exercise 5.1.6
(4)
Math 151B
Winter 2017
Homework 2
Due: May 4th.
1
Part I (50%)
(1) Show that the Modified Euler method is of order two.
(2) Use Theorem 5.20 to show that the Runge-Kutta method of order four is consist
PRACTICE PROBLEMS FOR FINAL
1. Initial Value Problems
(1) Give conditions for well-posedness
(2) Are the following problems well-posed?
(a) y 0 = y t2 + 1, with t [0, 2],
(b) y 0 = et+y , with t [0, 1
MATH 151B Applied Numerical Methods, Winter 2017,
Homework 5
Due Friday, February 24, 11:00am
Question 1: For the system of equations
x21 + x2 37 = 0
x1 x22 5 = 0
x1 + x2 + x3 3 = 0.
do one step of Ne
function [W, R] = house(A)
% setting up and initialize
[m,n] = size(A);
W = zeros(m,n);
% compute QR factoriztion using householder reflector
for k = 1 : n
x = A(k:m, k);
W(k:m,k) = -sign(x(1) * norm(
function x = lsq_normaleq(epsilon)
% set A and b, initialize x
A = [1 1 1;epsilon 0 0;0 epsilon 0;0 0 epsilon];
b = [1;0;0;0];
x = zeros(3,1);
% compute Cholesky A'*A = L*L'
L = chol(A'*A,'lower');
%
MATH 151B Assignment 1
Jack Wu
October 16, 2017
1.
2
(a) | f
| | 14 | for t [0, 1], thus the ODE satisfies the Lipzchitz condition and is therefore
y | = |(t + 2)
well-posed.
(
t3 ,
y>0
f
| |1| for t
Math 151B Assignment 2
Jack Wu
October 30, 2017
1.
(a) a=16
(b) This scheme is a 3rd order method.
h2 000
y (ti ) + O(h3 )
2
f (ti2 , yi2 ) = y 0 (ti ) 2hf y 00 (ti ) + 2h2 y 000 (ti ) + O(h3 )
9
f (t
Math 151B Assignment 4
Jack Wu
November 27, 2017
1.
(a) A0 , x0 given,
xk+1 = xk Ak F (xk )
Ak+1 = Ak +
F (xk+1 ) F (xk ) Ak (xk+1 xk )
(xk+1 xk )T
kxk+1 xk k2
(b) We will prove the formula by showing
Math 151B Assignment 3
Jack Wu
November 13, 2017
1.
(a)
sin(y) + 2y is continuous on D.
fy (t, y, y 0 ) = cos(y) + 2 > 0 (t, y, y 0 ) D
|fy0 (t, y, y 0 )| = 0 0 (t, y, y 0 ) D
Thus the BVP has a un
Assignment 5
Jack Wu
December 8, 2017
1.
Pn
(a) Base Case: Ax = P i=1 i ai vi
Pn
Pn
Pn
n
k
k
k
k+1
Suppose Ak x =
x = A i=1 ki ai vi =
i=1 i ai vi , then A
i=1 i ai Avi =
i=1 i ai i vi =
Pn
k+1
ai vi