Amath 507
Homework Solution #1.6.4
Problem: Potential energy inside the earth
Use your results from Exercise 1.6.3 and integrate over shells of appropriate
radii to show that the potential energy of a point mass m in a spherical and homogeneous earth can
Amath 507
Homework Solution #1.6.3
Problem: Potential energy due to a spherical shell
The gravitational potential energy between two point masses, M and m, separated by a distance r is
GMm
,
(3.1)
r
where G is the universal gravitational constant.
Calcula
Amath 507
Homework Solution #1.6.1
Problem: Descent time down a cycloidal curve
Show that the descent time down the cycloidal curve
x( ) = a + R ( sin ) , y( ) = y a R (1 cos )
(1.1)
is
T =
R
,
g b
(1.2)
where b is the angle corresponding to the point B
AMATH 352: Problem set 1 Solutions
April 11, 2016
Class management questions
(1pt each: 4pts) Thank you for answering!
1
Linearity
In class, I showed you what the definition of linearity was (its also in the notes
for Class 1). (8 pts total)
1.1
Consider
AMATH 423/523
1
Mathematical Analysis in Biology and Medicine
Winter, 2016
Introduction
1.1
The philosophy of the course
Probability is the logic of science1 ; statistics is a tool for making discoveries from data; and
dynamics is a language for narrating
University of Washington
AMATH 301 Winter 2016
Instructor: Dr. KingFai Li
Week5
Optimization
1D example
f x x 4 10 x sin x 2
f = @(x) x.^4 + 10*x.*sin(x.^2);
x = linspace(2,3,100);
plot(x,f(x);
[xmin,fmin]=fminbnd(f,2,1);
[xmin,fmin]=fminsearch(f,1)
University of Washington
AMATH 301 Winter 2016
Instructor: Dr. KingFai Li
Week 3
1. Fixedpoint iteration
Purpose: Find the roots of F x 0
1. Rewrite F x 0 into the form of x G x . i.e. if x is a solution, so will be G x .
0
2. Make an initial guess of x
University of Washington
AMATH 301 Winter 2016
Instructor: Dr. KingFai Li
Week 2
Solving Systems of Linear Equations
Given a set of equations,
x1 x2 2
2 x1 5 x2 7
First check the determinant: (1)(5) (1)(2) = 3
The following is what you did in high sch
%Question 1
t = 2;
X = hilb(t);
A1 = [];
while cond(X, inf) < 1e16
A1 = [A1, cond(X, inf)];
t = t + 1;
X = hilb(t);
end
A1 = A1.';
save('A1.dat', 'A1', 'ascii');
A2 = [];
for t = 2:11
z = ones(t, 1);
m = hilb(t);
p = m\z;
q = m*z;
X = z  m*p;
Y
%Hw5_ex1
% Yuqi Wu
clear all;
A = [2, 1, 0; 1, 6, 2; 4, 3, 8];
m = size(A, 1); n = size(A, 2);
Q = zeros(m,n); R = zeros(n,n);
for j = 1:n,
v = A(:,j);
for i = 1:(j1),
R(i,j) = Q(:,i)*A(:,j);
v = v  Q(:,i) * R(i,j);
end
R(j,j) = norm(v);
if (abs(R(j,
(b) TriLL:
CC) False
(cJ
ct
FxeN(4)
1
Hr
A
t
(cc
A
k
V
cm
p
4
*
A
N
N
S
c_
F
_4
N
A
A
IN
pF
1
>4
:3
v
V
\
(4
cm
4
IL
3


N
44
4
cm
.
t
F
4
A
jf\
5
N
4
A
jiA
4
I
N
4
A.
t
ci?
V
4
c4C
Y
F
VI
)%(
r.
V
C,
3
C
3
4
C
8
:4
44
t

9.:
33.
C
=:
5<
Name:
Student number:
QUIZ 3
1. If A Rmn , A = QR is the QR factorization of matrix A, which of the following statements
are true
(a) QT Q = In , where In is the identity matrix of size n.
ANS: True. Because Q is orthogonal matrix.
(b) AT A = RT R
ANS: Tr
Name:
Student number:
QUIZ 1
1. True of False
(a) If S1 and S2 are subspaces of Rn of the same dimension, then S1 = S2 .
1
0
ANS: False. Counter example span
= span
0
1
(b) If S = span(u1 , u2 , u1 + u2 ), then dim(S) 2.
ANS: Ture. Because those three vec
Name:
Student number:
QUIZ 3
1. True of False
(a) Suppose f : R22 R
a11
a21
f
a12
a22
= a11 a12 a21 + a22 ,
then f is a linear function R22 R.
ANS: True.
For any A, B R22 ,
f (A + B)
f
a11 + b11
a21 + b21
a11
a21
= f
a12 + b12
a22 + b22
a12
a22
+
b11
b21
% Hw3_ex1
% Yuqi Wu
clear all
% part a
A = [6,3,1; 5,2,2; 4,1,3];
gA = 0.0;
for i = 1:size(A,1)
for j = 1:size(A,2)
gA = gA + A(i,j)*(1)^(i+j);
end
end
save A.dat A ascii
save gA.dat gA ascii
%
s
m
n
B
part b
= rng(2);
= randi(50,1);
= randi(50,1);
%Hw6 ex1
% Yuqi Wu
clear all
% matrix A
n=10;
d0 = 6*ones(n,1);
d1 = 4*ones(n1,1);
d2 = ones(n2,1);
A = diag(d0) + diag(d1,1) + diag(d1,1) + diag(d2,2) + diag(d2,2);
% LU factorization
U = A;
L = eye(n,n);
for k = 1: (n1)
for i = (k+1) : n
L(i,k) =
Homework 7  Due on March 14th, 2014 (due before 12:30
40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available. After
% Hw4 ex1
% implement a GS method
% Yuqi Wu
clear all
% input matrix A, vector b, and the stopping tolerance tol
A = [12 3 5 2; 1 6 3 1; 3 7 13 1; 1 2 1 7];
b = [ 2;3;10;11];
tol = 1.e8;
% set x0
n = size(A,1);
x = zeros(n,1);
countR=0;
for k=0:10
Homework 1 solution
January 16, 2014
1. MATLAB problem
% Hw1 ex1
% Yuqi Wu
clear all;
% part a
F10 = 0.0;
for n=1:10
F10 = F10 + 1.0/(n+2)*(n+4);
end
save A1.dat F10 ascii
F100 = 0.0;
for n=1:100
F100 = F100 + 1.0/(n+2)*(n+4);
end save A2.dat F100 ascii
Homework 6  Due on Friday Mar. 7th, 2014 (due before 12:30
40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available.
% Homework 2, exercise 1
%
% Learn how to use norm and dot
%
% Yuqi Wu
clear all
% create the vector x
x = [exp(2); 4+sqrt(2); pi; log(5); 3];
norm_X_1 = norm(x,1);
save Norm_X_1.dat norm_X_1 ascii
norm_X_2 = norm(x,2);
save Norm_X_2.dat norm_X_2 ascii
Homework 5  Due on Wednesday Feb. 26th, 2014 (due before
12:30 40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are availabl
_
_
_
_
_
_
_
_
AMATH 352

Final Exam
December 12th 2013
Name:
Signature:
Show all your work! I)etail
work! (losid book, no
your
notes. 110
o:alculator.
) I) points) True or false. iio flxplaliatioll is required
(a) For nov matrix A
A)
(b) [f A
c IR
>
i
Homework 4  Due on Monday Feb. 10th, 2014 (due before
12:30 40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available.
Homework 3  Due on Monday Feb 3rd , 2014 (due before 12:30
40 points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available.
Homework 2  Due on Jan. 24th, 2014 (due before 12:30 40
points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available. After y
Homework 1  Due on Jan. 17th, 2015 (due before 12:30 40
points)
The rst two exercises should be submitted online via Dropbox. Instructions of submission are on
the Catalyst webpage. For Exercise 1 and 2, three attempts per exercise are available. After y