Bifurcation Diagram Plotter (Version 1.0)

By Junping Shi

 

Introduction

 
Function Graph
The left-hand-side Graph is the graph of function f(u). The horizontal coordinate is the x-axis,  the vertical coordinate is the y-coordinate. 

Parameters: 

Function:
The formula of the function, only valid format is allowed.
Number of points:
The number of points to be plotted on the graph, and it is evenly distributed according to the value of x. 
Minimum x value:
The minimum x value to be plotted.
Maximum x value:
The maximum x value to be plotted.
Plot button:
Click to repaint the function graph, if your other parameters have been  changed since last painting.
Bifurcation Diagram 
The right-half-side Graph is the bifurcation diagram of equation (1) with function f(u) plotted in Function Graph. The horizontal coordinate is the value of  \lambda, and the vertical coordinate is the value of y=u(0).  

Parameters: 

Dimension N: 
The space dimension in the equation. Usually positive integer, but technically any real number.
Number of points:
The number of points to be plotted on the graph, and it is evenly distributed according to the value of y=u(0). 
Numerical mesh length:
A parameter determining the accuracy of the diagram, see detail. It is suggested not to change this value for fast response of the applet. 
Initial point (x_0):
We actrually start shooting method from x=x_0, not zero, due to the sigularity of (1) at x=0. But this number should be very close to 0 for better result.
Plot button:
Click to repaint the function graph, if your other parameters have been  changed since last painting.
 
Tips for better results :

Background Knowledge of this Java Applet

         This is a Java applet which plots the bifurcation diagram of following equation:
(1)
                     u''+(n-1)/r *u'+\lambda f(u)=0,    in (0,1)
                     u'(0)=0, u(1)=0,

where \lambda is a positive parameter. This boundary value problem is reduced from a semilinear elliptic equation:

(2)
           \Delta u+\lambda f(u)=0,    in \Omega,
            u=0,                                  on \partial \Omega,

where \Omega is  the unit ball in Rn  .  By a remarkable paper by Gidas, Ni and Nirenberg [GNN], the solution of equation (2)
is always radially symmetric, if f(u) is local lipshitz in R+  . Thus the solution to (2) satisfies equation (1).

     An important property of equation (1) is that, for any d>0, there is at most one \lambda(d)>0 such that (1)
has a positive solution u with \lambda =\lambda(d)  and  u(0)=d.
 Let

       T={d>0 :  (1) has a positive solution with  u(0)=d },

then T is an open subset of  R+; \lambda(d)  is a well-defined continuous function from T  to  R+ .    
We call  R+ x R+ ={ (\lambda, d) |  \lambda >0, d>0 }  the  phase space,
{(\lambda (d), d): (1) has a solution with u(0)=d, \lambda=\lambda (d)} the bifurcation curve,
and the phase space with bifurcation curve the  bifurcation diagram.
 


 Mathematical Theory from plotting

     The study of equation (1) is a very interesting mathematical problem. An ultimate goal is to classify all solutions for all \lambda>0, for all reasonable and useful f(u). So one of most important problem is to determine the exact multiplicity of the solutions for all \lambda>0. Many works has been done, see Ouyang and Shi's papers :

Exact Multiplicity of positive solutions of a class of semilinear problems

Exact Multiplicity of positive solutions of a class of semilinear problems: II

and the many references therein. But all these rigorous results are still very restrictive. For example, the curve with multiple turning points is verturally unsolvable for most case. So numerical calculation is a good way to get dependable information for some problems which you can never solve. Following are some suggestions for your numerical experiments:
 

  • f(u)=-u*(u-b)*(u-c), for 0<2*b<c. This is an example which has been completely solved by Ouyang and Shi for any n>0, the bifurcation curve is an opening-right parabola-like curve. But we still find that, for n large, say greater than 3, the both ends of the curves are suprisingly close to c. In fact, if you try n=3, b=1, c=3, and still 100 points to plot, you will find an error: NO POINTS TO PLOT! Change 100 to 200, you will only see 3 points plotted, because (1) has no solution for any y<2.94 ! But with 1000 points plotted, you will still see an ugly parabola......Do't try n=10 ever!
  • f(u)=exp(u), and n=3. This is a famous example which has infinite many turning points, but if you only set Maximum value of x small like 2 or 3, you will not see many turnings. In fact, the first turning is at about 1.6. Set x be 10, then you can see the first two turning points. But you try something bigger than 10, the algrithm may fail because of overflowing, you are beyond the ability of your computer! Another reason is you have an exponential function, try something not grow that fast, like the next one......
  •  f(u)=u+sin(3*u). Here is an example you will definitely see many turning points. At x=7, you can see about 5 turning points. If you are good observer, you can find the graph of f(u) also makes 5 or 6 turnings. Congradulation ! You have make a great conjecture. If you interest in this conjecture, see here for more serious thought. At x=20, you can see maybe more turnings, but the bifurcation diagram looks like a slice of smoke out of a chimney in an almost windless day. Congradulation again ! You have just discovered a behavior called "bifurcation from infinity". There are some theoriotical works for this kind of f(u), use your Math Review to check the papers of Klaus Schmitt and Renart Schaaf. They acturally proved there are infinite many turning points in this situation.
  •  Not enough with these math, we have more serious math and more examples in here. Check it out !

    Numerical Algorithm

       Our numerical algorithm which produces above graph is still very rough. But it is very natural and simple. We introduce it briefly here.
    Instead of considering (1), we acturally solve an initial value problem:

    (3)
                         u''+(n-1)/r *u'+f(u)=0,    r > 0
                         u'(0)=0, u(0)=u_0.

    Notice that the new equation does not contain parameter \lambda. We use Runge-Kutta method to solve equation (3), we can get the values  of u(r), u'(r) at each point r(k)=k*h+u_0, where k is a positive integer, h is the number which you input as "Numerical mesh" and u_0 is the initial height, aslong as u(r)>0.

       The shooting method is simple: if for some k>0, u(r(k))>0 and u(r(k+1))<0, then we stop shooting, and return the value R=r(k). Then we rescale the equation (3), let \lambda(u_0)=R*R, then we get a solution of (1). The pair (\lambda(u_0), u_0) is a point which we will actrually plot on the Bifurcation Diagram.

       At this point, I have not discussed the convergence of this algorithm. It seems to be OK for most cases, even with not too small mesh size and not too many plotting points. But obviously, it fails when the value of u_0 is getting too large. I believe that there is a converge range of x_0, with given maximum error, mesh-size and initial point x_0. I hope I can theoriotically prove it later.

        If you want fast response of the applet, then you must have a trade-off between the computation-time and the accuracy of the diagram. For a better data set of (\lambda, u), we also implement the above algorithm in C++, which will result in a file containing the data set. With this program, we can take a longer time to get better result: for example, you can set the mesh size to be 0.0001 or even 0.00001, and computing with u_0 increasing each 0.01 or less. For u_0 from 0 to 20, this may take 10 minutes or so in a PC. The good part of the C++ program is


     Java Applet programming

    This applet is based on a Java graph-plotting package made by Leigh Brookshaw.  His graphing package is avalable at
     http://www.sci.usq.edu.au/staff/leighb/graph/classes/ . All the source provided is covered by the GNU General Public Licence.
    My source code of the bifurcation diagram is as follows:

     BifurGraph.java      Equation.java       Apoint.java

    and the programs provided by  Leigh Brookshaw are

    parse1d.java     and the  graph package .


     This document was first writen by Junping Shi in Feb. 13th, 1998.