# Teaching a differential equations course to computer science majors

I am currently teaching an undergraduate course on elementary differential equations in a mixed class of natural science (physics, chemistry, biology, etc) and computer science majors. Since none of the students are mathematics majors, I wanted to tailorfit the course by providing a good balance between theory and applications. In the case of physics, chemistry and biology, the applications are readily available in most differential equations texts. Unfortunately, computer science majors seem to be left out, and when I was asked by students on the use of the course in their field, I was unable to provide a satisfactory answer.

I did some search on Google, with a hunch on the existence of applications in the study of algorithms and machine learning. I quickly realized that I am entering unfamiliar territory since I have very little background on computer science myself. I found several research papers but no satisfactory text that uses the undergraduate level concepts directly, compared to, say, applications in physics such as spring vibration and escape velocity that directly use and illuminate the concepts.

I think my question is already obvious without stating, but are there any applications of elementary differential equations to computer science that I can use in an undergraduate class? The applications I'm looking for should satisfy the following:

1. Use linear, preferably first or second order ODEs.
2. Do not require a lot of background to explain.
3. Appropriate for inclusion in a written exam.
• I've seen a dampened spring equation used for coding a nice looking animation, but that may not make for a good exam question, and was also solved numerically. If you haven't done so already, you may want to read what Rota has to say and the discussion of textbooks it spurred on MO. – Mark S. Sep 26 '18 at 11:01
• There are a lot of applications in image processing which are related to differential equations. One I came across recently which is interesting is the method of diffusion curves for storing a vector image. In short, store the edges of an image, along with colour information on each side of the edge, then solve the Laplace equation $\Delta u = 0$ on each colour channel to colour in between the edges. This is really not very appropriate for inclusion into a course though. – Joppy Sep 26 '18 at 12:37
• The analysis of generating functions, which have applications in the analysis of algorithms, sometimes requires the solution of a differential equation. But I think this fails your second critereon, "Does not require a lot of background to explain.." – awkward Sep 26 '18 at 12:43