Archive for Ordinary Differential Equations

Quarter-Term – Testing Time

Posted in Education, mathematics, Maynooth with tags , , , on October 13, 2025 by telescoper

I’ve just noticed that three teaching weeks have passed and we’re already into the fourth. Tempus fugit. Both the modules I am lecturing this semester are divided into four chunks of approximately equal size. For example, MP469 Differential Equations and Complex Analysis splits into: Ordinary Differential Equations; Partial Differential Equations; Complex Functions and Derivatives; and Complex Integration. Though technically not on the syllabus, I also do couple of lectures on Conformal Mappings because I think they’re cool.

As I mentioned a while ago,  I am concerned about the integrity of the coursework element of these modules in the light of improvements in Generative AI. Only a couple of years ago GenAI could not solve the sort of problems I set for homework, but now it generally can. I don’t altogether object to people applying artificial intelligence to solve mathematical problems, but the main issue is that it does make mistakes. Moreover, instead of saying “sorry I can’t solve that problem” it will generally present a superficially plausible but incorrect solution. Although students will probably use GenAI for problem-solving, I think it is important that they learn to do such problems themselves, otherwise they won’t know whether the solution coughed up by the algorithm is correct or not.

The only way to learn mathematics is by doing it. If students get GenAI to do the mathematics for them, then they won’t learn it. In the past we have given marks for coursework (usually 20% of the module mark) mainly to encourage students to do them. Students who don’t bother to do these exercises generally do badly in the final exam (80%).

For these reasons I am moving the assessment from weekly homework sheets – which could be tackled with AI – to supervised in-class tests for which students can use notes on paper, but not laptops or phones. I will of course give examples for the students to have a go at themselves, and I will give feedback on their attempts, but they will not contribute to the module score. Another advantage of this approach is that students won’t have to do so much work against deadlines outside of class.

What I’ve decided to do is have one class test for each of the four sections of each module. Given that we’re about a quarter of the way through the term, it’s time for the first ones. This week there will be a class test on Ordinary Differential Equations. I’ve never been enthusiastic about examinations being speed tests, so I’ve decided to set problems to be done in a 50-minute session which would be expected to take about 30 minutes in a formal end-of-term examination.

I have to make a short work-related trip that will keep me away on Wednesday, but I’ve already written the test questions, and will make arrangements for someone to supervise the tests if for some reason I don’t make it back to Maynooth on time…

Anyway, although we’ve been teaching for three weeks I still have to check my calendar to remember which room I’m supposed to go to before every lecture. Perhaps by Christmas I will have learned them off by heart…

Sturm und Liouville

Posted in Biographical, Education, mathematics with tags , , , , , on October 4, 2024 by telescoper

It’s Friday afternoon at the end of Week 2 here at Maynooth so I’ve now completed the 4th lecture of my 4th-year module Differential Equations and Complex Analysis. We’ve now in the section of Sturm-Liouville Theory. I’ve never taught this module before and, as always, teaching a new thing reminds me of all the things I had forgotten since I was a student. In this particular case, I still have the notes I took when I was studying this topic as an undergraduate. It’s scary to think the notes shown above were written by me 40 years ago!

Anyway, as I like to know something about the people behind the names, Sturm-Liouville Theory is named after Jacques Charles François Sturm (1803–1855)* and Joseph Liouville (1809–1882). Contrary to what I’d always assumed, Sturm was not German but was born in Geneva, which is now in Switzerland but which had been annexed by revolutionary France in 1798 so technically speaking he was born in France. Liouville was born in Saint-Omer, near Calais, which to my knowledge has never been part of Switzerland but has been part of the Spanish Netherlands.

*Given the dates, Sturm must have collaborated with Liouville after his earlier work with Drang

Project Work

Posted in Biographical, Education, mathematics with tags , , , , , on April 23, 2018 by telescoper

I’m progressively clearing out stuff from my office prior to the big move to Ireland. This lunchtime I opened one old box file and found my undergraduate project. This was quite an unusual thing at the time as I did Theoretical Physics in Part II (my final year) of Natural Sciences at Cambridge, which normally meant no project but an extra examination paper called Paper 5. As a member of a small minority of Theoretical Physics students who wanted to do theory projects, I was allowed to submit this in place of half of Paper 5…

The problem was to write a computer program that could solve the equations describing the action of a laser, starting with the case of a single-mode laser as shown in the diagram below that I constructed using a sophisticated computer graphics package:

The above system is described by a set of six simultaneous first-order ordinary differential equations, which are of relatively simple form to look at but not so easy to solve numerically because the equations are stiff (i.e. they involve exponential decays or growths with very different time constants). I got around this by using a technique called Gear’s method. There wasn’t an internet in those days so I had to find out about the numerical approach by trawling through books in the library.

The code I wrote – in Fortran 77 – was run on a mainframe, and the terminal had no graphics capability so I had to check the results as a list of numbers before sending the results to a printer and wait for the output to be delivered some time later. Anyway, I got the code to work and ended up with a good mark that helped me get a place to do a PhD.

The sobering thought, though, is that I reckon a decent undergraduate physics student nowadays could probably do all the work I did for my project in a few hours using Python….

Fun with the Airy Equation

Posted in Education, mathematics with tags , , , , , , on April 12, 2018 by telescoper

Today being a Maynooth Thursday, it has, as usual, has been dominated by computational physics teaching. We’re currently doing methods for solving ordinary differential equations. At the last minute before this afternoon’s lab session I decided to include an exercise that involved solving the following harmless-looking equation: y'' = xy.

This is usually known as Airy’s equation and it comes up quite frequently in problems connected with optics. It was first investigated by a former Astronomer Royal George Airy, after whom the function is named; incidentally, he was born in Alnwick (Northumberland, i.e. not the Midlands).

Despite its apparent simplicity, the Airy equation describes some very interesting phenomena. Indeed it is the simplest ODE (that I know of) that has the property that there’s a point at which the behaviour of the solution turns from oscillatory to exponential. Here’s a result of a numerical integration of the equation: obtained using a simple Python script:

(I stopped the integration at x=5 as the magnitude of the solution grows very quickly beyond that value for the particular initial conditions chosen).

One of the reasons for including this example (apart from the fact that Airy was a Geordie) is that the students were so surprised by the behaviour of the solution and most of them assumed that there was some problem with the numerical stability of their results. Some integration methods do struggle with such simple equations as the simple harmonic oscillator, but just sometimes weird numerical results are not mere numerical artifacts!

Anyway, my point is not about this particular equation or even about computational physics, but a general pedagogical one: finding interesting results for yourself is much more likely to motivate you to think about what they mean than if they’re just described to you by someone else. I think that goes for numerical experiments in a computer lab just as much as it does for any other kind of practical experiment in a science laboratory.