Sei sulla pagina 1di 3

Advan

ed Mathemati al Methods for Energy Engineering  A.A. 2010/2011

Le tures: P.F. Antonietti, M. Verani

TA: I. Mazzieri

Exam - Full Session - 24/01/2011

First Name: .................................................... Last Name: .....................................................

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,

u(x, 0) = u0 (x), 0 < x < 1,

(1)

where f and u0 are given smooth fun tions.

(a) (2 points) Write the weak formulation.


(b) (2 points) Show that the semi-dis retization by the nite element method of problem
(1) leads to the following system of ordinary dierential equations
(

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?

2. Consider in = (0, 1) (0, 1) the following boundary value problem

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

4. Let f : Rn R be a fun tion to be minimized by employing a line-sear h based optimization algorithm.


(a) (2 points) State the Wolfe's onditions
(b) (4 points) Let () = f (xk +pk ) be dened as () = (3)(1). In Wolfe's onditions, hoose the onstants c1 and c2 so that the interval I of admissible steplengths
results to be I = [1, 2]
5. Consider the problem
min q(x) = 3x21 + 2x1 x2 + x1 x3 + 2.5x22 + 2x2 x3 + 2x23 8x1 3x2 3x3
x

subje t to the onstraints x1 + x3 = 3 and x2 + x3 = 0.


(a) (3 points) Write the above onstrained minimization problem in the form
1
min xT Gx + xT c
x 2

subje t to Ax = b ,

for suitable hoi es of A, G, c and b.


(b) (4 points) Verify that x = (2, 1, 1) is solution to (4).

(4)

Potrebbero piacerti anche