Edit or run this notebook

HW 5 for CS 4220

You may (and probably should) talk about problems with the each other, with the TAs, and with me, providing attribution for any good ideas you might get. Your final write-up should be your own.

170 μs
245 μs
20.6 s
220 ms

The equilibrium discrete Klein-Gordon equation has the form

λ(uj12uj+uj+1)f(uj)=0.

Two common variants are f(u)=sin(u) (the discrete sine-Gordon equation) and f(u)=2u(1u2) (the ϕ4 model). We will focus on the ϕ4 model in this homework. Frequently, these models are studied on unbounded domains; we will consider them on finite domains with boundary conditions u0=uN+1=0.

171 μs
discrete_kg (generic function with 1 method)
2.2 ms
10.8 μs

Warm-up

Characterize all possible solutions to the ϕ4 model at λ=0.

Answer
166 μs

Playing with the problem

Consider a solution at λ=0 given by

uj={1.0,40j600.0,otherwise

159 μs
1.2 s

The following slider controls the coupling constant λ. The plot below shows the solution for varying λ found by Newton iteration from the starting guess. The plot is colored blue when the iteration converges, red otherwise. Play with the slider. Around what value of λ does convergence start to break down?

123 μs
Answer

Convergence starts to break down around just past λ=0.37.

7.6 ms
110 ms
913 μs

Continuation in λ

Write a code that simply runs (unguarded) Newton for a range of increasing λ values up to the point where the iteration ceases to converge. At each step, use the solution from the previous step as an initial guess. Plot u vs λ.

185 μs
Answer
120 μs
5.7 ms

Pseudo-arclength continuation

Use the pseudo-arclength continuation techniques from the April 22 lecture to produce a bifurcation diagram beyond what can be achieved by just controlling λ. Again, plot u vs λ. Start as in the plot above, and continue to the point where λ loops all the way back to zero. We provide some starter code and a visualization routine to see what the solution is doing along the curve.

234 μs
Answer
124 μs
1.1 ms
Plotting

As a for-free, we include a visualization tool for all the states visited along the continuation curve. The slider moves the current point along the curve.

168 μs
368 μs
1.4 ms

Bifurcation computation

We can characterize the turning point where λ is maximal via the equations

F(u,λ)=0g(u,λ)=0

where g(u,λ) is the λ component of a tangent vector at the point with some normalization condition, e.g. for some (mostly arbitrary c),

[JFλcT0][tug(u,λ)]=[01]

Using an initial guess computed from the continuation code in the previous part, apply Newton iteration to compute the turning point to full accuracy.

266 μs
Answer
128 μs
2.7 ms
Loading...
ii