calculation of pitchfork bifurcations for parameter ... · calculation of pitchfork bifurcations...

33
Calculation of Pitchfork Bifurcations for Parameter Dependent Nonlinear Problems Björn Eriksson TRITA-NA-E05148

Upload: ledung

Post on 02-Aug-2018

275 views

Category:

Documents


2 download

TRANSCRIPT

Calculation of Pitchfork Bifurcations for Parameter Dependent Nonlinear Problems

Björn Eriksson

TRITA-NA-E05148

Numerisk analys och datalogi Department of Numerical Analysis KTH and Computer Science 100 44 Stockholm Royal Institute of Technology SE-100 44 Stockholm, Sweden

Calculation of Pitchfork Bifurcations

for Parameter Dependent Nonlinear Problems

Björn Eriksson

TRITA-NA-E05148

Master’s Thesis in Scientific Computing (20 credits) Single Subject Courses,

Stockholm University 2005 Supervisor at Nada was Michael Hanke

Examiner was Jesper Oppelstrup

AbstractMethods to detect and investigate simple bifurcation points have been investigated.Two methods to find and follow the emanating branches have been studied: Oneusing local perturbations and the other using knowledge of the behavior of thesolution curves especially the “bifurcation equation”.

Both methods are found to be useful. The perturbation method requires moreknowledge of the method and the problem at hand since there are a number ofparameters that may require tuning, whereas the bifurcation equation method ismore straight forward. There are also indications that the bifurcation equationmethod is less computationally expensive.

Beräkning av pitchfork bifurkation för ickelinjäraparameterberoende problem

SammanfattningMetoder för att hitta och undersöka enkla bifurkationspunkter har undersökts. Tvåmetoder för att hitta och följa de uppkommande grenarna har undersökts. Den enaanvänder lokal störning, den andra använder kunskap om beteendet i en enkelbifur-kations punkt, framförallt den så kallade bifurkations-ekvationen.

Båda metoderna ses som användbara. Användande av lokal störning kräver engod kunskap om metoden samt det aktuella problemet då det finns ett antal para-metrar att ställa in. Metoden med bifurkations-ekvationen är mer direkt. Det finnsockså indikationer på att metoden med bifurkations-ekvationen är mindre beräk-ningsintensiv.

Contents

1 Background 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3.1 Predictor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3.2 Corrector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3.3 Stepsize Adaptation . . . . . . . . . . . . . . . . . . . . . . . 81.3.4 Turning Point Calculations . . . . . . . . . . . . . . . . . . . 10

2 Bifurcation 112.1 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Locate Bifurcation Point . . . . . . . . . . . . . . . . . . . . . . . . . 152.3 Methods to Switch Branch . . . . . . . . . . . . . . . . . . . . . . . . 16

2.3.1 Method using Local Perturbation . . . . . . . . . . . . . . . . 162.3.2 Bifurcation Equation . . . . . . . . . . . . . . . . . . . . . . . 17

3 Implementation 19

4 Results 214.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2 Test Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2.1 Rotating Double Pendulum . . . . . . . . . . . . . . . . . . . 214.2.2 Superconductivity within a Slab . . . . . . . . . . . . . . . . 24

5 Conclusions 27

References 28

Chapter 1

Background

This Chapter will present first an introduction to the types of problems investigatedand then the theoretical background that was considered the starting point of thismasters project.

1.1 Introduction

To explain what type of problems we are solving and different aspects that appearwe will study the example of a rotating double pendulum. Initially it is stationaryhanging straight down. See figure 1.1.

Figure 1.1. Pendulum at rest.

The circles indicate point masses, and there are friction less joints at the cross barand the top circle. When the pendulum is rotated around its axle our experience tells

1

us that there are at least two possible states the pendulum can take: it can remainhanging straight down, and it can move out under the influence of the centrifugalforces, see figure 1.2.

❅❅

❅❅

❅❅��������������������

Figure 1.2. Pendulum under the influence of the centrifugal forces.

This is a parameter dependent problem, with the speed of rotation being theparameter. Dependent of the speed of rotation we have slightly different problemswith different solutions. For some changes to the parameter the solutions changedrastically, for example from hanging straight down to angled out under the influenceof the centrifugal forces.

The way we will work with parameter dependent problems is to start somewherewith a specific parameter value for which the solution is known, in this case: nospeed of rotation with the solution of the pendulum hanging straight down. Thenwe add a little to the parameter, that is start slowly rotating, we now expect thenew solution to be close to the known solution. In line with this we look for thenew solution in the vicinity of the known solution. This is repeated until we havesolutions for all the interesting parameter values.

The problem is that with this method we will probably only find one of the solu-tions most likely the one with the pendulum hanging straight down. This report isaimed at investigating methods used to realize when there are new solutions emanat-ing and choose which of the solutions we want to follow, the one with the pendulumhanging straight down or the solution with the pendulum angled out. Probably wewant to run the program twice to find both solutions. Actually mathematically wehave three solutions, the one hanging straight down, one with positive and one withnegative angle. So in general we want to find three solutions. In figure 1.3 we can seethe angles of the upper arm of the pendulum plotted against the speed of rotation.

2

0 0.2 0.4 0.6 0.8 1 1.2 1.4−1.5

−1

−0.5

0

0.5

1

1.5

λ

u 1

Figure 1.3. Bifurcation diagram for the Pendulum problem.

The fact that we get three solutions extending like a fork is what gives the namepitchfork bifurcation.

1.2 Theory

The problems studied can be written as,

H (u, λ) = 0, u ∈ Rn, λ ∈ R (1.1)

where H : Rn+1 → Rn is a non-linear smooth mapping. The aim is to find solutionsu for varying λ, this will then produce a curve of solutions. This curve can bevisualized in a figure using e.g. ||u|| as the y-axis, see figure 1.4 for an example. Asolution (u∗, λ∗) of the general equation (1.1) can be found by the Newton method.As long as the Jacobian H ′

u (u, λ∗) is nonsingular and we have knowledge of an initialguess u0, close to the correct solution, the iteration

uj+1 = uj −(H ′

u (uj , λ∗)

)−1H (uj , λ

∗)

is expected to converge to u∗.

3

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

λ

|u|

Figure 1.4. Example of a solution curve.

We will study ways to follow a solution curve, (u, λ) from a starting point (u0, λ0).It might be tempting to parameterize the curve using λ, however often this is nota good idea. The problem arises if we hit a turning point, that is a point wherethe solution parameterized with λ turns so that we have two solutions for the sameλ, see figure 1.5 for an example. The solution to the problem is to parameterizewith another variable, we will use the arclength. In line with this we will usec (s) = (u(s), λ(s)) as an expression of the curve, where s is the parameterizationvariable.

The way to move from our initial solution to other points on the solution curveis to use a predictor corrector method. As the name indicates this first predicts anew point and then corrects the guess, the basic algorithm being

whi l e not f i n i s h e dPred i c twhi l e not convergedCorrect

endend

Figure 1.6 shows an example of how the predictor-corrector method is expected towork.

The next step is to find predictor and corrector methods. As a predictor I willuse the Euler (tangent) method, for other alternatives see [2]. I will examine twocorrector methods, the Newton method and the Broyden method.

4

0 1 2 3 4 5 6 70

10

20

30

40

50

60

λ

||u||

Turning point

Figure 1.5. Example of a turning point.

0 0.2 0.4 0.6 0.8 1 1.2−0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

λ

|u|

Solution curveTangentTangentPredictor pointCorrector point

Figure 1.6. Example of the predictor-corrector method.

As we will see the predictor methods require a stepsize, two methods for choosingthis will be used, one based on Asymptotic expansion and the other presented byDen Heijer and Rheinboldt, these can be found in [2].

This is where it gets interesting, we now have the basics for a continuationmethod. Then we can add methods for locating special points of interest. Thereare a number of methods available for locating turning points. Two of these are

5

discussed in [2], Pönisch-Schwetlick’s method and Rheinboldt’s method. The aim ofthis report is to study pitchfork bifurcations, see figure 1.7 for an example.

0 0.2 0.4 0.6 0.8 1 1.2 1.40.5

1

1.5

2

2.5

3

3.5

λ

||u||

Bifurcation point

Figure 1.7. Bifurcation example.

Before we move on we introduce some notation. We will denote (u, λ) by U . U0s

will be the predicted point at step s. U is will be corrector step i at predictor point

s, when it is obvious we will let s be implied and use U i for U is. Us will be the

converged value at predictor point s. The Jacobian of a function f will be denotedby f ′, f ′x will be the Jacobian with regards to variables x. As a special case theJacobian of H (U) will be denoted by J (U), often with U implied. And again Jx

will be the Jacobian with regards to variables x. To clarify, J(U) ∈ Rn ×Rn+1 butJ(U)x ∈ Rn ×Rk where k is the number of elements in the vector x. A vector is acolumn vector and the transpose of a vector or a matrix will be denoted aT .

1.3 Methods

First we can add to our basic algorithm.

whi l e not f i n i s h e dPred i c twhi l e not convergedCorrect

endAdapt S t ep s i z eI n v e s t i g a t e po in t s o f s p e c i a l i n t e r e s tend

end

6

1.3.1 Predictor

The Euler predictor method uses the tangent to predict the next point.

U0s+1 = Us + hts (1.2)

where t is the tangent of the solution curve and h the stepsize. The tangent tis the derivative of the solution curve c (s). Differentiating H (c (s)) = 0 gives usH ′ (c (s)) c (s) = 0, for normalization choose ||c (s) || = 1. This has defined thetangent up to direction. We can assume that the curve is traversed in a constantdirection and let c (s)T c (s+ 1) > 0. Summarizing the tangent can be calculated bysolving(

J (Us)tTs−1

)ts =

(01

)

and normalizing to ||ts|| = 1

1.3.2 Corrector

Both Corrector methods are Newton type. All Newton type methods use somethingrelated to the inverse of the Jacobian to iterate from the starting guess to thesolution. The Newton method uses the inverse of the Jacobian in every step, otherNewton type schemes use an approximation of the Jacobian instead.

This is based on Taylor expansion.

H (U + ε) = H (U) +H ′ (U) ε+O(ε2

)By setting H (U + ε) = 0 and neglecting higher order terms, we get

ε ≈ −H ′ (U)−1H (U)

The corrector is then U i+1s = U i

s + εi. This is the Newton method.The Broyden method is different in that it does not use the exact Jacobian in

every step. Instead it starts with the Jacobian in the first step. After this it updatesthis Jacobian to an approximation of the correct Jacobian, the idea being that onestep in the Newton iteration does not change the Jacobian much. In cases wherethere are a large number of corrector iterations needed the approximation of theJacobian will not be accurate anymore, so after a certain number of steps the exactJacobian is used again. The number of steps used before calculating the Jacobianagain is determined by the user with the parameter kmax. The actual algorithm isas follows

Given U0s , kmax

Set k = 0r epeati f (k/kmax ∈ N) then

7

Calcu la te J = J(Uk

s

)Solve Jsk = H

(Uk

s

)Uk+1

s = Uks + sk

k = k + 1e l s eSo lve Jv0 = H(Uk

s )f o r j = 0 : k − 2 do

vj+1 = vj +sTj vj

sTj sjsj+1

endsk = vk−1

1− sTk−1

vk−1

sTk−1

sk−1

Uk+1s = Uk

s + skk = k + 1

endun t i l convergence

This is actually a nonstandard version of the Broyden update, which does not storeJ−1, and instead of actually changing the matrix it saves the changes and appliesthese after solving Jv0 = H(Uk

s ). Further information on this can be found in [2].

1.3.3 Stepsize Adaptation

The difficulty in determining the stepsize is that on the one hand you want thestepsize to be as large as possible in order to move as far along the curve as possible,but on the other hand a large stepsize will most likely mean that the predictor isa bad approximation to the new solution. This will lead to the need of a largenumber of corrector steps in order to find the solution curve. The opposite end ofthe spectrum is to want the corrector iteration to converge quickly, but this will leadto the need of using a very small stepsize to get an accurate predictor point.

Now obviously we will want the method to use stepsizes somewhere in betweenthese two extremes in order to move along the curve nicely but still not need toomany computationally expensive corrector steps.

The stepsize adaptations used for Newton type predictor corrector methods useknowledge of how the Newton iteration has converged. We will present two methods:one bases on the asymptotic expansion of the speed of convergence with respect toh, the stepsize, and the other was presented by Den Heijer and Rheinbold, both arepresented in further detail in [2].

Asymptotic Expansion

This method is based on two concepts, the contraction rate and the distance to thesolution curve. It first specifies a wanted contraction rate and distance to solutioncurve and then calculates what stepsize would be needed to have achieved this inthe last iteration.

8

Contraction rate measures the ratio between two steps in the Newton iterate.

κ(U j+1, h

)=

||J (U j

)−1H

(U j+1

) ||||J (U j)−1H (U j) ||

Here h given in (1.2) is the stepsize taken. Since the Newton method is of secondorder we have

κ (U, h) = cκ (U, h)h2 + O (h3

), (1.3)

with some unknown function cκ. Fixing a wanted contraction rate κ and using thisin (1.3) we get

cκ (U, h) =κ (U, h)h2

=κ(U, h

)h2

⇒ h = h

√κ

κ.

This is the stepsize which would have given the preferred contraction rate in theprevious iteration step so it is a suggestion for the stepsize for this iteration step.

The distance to the solution curve is

δ(U j , h

)= ||J (

U j)−1H

(U j

) ||this also has the asymptotic behavior δ (U, h) = Cδ (U)h2+O (

h3), so using a similar

argument as for the contraction rate we get the stepsize which would have given thewanted distance.

h = h

√δ

δ

We now have two suggestions for the stepsize and for our next stepsize we will usethe smallest of these.

Den Heijer-Rheinboldt

This method starts with specifying the optimal amount of steps for the Newtoniteration to perform before reaching convergence. It then uses knowledge of theerror of the Newton iterations. If we let ej = γ||U∞

k − U jk || be the modified error of

the jth Newton iterate or corrector step and using a correctly chosen γ the error isknown to behave as

ej+1 (h) ≤ φ (ej (h))

where φ is a known monotone function. For the Newton method the two followingare possible

φ (e) =e2

3 − 2e

φ (e) =e+

√10 − e2

5 − e2 e2.

9

We have

w (h) =||Uk (h) − Uk−1 (h) ||||Uk (h) − U0 (h) || ≈ ||U∞ (h) − Uk−1 (h) ||

||U∞ (h) − U0 (h) || =ek−1 (h)e0 (h)

≤ φk−1 (e0 (h))e0 (h)

.

Since k, φ and w are known we can calculate e0 (h). From here we look at the numberof iterations we want k and get

φk(e(h))

= φk (e0 (h)) .

Which gives us e(h). Using the asymptotic expansion

||U∞ (h) − U0 (h) || = ceh2 + O (h3

)we get

ceh2

ceh2≈ ||U∞ (h) − U0 (h) ||

||U∞(h) − U0

(h)|| ≈ e0 (h)

e0(h) ⇒ h = h

√e0 (h)e0

(h)

1.3.4 Turning Point Calculations

It can easily be seen that moving past a turning point is not a problem as long aswe use an arclength parameterization. This requires an auxiliary equation,

||u− u0||2 + |λ− λ0|2 − h2 = 0

for further examples see [2].As for actually determining turning points this is not of interest in this report,

but the interested reader can find methods for this in [2].

10

Chapter 2

Bifurcation

There are three parts of the study of bifurcations. First we need a method to find ifthere is a bifurcation between two solution points, then might want to find a betterapproximation of the point and lastly we want to be able to follow a selected path.

2.1 Theory

First lets study some general bifurcation theory. The ideas presented here are basedon the presentation of bifurcation theory in [1]. A high level definition of a bifurc-ation point is that it is where two solution curves intersect. A typical example canbe found in figure 2.1.

0 0.2 0.4 0.6 0.8 1 1.2 1.40.5

1

1.5

2

2.5

3

3.5

λ

||u||

Bifurcation point

Figure 2.1. Bifurcation example.

11

We will use a special case of the implicit function theorem. For a proof see anystandard textbook in mathematical analysis e.g. [3]

Theorem 2.1 Implicit function. Let H : Rk+m → Rk be a function such thatH(x, y) = 0 for some point (xp, yp) ∈ Rk+m, with xp ∈ Rk and yp ∈ Rm. Assumethat Jxp is invertible, where Jxp is the part of the Jacobian of H that correspondsto xp. Then there exist open sets V ⊂ Rk+m and W ⊂ Rm, with (xp, yp) ∈ V andyp ∈W having the following property:

To every y ∈W corresponds a unique x such that

(x, y) ∈ V and H(x, y) = 0.

If this x is defined to be g(y), then g is a function of W into Rk, g(y) = x

H(g(y), y) = 0 (y ∈W ),

A formal description of a bifurcation point is

Definition 2.2. Let H : Rn+1 → Rn be sufficiently smooth. Let c(s) be a solutioncurve such that H(c(s)) = 0 for s ∈ R. The point c(a) is called a bifurcation pointif there exists an ε > 0 such that every neighborhood of c(a) contains zero-points ofH which are not on {c(s), a− ε < s < a+ ε}.

First we note that in this case k = n and m = 1. Since we have two solutioncurves intersecting, no matter which variable is chosen to be y, x will not be uniqueand because of this all Jx will be singular. The fact that all Jx are singular meansthat removing any column from J(c(a)) we will still have something linearly de-pendent and hence there are at least two columns that are dependent on the restand therefore the kernel has at least dimension two.

Let U denote a bifurcation point. The first part to study is the generic case,when the dimension of the kernel is exactly two. This is also the only case that willbe studied in this report. This means that we can decompose H(U) into

H(U) = H(U1, U2) =(H1(U1, U2)H2(U1, U2)

)

where Ui ∈ Ei, Hi : Ei → Fi, i = 1, 2. Where

E1 = kerH ′(U), E2 = E⊥1

F2 = rangeH ′(U), F1 = F⊥2

obviously dimE1 = 2, dimE2 = n− 1, dimF1 = 1, dimF2 = n− 1. From this we get

H ′(U) =(H ′

1U1(U1, U2) H ′

1U2(U1, U2)

H ′2U1

(U1, U2) H ′2U2

(U1, U2)

)

12

and in our bifurcation point

H ′(U) =

0 0 0 . . . 00 0...

... H ′2U2

(U1, U2)0 0

.

H ′2U2

(U1, U2) is a nonsingular (n−1)×(n−1)matrix. Since the equationH2(U1, U2) =0 has the solution (U1, U2) = (U1, U2) we can use the implicit function theorem toconclude that there exist neighborhoods N1 of U1 in E1 and N2 of U2 in E2 and asmooth mapping φ : N1 → N2 such that

H2(U1, U2) = 0 if and only if U2 = φ(U1).

holds for all U1 ∈ N1, U2 ∈ N2. That is we have a local parameterization of theequation H2(U1, U2) = 0 in terms of the variable U1 in the two dimensional space E1.As a consequence for all U1 ∈ N1, U2 ∈ N2, H(U) = 0 is equivalent to U2 = φ(U1)and H1(U1, U2) = 0, or

b(U1) = H1(U1, φ(U1)) = 0 (2.1)

which is called the bifurcation equation.Using these equations we can classify a simple bifurcation point. First differen-

tiate H2(U1, φ(U1)) = 0

H ′2U1

(U) +H ′2U2

(U)φ′(U1) = 0

Here H ′2U1

(U) = 0 and H ′2U2

(U) is nonsingular which means φ′(U1) = 0. Differenti-ating b,

b′(U1) =H ′1U1

(U) +H ′1U2

(U)φ′(U1),

b′′(U1) =H ′′1 U2

1(U) + 2H ′′

1 U1U2(U)φ′(U1)+

H ′′1 U2

2(U)[φ′(U1), φ′(U1)] +H ′

1U2(U)φ′′(U1)

Evaluating this at the bifurcation point using φ′(U1) = 0, H ′1U1

(U) = 0 andH ′1U2

(U) =0 we get

b(U1) = 0b′(U1) = 0b′′(U1) = H ′′

1 U21(U1)

The solutions to b can be characterized by a lemma by Morse, see [1].

Lemma 2.3 Morse. Let U1 ∈ R2, and let b : R2 → R be a smooth functionsuch that b(U1) = 0, b′(U1) = 0 and the Hessian b′′(U1) has nonzero eigenvaluesλ1, λ2. Then there are open neighborhoods U of 0 ∈ R2 and V of U1 ∈ R2 anda diffeomorphism φ : U → V such that φ(0) = U1 and b(φ(ξ1, ξ2)) = λ1ξ

21 + λ2ξ

22

where (ξ1, ξ2) ∈ U .

13

If the eigenvalues have the same sign, then U1 is an isolated point and thereby ofno interest to us since this cannot be reached by a continuation method. However ifthe eigenvalues are of opposite sign then the structure of b−1 and consequently H−1

are described by two curves intersecting in U1 and U respectively.

Definition 2.4. Let H : Rn+1 → Rn be sufficiently smooth. Let e ∈ Rn+1 spanF1 = ker(H ′(U)T ). A point U ∈ Rn+1 is called a simple bifurcation point of theequation H = 0 if the following conditions hold:

1. H(U) = 0

2. dim(ker(H ′(U))) = 2

3. eTH ′′(U)|(kerH′(U))2 has one positive and one negative eigenvalue.

where eTH ′′(U)|(kerH′(U))2 is the Hessian of eTH created by the second derivativesof the two parameters that correspond to the kernel in the same way as E1 above.

Definition 2.5. Let c ∈ Rn+1 be a curve parameterized with respect to arclengthand ω be the subset of R which describes the entire curve, then

range(c) = {c(s) : s ∈ ω}.

Theorem 2.6. Let U ∈ Rn+1 be a simple bifurcation point of the equation H = 0.Then there exist two smooth curves c1(s), c2(s) ∈ Rn+1, parameterized with respectto arclength s, defined for s ∈ (−ε, ε) and ε sufficiently small, such that the followingholds:

1. H(ci(s)) = 0, i ∈ {1, 2}, s ∈ (−ε, ε),2. ci(0) = U , i ∈ {1, 2},3. c1(0), c2(0) are linearly independent,

4. H−1(0) coincides locally with range(c1) ∪ range(c2).✷

We can now differentiate eTH(ci(s)) = 0 twice and evaluate the result at s = 0.

eTH ′′(U)[ci(0), ci(0)] + eTH ′(U)ci(0) = 0

Since e spans kerH ′(U)T , the second term is zero, which leads to the followinglemma describing the tangents of the two curves at the bifurcation point U .

14

Lemma 2.7. Let U ∈ Rn+1 be a simple bifurcation point of the equation H = 0.Then the following holds.

kerH ′(U) = span{c1(0), c2(0)}eTH ′′(U)[ci(0), ci(0)] = 0 for i ∈ {1, 2}. (2.2)

2.2 Locate Bifurcation Point

Locating a bifurcation point is usually done using a test function (τ) such that τchanges sign when U moves across a bifurcation. This leads to the test τ(Us)τ(Us+1) <0 to find a bifurcation. There are a number of possible τ , see [4] for some examples.In general we want to use as much available information as possible.

The method we will use is based on

τ = det(c(s)

H ′(c(s))

)The following argument shows that τ changes sign at a bifurcation point. Let

A =(c(s)

H ′(c(s))

).

Let V be an orthogonal matrix with columns v1, v2 such that v1 = c1(0) andspan{v1, v2} = kerH ′(U), and W an orthogonal matrix with w1 = e where e asbefore spans the kernel of H ′(U)T . Now using the Taylor expansions

c1(s)T vj = c1(0)T vj + O(s)

wTkH

′(c1(s))vj = wTkH

′(U)vj + wTkH

′′[c1(0), vj ]s+ O(s2)

we can look at(1 0T

0 W T

)AV =

1 + O(s) O(s) O(s)

O(s2) ρs+ O(s2) O(s)O(s) O(s) B + O(s)

(2.3)

which, since W and V are orthogonal, have the same determinant as A. Here B isa non singular matrix and ρ is given by the off diagonal entries of(

eTH ′′(U)[v1, v1] eTH ′′(U)[v1, v2]eTH ′′(U)[v2, v1] eTH ′′(U)[v2, v2]

).

As s → 0 the determinant of the right hand side of equation (2.3) approachesρ det(B)s. It follows that det(A(s)) changes sign at s = 0.

Now this might seem very computationally expensive, but from the continuationmethod we have a LU-factorization of the Jacobian and using this one can easilycalculate the LU-factorization of(

H ′(c(s))c(s)

)and then just multiply the diagonal elements.

15

2.3 Methods to Switch Branch

We will study two different ways of finding a new branch.

2.3.1 Method using Local Perturbation

The basic idea behind this method is to solve a slightly different problem, which willnot have a bifurcation. Instead of

H(U) = 0

we solve

H(U) = p

for some vector p, see fig 2.2 for illustration.

H(U)=p

H(U)=0

H(U)=p

Figure 2.2. Perturbation example.

This can be used in two ways, globally and locally, if used globally you run theentire program with this alteration and find the different branches. With the localidea you run normally until a bifurcation has been found, then p is added and yourun the predictor corrector model using p for a reasonable amount of steps. Oncethis is done you can switch off p and solve as usual to find the rest of the newbranch. We will investigate the local idea. Using α as the distance to travel alongthe perturbed curve this results in the following algorithm

set α

16

set prepeatUs = Us − J−1(Us)(H(Us) − p)

until convergencerepeatUs+1 = Us + ht(H ′(Us+1))repeatUs+1 = Us+1 − J−1(Us+1)(H(Us+1) − p)

until convergences=s+1;α = α− hadapt s t e p s i z e h

until α < 0repeatUs = Us − J−1(Us)(H(Us))

until convergence

2.3.2 Bifurcation Equation

This is based on the bifurcation equation (2.1), by approximating this and (2.2) wecan calculate the two tangents at the bifurcation point.

In order to approximate the tangents we must first approximate the bifurcationpoint, this is done with a secant method. The next step is to approximate the kernelskerH ′(U) and kerH ′(U)T . Denote the two vectors of the kernel by k1, k2. We knowthat the two tangents c1 and c2 span the kernel, since we know c1, it is the tangentof the curve we are following, we can set k1 = c1. Now the other vector spanningthe kernel would ideally be found by solving(

H ′(U)kT

1

)k2 = 0 (2.4)

with ||k2|| = 1. But since U is just an approximation of the bifurcation point, H ′(U)and k1 are also just approximations so we cannot expect equation (2.4) to be exact.Because of this we instead solve the minimization problem

minτ2

||H ′(U)τ2||2 + (kT1 τ2)

2 ||τ2|| = 1 (2.5)

where the τ2 minimizing (2.5) is k2. Using

A =(H ′(U)kT

1

)

it can be seen that the solution to (2.5) is the unit eigenvector to ATA that cor-responds to the smallest eigenvalue. Finding the eigenvector corresponding to thesmallest eigenvalue can be done using the inverse iteration method.

17

Now for finding e, the kernel of H ′(U)T , we once again have a similar problemwith approximations. This time we want to minimize

mine

||H ′(U)T e|| ||e|| = 1

and this can be seen to be the eigenvector corresponding to the smallest eigenvalueof H ′(U)H ′(U)T which can also be solved with the inverse iteration method.

The inverse iteration method for τ2 is

input LU = A %The LU f a c t o r i z a t i o n of the matrixchoose i n i t i a l guess τ2repeatSolve UTLTLUτn = τ2τ2 = τn

until convergencek2 = τ2

it should be noted that from earlier calculations we have the LU-factorization ofH ′(U) and from this we can easily calculate the LU-factorization of A. For e thereis a similar algorithm.

From lemma 2.7 we have that the two tangents also span the kernel of H ′(U), itfollows that ti = ξ1,ik1 + ξ2,ik2 for i = 1, 2. What then remains is to find ξi,j . Thesecond part of lemma 2.7 states

eTH ′′(U)[t, t] = 0

using our representation of the tangents this turns into

eTH ′′(U)[k1, k1]ξ21 + 2eTH ′′(U)[k1, k2]ξ1ξ2 + eTH ′′(U)[k2, k2]ξ22 = 0. (2.6)

Using g(ξ1, ξ2) = eTH(U + ξ1k1 + ξ2k2) the coefficients of (2.6) can be calculatedusing standard difference formulas

δ2ξ1g(0, 0) =(g(ε, 0) − 2g(0, 0) + g(−ε, 0))/ε2 + O(ε2)

δ2ξ2g(0, 0) =(g(, ε) − 2g(0, 0) + g(0,−ε))/ε2 + O(ε2)

δξ1δξ2g(0, 0) =(g(ε, ε) + g(−ε,−ε) − g(ε,−ε) − g(−ε, ε))/4ε2 + O(ε2)δξ2δξ1g(0, 0) =δξ1δξ2g(0, 0)

After calculating these equation (2.6) can be solved for ξ1/ξ2 which results in twotangents, one of which should be easily recognized as the original, and the other canbe used as the new tangent in order to branch off.

18

Chapter 3

Implementation

The first thing to consider about implementation is what programming languageto use. For this project the choice was simple, since a Matlab implementation ofa predictor corrector scheme was available, so this was used to add the bifurcationmethods examined in this report. The available implementation was created byClaes Robertsson for [2].

The implementation of a test problem requires three functions to be implemen-ted, these can be seen in table 3.1.

Table 3.1. Problem.stpnt_problem creates an initial point (u, λ)problem Performs H(U)jac_problem Returns the Jacobian H ′(U)

Before we can run a test case we also have an number of parameters to set. Firstof which is to choose which methods to use, these variables are listed in table 3.2.

Table 3.2. Chosen methods.Parameter Description Default valuepredictor Predictor method Eulercorrector Corrector method Newtonstepadapt Stepsize adaptation Asymptotic

turningmethod Turning point finding method nonebranchingmethod Branching method none

Then there are a number of parameters regarding stepsizes and stepsize adapt-ation, found in table 3.3

19

Table 3.3. Stepsize parameters.Parameter Description Default valuefmax Max change in stepsize 2ctmax wanted contraction for 0.9

asymptotic stepsize adaptationdmax wanted distance for 1000

asymptotic stepsize adaptationnumiter Optimal number of iterations for 6

Den Heijer-Rheinboldt stepsize adaptationhmax Maximal stepsize 1hmin Minimal stepsize 1 · 10−6

Of these most are not changed much, but hmax and hmin are highly problemdependent and therefore often adapted.

Next there are some parameters regarding the branching, found in table 3.4

Table 3.4. Branching parameters.Parameter Description Default valuechangedir Whether to change direction after branching 0α How far the perturbation method h

moves along the perturbed curve.p perturbation added by perturbation method p=2*(0.5-rand(size(p)))

And at last there are some unclassified parameters, found in table 3.5

Table 3.5. Other parameters.Parameter Description Default valuedirection Direction to follow solution path 1

n Problem sizeKmax # corrector steps before Broyden 10

calculates new Jacobianmaxiter corrector Maximum number of corrector iterations 40

maxiter pc Maximum number of predictor steps 400

We can note that Kmax=0 is the same as using the Newton method.

20

Chapter 4

Results

4.1 Hardware

The tests were done on a Sunblade 1500 with operating system Solaris 9. TheSunblade 1500 runs on 1062MHz clock rate and has 1024 MB of memory.

4.2 Test Problems

We we study two test problems, the Rotating Double Pendulum and one concerningSuperconductivity within a Slab.

4.2.1 Rotating Double Pendulum

This is the problem described in the introduction. The problem is to decide theposition of a pendulum in two parts being rotated around its axis. This means thereare four forces acting on the pendulum, each part has both gravity and centrifugalforces acting on them. The unknowns here are the angles of each arm and theparameter is the speed of the rotation. See figure 4.1. We have the relations

r1 =l1 sin(u1)r2 =l1 sin(u1) + l2 sin(u2)v1 =2πr1λv2 =2πr2λ.

Using these the equations for equilibrium are

0 =4π2λ2 cos(u2)(l1 sin(u1) + l2 sin(u2)) − g sin(u2)

0 =m1 sin(u1)(4π2λ2l1 cos(u1) − g)+m2 sin(u2 − u1)(g cos(u2) + 4π2λ2(l1 sin(u1) + l2 sin(u2)) sin(u2)).

21

❅❅

❅❅

❅❅��������������������❄

λ

l1u1

l2u2

m1v21

r1

m2v22

r2m1g

m2g

r1

r2

Figure 4.1. Problem layout.

Here λ is the speed of rotation, l1 and l2 are the length of arm one and tworespectively, m1 and m2 are the mass of the two arms and u1 and u2 are the anglesof the arms, these are the unknowns.

To run this problem we have made a few changes to the default values. We haveset hmax, the maximum stepsize, to 10−1, and since we only have the two angles asunknowns the problem size n is 2. This is then solved with the predictor correctormethod. The resulting figures are found in 4.2 and 4.3. These figures are createdfrom three executions of the predictor corrector scheme. First to obtain the curvewithout switching branch then once for each direction of the intersecting branchfrom the bifurcation point. As we can see there is very little difference between thetwo solutions. Table 4.1 shows some statistics about different settings.

22

0 0.2 0.4 0.6 0.8 1 1.2 1.4−1.5

−1

−0.5

0

0.5

1

1.5

λ

u 1

Pendulum problem bifurcation equation method

Figure 4.2. Bifurcation diagram.

0 0.2 0.4 0.6 0.8 1 1.2 1.4−1.5

−1

−0.5

0

0.5

1

1.5

λ

u 1

Pendulum problem perturbation method

Figure 4.3. Bifurcation diagram.

23

Table 4.1. Execution results for the Pendulum problem.Bifurcation Corrector # Pred. # Corr. # H # Jacobian Cpumethod method iter iter calls calls time

Bifurcation Newton 42 54 107 115 0.62sequation Broyden 42 70 123 84 0.71s

Perturbation Newton 49 75 123 134 0.71sBroyden 49 92 139 93 0.89s

None Newton 19 0 20 38 0.04sBroyden 19 0 20 38 0.04s

It can easily be seen that the trivial solution (0, 0, λ) is always a solution to theproblem. When this is the case the predictor will always hit the exact solution,which leads to no corrector steps needed. Since we start at (0, 0, 0) the executionthat doesn’t attempt to branch off will never need any corrector steps, and thereforethere are no differences between the Newton and the Broyden correctors.

4.2.2 Superconductivity within a Slab

The problem was found on online resource [5]. This problem models a supercon-ducting slab in a parallel magnetic field.

The equations are

θ′′ =θ(θ2 − 1 + λφ2)κ2

φ′′ =θ2φ

where κ and λ are constants, with λ being the bifurcation parameter. φ is thepotential of the magnetic field, and θ is an order parameter characterizing differentsuperconducting states. φ and θ are the unknown functions of the space variable x.We also have boundary values

θ′(0) = θ′(5) = 0φ′(0) = φ′(5) = 1.

To solve this we have descretized the space variable x in 50 points. We used stand-ard approximations of the derivatives, the first step is to turn it into a first orderdifferential equation by adding u = θ′ and v = φ′. Then we use the approximation

u′(x) − f(u(x)) ≈ u(x+ ε) − u(x− ε)2ε

− f(u(x+ ε)) + f(u(x− ε))2

.

This means we have a total problem size of 200. Also, for the figures we have usedhmax=0.1 in order to get a nice smooth curve. But since this leads to few correctoriterations, we have used the default hmax=1 for the calculation of table 4.2. Thiscreates the bifurcation diagrams seen in figures 4.4 and 4.5

24

0.4 0.5 0.6 0.7 0.8 0.9 1 1.1−4

−3.5

−3

−2.5

−2

−1.5

−1

−0.5

λ

φ(0)

Superconductivity problem with the bifurcation equation method

Figure 4.4. Bifurcation diagram.

0.4 0.5 0.6 0.7 0.8 0.9 1 1.1−4

−3.5

−3

−2.5

−2

−1.5

−1

−0.5

λ

φ(0)

Superconductivity problem with the perturbation method

Figure 4.5. Bifurcation diagram.

Once again there is no visible difference between the perturbation method andthe bifurcation equation method. Table 4.2 shows some statistics of the differentsettings.

25

Table 4.2. Execution results for the Pendulum problem hmax=1.Bifurcation Branching Corrector # Pred. # Corr. # H # Jac. CPUmethod direction method iter iter calls calls time

Bifurcation left Newton 19 52 84 72 3.02sequation Broyden 18 58 97 37 2.51s

Perturbation left Newton 33 64 96 94 3.63sBroyden 32 83 115 63 3.30s

Bifurcation right Newton 25 67 105 93 4.00sequation Broyden 24 82 127 49 3.42s

Perturbation right Newton 38 76 113 111 4.41sBroyden 38 101 138 73 4.05s

none Newton 27 57 88 87 3.21sBroyden 28 89 121 59 3.17s

Here the starting point is the lowest part of the curve, that is λ = 1 and φ(0) ≈−3.75. Left is the curve that branched of ending at λ = 0.5, right is the branchingcurve that ends at λ = 1 and φ(0) ≈ −2.5, which leaves the final curve, the onewithout branching which ends at λ = 1 and φ(0) ≈ −0.7.

26

Chapter 5

Conclusions

One method for locating a pitchfork bifurcation and two methods for finding eman-ating branches have been implemented and tested. The results indicate that bothmethods for switching branches are usable.

They both achieve the branching, however there are indications that the Bifurca-tion equation is more efficient. It should also be added that the bifurcation equationmethod finds both branches with only two executions of the program, whereas themethod based on perturbation uses a random element in the branching and mayfind the same branch again. I have also felt the need to fiddle with the parametersfor the Perturbation method in order for it to work, my feeling is that the settingof these are problem dependent, which makes it harder to use then the bifurcationequation method. The bifurcation equation method on the other hand uses a higherlevel of general bifurcation knowledge and is therefore a bit harder to implement.But it has the advantage of being easier to use, and it also appears to be a bit faster.It might be possible to tweak the perturbation method for each problem to get itto run faster, but most likely you would need test runs to find which parameters tochange to improve the execution time and still get it to do the branching.

The problems experienced when changing the algorithmic parameters are con-vergence problems for the corrector and there have also been cases when the per-turbation method does not complete the branching but instead find its way back tothe original curve.

The final conclusion would be that while both methods work, the bifurcationequation method would be preferable as it is easier to use and computationally lessexpensive.

27

References

[1] Eugene L Allgower and Kurt Georg. Numerical Continuation Methods, An In-troduction. Springer-Verlag, 1980.

[2] Claes Robertsson. Stepsize Adaptation and Turning Point Calculation for Con-tinuation Methods. Master’s thesis, Royal Institute of Technology, 2004.

[3] Walter Rudin. Principles of Mathematical Analysis. McGraw-Hill, 1976.

[4] Rüdiger Seydel. From Equilibrium to Chaos, Practical Bifurcation and StabilityAnalysis. Elsevier, 1988.

[5] World of Bifurcation. http://www.bifurcation.de/Examples.html, Lastviewed May 3, 2005.

28