Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
TA: I. Mazzieri
Instru tions:
This exam has 5 questions, some of whi
h have subparts. You have 3.5 hours to
omplete the exam. There are a total of 36 points available (su
ien
y at 18 points). You
annot
onsult any notes, books or aids of any kind. Write answers legibly in the additional
sheets provided, and show all of your work. Please write your name on the exam itself and on
the extra sheets.
1. Consider the following boundary value problem: Find u(x, t) for x [0, 1] and t > 0 that
satises the following partial dierential equation
u 2 u
2 = f (x, t), 0 < x < 1, t > 0,
t
x
u(0,
t)
=
u(1,
t) = 0,
t > 0,
(1)
M u(t)
+ Au(t) = f (t),
t > 0,
u(0) = u0 (t),
where A and M are the stiness and the mass matrix, respe
tively.
(
) (3 points) Write the expli
it Euler s
heme for the dis
retization of the above system of
ordinary dierential equations. Under whi
h
ondition on the time step the resulting
s
heme is stable?
a u = x +
u = gD
= gN
n
in ,
on D ,
(2)
on N ,
where n is the outward unit normal, N = (0, 1) {0} and D is the remaining part of the
boundary.
(a) (2 points) Compute a, gN and gD su
h that the exa
t solution of probem (2) is
u(x, y) = x3 + y 2 + 3.
(b) (2 points) Let Th be a partition of with meshsize h = 0.1 and let uh be the Galerkin
approximation to u: (b.1) write the Matlabr
ommand needed to generate the mesh;
(b.2) write the lines modied within the Matlabr fun
tion fem.m, in order to
ompute
uh .
(
) (3 points) For h = 0.5, 0.25, 0.125, 0.0625
ompute ku uh kL2 and ku uh kH 1 using
the fun
tions L2_err.m and H1_err.m: (
.1) report the results in a table; (
.2) what
is the observed experimental order of
onvergen
e? (Write all Matlabr
ommands
needed to answer to the questions).
3. Consider the problem:
min x22 x1 + 1 subje
t to
x21 x22
+
1 = 0.
4
9
(3)
(a) (2 points) Verify that the point x = (2, 0) solves the problem (3).
(b) (2 points) Des
ribe briey the quadrati
penalty algorithm to solve (3).
(
) (2 points) Write the Matlabr fun
tions funrb_Q and dfunrb_Q to dene the quadrati
penalty fun
tion Q(x1 , x2 , ) and its gradient Q(x1 , x2 , ). Hint: The Matlabr
fun
tions funrb_Q and dfunrb_Q have the following stru
ture:
fun
tion Q = funrb_Q(x,mu)
% expression of Q in terms of x(1), x(2) and mu
Q = ...
return
fun
tion gradQ = dfunrb_Q(x,mu)
% expression of the gradient of Q in terms of x(1), x(2) and mu
gradQ(1,1) = ...
gradQ(2,1) = ...
return
(d) (3 points) Minimize the quadrati
penalty fun
tion Q for k = 1, 10, 100, 1000 using
the un
onstrained minimization algorithm BFGS implemented in the Matlabr fun
tion Quadrati
_Penalty.m. Set k = 1/2k , and
hoose the starting point xsk+1 for
ea
h minimization to be the solution for the previous value of the penalty parameter.
Start from x0 = (0, 0) . Report the results and all the Matlabr
ommands needed
to answer the question.
2
subje t to Ax = b ,
(4)