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

Honours Differential Equations 2022-2023

Project Assignment

Due: Friday 2nd December 2022, noon

• Please download the template .ipynb notebook from Learn and complete it with your work. The completed notebook should be uploaded via gradescope, along with a PDF version and .py version (as with previous Lab Assignment submissions).

• I would suggest using noteable to complete your assignment.

• Your notebook should contain a mixture of code and explanatory text, like the lab notebooks. You can use code from the labs and previous assignments without citation, but you need to include the code within your notebook so that it is self-contained.

• It is important that you think about good academic practice when you construct your answers. The work you submit must reflect your own understanding, in line with the School’s policy on academic misconduct: https://edin .ac/2LtVQMw

• You should include enough explanatory text to answer each question clearly. Markers will be considering the overall style and presentation of your document, so do please make it as presentable and easy to read as you can.

• When you are ready to submit, please do the following:

1. In Jupyter Notebook, click the menu item: “Kernel > Restart & Run All” . This will check that your code runs properly from scratch, and does not rely on intermediate calculations that you’ve since deleted. If the output is not what you expected, then you’ve got a chance to fix it before submitting!

2. Click File > Download as > Notebook (.ipynb)” and save the file in your docu- ments folder.

3. Click File > Download as > Python (.py)” and save the file in your documents folder.

4. Click File > Download as > PDF via LaTeX (.pdf)” and save that file in your documents folder too. If this does not work, then click File > print preview”, this will open a new tab. You can then print this page to a pdf.

5. On gradescope, upload your .ipynb, .py and .pdf files.

Grading

Each of the 4 questions will each be given a mark out of 5, which is aligned with the University Common Mark Scale:

0    Very little to give credit for

1    Some creditworthy work but not of degree standard

2    Marginally achieves the standard expected for an honours degree

3    Marginally achieves the standard expected for a 2(i) degree

4    Of clear “first class” quality

5    Of strong “first class” quality

The following are examples of how this might be interpreted:

0    Very little to give credit for

1    Some functioning code, but not all code runs without errors. Little/no analysis.

2    Code functions without errors, but there are significant gaps in the calculations/analysis

3    Calculations and analysis are mostly completed correctly, perhaps with some minor errors

4    A full and complete answer

5    A model answer, excellently presented and communicated

1.  The following system describes a weakly-nonlinear oscillator, where a is a parameter of the system which we can choose to vary, and x(t) and y(t) are real functions of t:

dx dt dy dt

=   y,

=   x + a (y ) .

(a) The only critical point is the origin. Use SymPy to find the eigenvalues/vectors of the system linearised about the origin. Describe how the behaviour of the critical point changes (e.g. node, centre etc.) as the value of a varies.

(b) Draw the phase portrait first for a = 0.1, then for a = 0.1. In each case overlay

2.  Certain types of chemical reaction can be modelled by the system of equations:

dx dt dy dt

=   a bx + x2y,

=   bx x2y,

where a and b are parameters of the system which we can choose to vary, and x, y denote different chemical concentrations.

(a) Use SymPy to find the one critical point of the system, linearise the system about its critical point and find an expression for the eigenvalues and eigenvectors of the linearised system in terms of the parameters a and b.

(b) Now fix the parameter a = 1. Use NumPy to plot the phase portrait of the system on the domain 0 ≤ x ≤ 5 and 0 ≤ y ≤ 5, first for the case b = 0.5, then for b = 3. In each case overlay the trajectories having initial condition (x(0), y(0)) = (0, 0) and (x(0), y(0)) = (2, 3). Describe the difference in behaviour shown in the two plots.

(c) Clearly when a = 1 the behaviour for small b and large b is quite different.  In fact a bifurcation occurs as the value of b is increased. Experiment with different values of b and produce two plots illustrating the bifurcation (one with b below the critical value, and one with b above it). Can you identify anything important that happens to the eigenvalues obtained in part (a) for these values of a and b?

(d) In (b) you should have found some behaviour which appears to be periodic. For this trajectory, plot x(t) and y(t) as functions of t, to more clearly demonstrate this periodic behaviour. (Show these as two subplots on the same figure.)

3.  This problem concerns the modified Euler formula, as described in problems 22-26 in section 8.2 of Boyce & DiPrima.

(a) Write a function ModifiedEuler which implements the modified Euler formula.

This should take the same arguments as the Euler function from Lab 2, which you may wish to use as a starting point.

(b) Use your ModifiedEuler function to find approximate values of the solution to the

initial value problem y\ = 5t −2^y, y(0) = 2, with h = 0.05, as in problem 23 from

(c) Use SymPy to find the exact solution of the IVP.

(d) Using these results, produce a table like the following (showing the values of the solutions when t = 0.1, 0.2, 0.3, 0.4, 0.5, 1.0), and also a plot of the three solutions over the range 0 ≤ t ≤ 1.

Euler, h=0.05   Modified Euler, h=0.05        Exact

0.0

2.000000

2.000000

2.000000

0.1

1.734749

1.751741

1.751547

0.2

1.537944

1.569657

1.569274

.

.

.

.

.(.)

4.  Consider the following system of three equations, which is a particular instance of the

Rssler system:

dx dt dy dt dz dt

=   z,

=   x + y,

=    + (x )z.


(a) Produce a plot of the trajectory in 3d phase space (x, y, z) with initial condition (x(0), y(0), z(0)) = (0, 0, 0) (some cursory research on the Rssler system will sug- gest what this should look like!).

(b) Show that the solution appears to become periodic (in a similar way to Q2(d)). Produce a 2d plot of the limit cycle, by plotting the coordinates (x(t), y(t)) as t varies (to get a clear plot, you should ignore small values of t, when the periodic behaviour has not yet established).

(c) What happens when you replace the coefficient  appearing in the third equation with 3?