John Travis
Mississippi College
This worksheet deals with simple autonomous differential equations of the form $y' = f(y)$. In sage, one can obtain an entire slope field using built-in functions but this page is focused on creating the "phase line" for autonomous DEs. The user is allowed to utlize one parameter ($C$ is reserved for that use), determine which value(s) for $C$ may yield possible bifurcations and exhibit these possible bifurcations visually.
Finally, a complete bifurcation diagram is created showing the nature of solutions for varying values of the parameter.
First, one will need to enter the differential equation by specifying $f(y)$ below. To see a different result throughout this worksheet, one should change $f(y)$ here.
|
-C*y^3 + C*y -C*y^3 + C*y |
Equilibria occur when a solution $y(t)$ for the DE remains constant. If so, then
$y'=0$ and hence $f(y) = 0$.
Since once can determine whether an equilibrium is a sink or source using the sign of $f _y(y)$, the nature of the collection of equilibria will only change (under reasonable assumptions) when $f _y(y)$ is also zero.
System of Equations to solve for C is Possible Bifurcations may occur at the following parameter values: 0 System of Equations to solve for C is Possible Bifurcations may occur at the following parameter values: 0 |
Since the DE is autonomous, we can determine the qualitative nature of all solutions by plotting the "phase line". Experiment with various values of the parameter and look for dramatic changes as you pass through the possible bifurcation values indicated above.
Click to the left again to hide and once more to show the dynamic interactive window |
The complete bifurcation diagram is given below. This could use a bit of work to make it look prettier automatically when you have widely varying equilibria for various $C$ values. Oh well, the secret is to only assign problems that look good in what has been written! :)
Traceback (click to the left of this block for traceback) ... cypari2.handle_error.PariError: zero polynomial in roots Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_70.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("QmlmZl9kaWFncmFtID0gR3JhcGhpY3MoKQpmb3IgY3ZhbCBpbiBDX3B0czoKICAgIEJpZmZfZGlhZ3JhbSArPSBwaGFzZV9saW5lKGN2YWwpCiMgIEEgY29udG91ciBwbG90fCBjYW4gcXVpY2tseSBnaXZlIHRoZSBnZW5lcmFsIHJlZ2lvbnMgZm9yIGluY3JlYXNpbmcvZGVjcmVhc2luZwojICBDb21tZW50IG91dCB0aGUgbmV4dCBzdGF0ZW1lbnQgaWYgeW91IG9ubHkgd2FudCB0aGUgY29sbGVjdGlvbiBvZiBkZXRhaWxlZCBwaGFzZSBsaW5lcy4gIApzaG93KEJpZmZfZGlhZ3JhbSxheGVzPUZhbHNlKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmp0FmzuE/___code___.py", line 4, in <module> Biff_diagram += phase_line(cval) File "/tmp/tmpv6usl3/___code___.py", line 44, in phase_line eq_pts = f(y,C).roots(ring=RR, multiplicities=False) File "sage/symbolic/expression.pyx", line 11468, in sage.symbolic.expression.Expression.roots (build/cythonized/sage/symbolic/expression.cpp:58525) File "sage/rings/polynomial/polynomial_element.pyx", line 7660, in sage.rings.polynomial.polynomial_element.Polynomial.roots (build/cythonized/sage/rings/polynomial/polynomial_element.c:60330) File "cypari2/gen.pyx", line 4118, in cypari2.gen.Gen.polroots File "cypari2/handle_error.pyx", line 213, in cypari2.handle_error._pari_err_handle cypari2.handle_error.PariError: zero polynomial in roots |
or with the regions smoothly drawn...
Traceback (click to the left of this block for traceback) ... cypari2.handle_error.PariError: zero polynomial in roots Traceback (most recent call last): show(Biff_diagram+Biff_background,axes=False,figsize=(6,20)) File "", line 1, in <module> File "/tmp/tmpa0LKKr/___code___.py", line 5, in <module> Biff_diagram += phase_line(cval) File "/tmp/tmpv6usl3/___code___.py", line 44, in phase_line eq_pts = f(y,C).roots(ring=RR, multiplicities=False) File "sage/symbolic/expression.pyx", line 11468, in sage.symbolic.expression.Expression.roots (build/cythonized/sage/symbolic/expression.cpp:58525) File "sage/rings/polynomial/polynomial_element.pyx", line 7660, in sage.rings.polynomial.polynomial_element.Polynomial.roots (build/cythonized/sage/rings/polynomial/polynomial_element.c:60330) File "cypari2/gen.pyx", line 4118, in cypari2.gen.Gen.polroots File "cypari2/handle_error.pyx", line 213, in cypari2.handle_error._pari_err_handle cypari2.handle_error.PariError: zero polynomial in roots |
|
|