Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Maths 770: Advanced Numerical Computation

Assignment 2

The questions below ask for specific data about your computations.

Unless specified otherwise, round all numbers to six decimal places (6 d.p.).

Consider the system of equations G(u,λ) = 0 with u = (x,y) and λ ≥ 0, given by

' g1 (x,y, λ)   :=      x xy  x2     =   0,

(1)

' g2 (x,y, λ)   :=   −λy +                =   0.

The Forward Problem

Q1. Observe that (x,y) = (0, 0) and (x,y) = (2, 0) are both solutions for any value of λ .

(a) For which values of λ are these two solutions isolated?

(b) For which values of λ are these two solutions regular?

(c) Give a geometric argument why some solutions are not isolated.

[6 marks]

Q2. First assume λ = λ:= 1 is fixed. Then system (1) also has the solution u:=  (x,y ), with

x= 2 − 2yand y =  + ^5, which is isolated for λ = λ. Approximate ^5 ≈ 2 and set

(a) Apply Newton’s method in three different ways to approximate u(with λ = 1 fixed)

to an accuracy of 4d.p.; this means that you perform K ≥ 1 iterations until the error is zero when rounded to 4 d.p., and the error at step 1 ≤ k ≤ K is defined as the maximum

between the norms of G (u(k),λ), denoted f(k), and u(k1) u(k), denoted e(k):

• Use the exact (derived by hand) Jacobian matrix that is evaluated for each iteration;

• Evaluate the exact Jacobian matrix only once (Newton–Chord method);

• Evaluate the Jacobian matrix by finite differencing with size h = 10 4  in each step.

For each case, provide a table with K rows, one for each Newton iteration, and five columns, namely:  1) the iteration number k; 2) and 3) the x- and y-coordinates of the current estimate u(k)  (rounded to 6d.p.); 4) and 5) the values for f(k)  and e(k) .

(b) What do you conclude about the accuracy and convergence rate of the different approx-imations? (Also compare your results with the true error eru(K)  :=||u(K) − u∗ ||.)

[15 marks]

Q3. Let us now vary λ . Starting from λ0  = 1 and the true solution u0  := udefined in Q2, take

two parameter continuation steps with ∆ = −0.5 (so λ decreases).

In each continuation step, use the tangent predictor as a seed for Newton’s method; evaluate the exact Jacobian matrix for each iteration; and iterate until the error is zero to 4d .p..

(a) Provide a table with two columns, one for each continuation step i, and eight rows, namely: 1) the value for λ; 2) and 3) the x- and y-coordinates of the first estimate u; 4) the number K of iterations needed for Newton’s method to converge; 5) and 6) the x- and y-coordinates of the final estimate uK); and 7) and 8) the values for fi(K)  and e

(b) Plot the final estimates uK)   on the branch u(λ) in a planar figure, with λ on the

horizontal and a measure for u of your choice on the vertical axis; also include uand the branches from Q1; use this same figure to plot data from Q4 and Q5.

(c) Recall from Q1 that you already know two solutions for λ = 0.  Does the branch u(λ) pass through either of these? Explain why or why not.

[11 marks]

Q4. Take one parameter continuation step from (u0 ,λ0 ), as in Q3, but with ∆ = 0.5, so λ

increases.

(a) What is u(λ) at λ = λ0 ?

(b) How many Newton iterates did this take and what is the resulting approximation for

u1  := u(λ + ∆)?

(c) Suppose (u1 ,λ 1 ) with λ 1  = λ + ∆ is the result of a pseudo-arclength continuation step. What would have been the step size ∆s?

(d) Add the solution to your plot from Q3(b).

[6 marks]

Q5. Starting from λ0  = 1 and the true solution u0  = udefined in Q2, you are now asked to

compute one pseudo-arclength continuation step with s = 0.5, or five pseudo- arclength continuation steps with ∆s = 0.1; the latter will gain you 5 bonus points.

In each continuation step, use the tangent predictor as a seed for Newton’s method; evaluate the exact Jacobian matrix for each iteration; and iterate until the error is zero to 4d .p..

(a) Add another column to the table from Q3 that shows the corresponding information about the (last) pseudo-arclength continuation step; here, state the value for λ (K)  in the first row and include the resulting point(s) in your plot from Q3(b). Make sure all points in this figure are clearly labelled to distinguish which is which.

(b) Compare the (last) point from the run with the (two) points found in Q3 and explain

why the discrepancy is relatively large or small.

(c) In readiness for a possible next step, compute u(s) and λ(s) at the end of the (last) step and state the coordinates of the tangent predictor.

[11 marks]

The Inverse Problem

From now, assume that ud  := (xd ,yd ) has been computed as a solution to system (1), but its value is only given to 2d.p. and the corresponding value λd  for λ is not known.

Q6. If ud  := (xd ,yd ) satisfies the first equation g1 (x,y, λ) = 0, then λd  can easily be recovered

from the second equation of system (1).

(a) State the equation for λ, given that the first equation g1 (x,y, λ) = 0 holds.

(b) Suppose ud  := (1.30, 0.35).  Show that this rounded solution is an actual solution to system (1), and give the associated parameter value λd .

(c) Next, suppose ud   := (1.27, 0.36).  Is ud  a solution to system (1)?  What is λd  when determined from part (a)?

[7 marks]

Q7. In the case of rounded solutions, optimisation can help to find a good estimate for λd , namely, a value  associated with the closest solution  := ( , y˜) to system (1).  For a non-trivial solution branch of system (1),  can be determined by minimising the following objective

function

J (λ) =  ( (xd f1 (λ)) 2 +(yd f2 (λ)) 2 ) ,

i.e.,  := argminλ0 J (λ), where

f1 (λ) =  (2 + λ − 4(2 − λ)2 λ)   and  f2 (λ) =  (2 − λ + 4(2 − λ)2 λ) .

(a) Derive the gradient and Hessian matrix of J involved in the implementation of Newton’s

method. Also provide the Gauss–Newton approximation of the Hessian matrix.

(b) Solve the minimisation problem for ud  := (1.30, 0.35) in two different ways:

• with Newton’s method;

• with the Gauss–Newton method;

and Armijo line search, initial guess λ(0)  = 1 and parameters α = 1, β = 0.1, τ = 0.5, maxIter = 100 and tol = 10 4  (the value of  is found to 4d.p.).

For each case, provide a table with two rows, one for each method, and five columns, namely: 1) the number of iterations to convergence; 2) the value for ; 3) the value for J (); and 4) and 5) the x- and y-coordinates of the associated solution  .

Plot the objective function J (λ) for an acceptable range of λ as found in Q1(b) with a 4d.p. accuracy. On the same graph, display the path J (λ(k)) for both methods versus λ (k), where k is the iteration number.  Highlight the initial condition λ(0)  = 1 and the final solution  for both methods. Why are the results not surprising?

(c) Repeat part (b) for the minimisation problem with ud   := (1.27, 0.36) and provide a summary table and figure for this case. What do you conclude from the results for these two cases?

[18 marks]

Q8. We claim that data ud  := (1.60, 0.20) is a non-trivial solution to system (1).

(a) What is the corresponding value for λd ?

(b) Repeat Q7(b) to solve the minimisation problem for ud   =  (1.60, 0.20) using again

the same parameter settings.  As before, provide a table and figure to summarise the performance of the methods. What do you observe? Explain why the methods cannot converge.

[7 marks]

Q9. To deal with rounded estimates of a non-trivial solution, the minimisation problem can be

rewritten into a KKT-system involving two Lagrange multipliers, denoted a and b.  The Lagrangian reads:

L(x,y,λ,a,b) =  ((xd x)2 + (yd y)2 ) + ag1 (x,y,λ) + bg2 (x,y,λ) ,

where g1  and g2  are the two functions that define system (1).

(a) Explain each of the three terms involved in the Lagrangian expression. (b) Derive the gradient and Hessian matrix of the Lagrangian.

(c) Solve the minimisation problem using Newton’s method with Armijo line search and parameters α = 1, β = 0.1, τ = 0.5, maxIter = 100 and tol = 10 4, starting from initial conditions (x(0) ,y(0) ,λ(0) ,a(0) ,b(0) ) = (xd ,yd , 1, 1, 1), for each of the following cases:

ud  := (1.30, 0.35);

ud  := (1.27, 0.36);

ud  := (1.60, 0.20); and

ud  := (1.72, 0.13).

Provide a table with four rows, one for each case, and four columns, namely: 1) the num- ber of iterations needed to convergence; 2) the value for ; 3) the value for L( , y˜,  ,  , );

and 4) the L2-error on the solution ∥ ud 2 .

Conclude on the accuracy of the recovered parameter  and the performance of the method in dealing with any non-trivial data solution ud .

[18 marks]