It’s been a really long time since the last post; well, in all fairness, I’ve been busy with my ITSP - an autonomous foosball foosball table. It sounds really impressive, but our team could not accomplish much. We were only able to get our goalie running.
Anyways, I’ve been studying some numerical techniques to solve differential equations in the meantime. There’s this nice course on Coursera on Scientific Computing (they’ve removed it recently after they shifted to the new platform), which gives an introduction to the basics of the numerical/computational approach to various problems. The course especially includes the numerical treatment of differential equations of diverse systems. The material is really interesting for a beginner like myself. In this post I’m going to talk about a really cool problem I learned to solve.
One of the most famous partial differential equations is the diffusion equation, or the heat equation. What it basically looks like (ignoring the coefficients and other trivial constants), in its two dimensional form, is this:
Here and represent the time and spatial co-ordinates respectively while u represents temperature (in context of the heat equation). Thus this partial differential equation conveys information about the transfer of heat over space and time. Solving this analytically is probably not that trivial. So, we try to attack the problem from a numerical perspective, which brings us to the finite differences method. We chop up the domain into a fixed number of grid points, and basically use the first principle of derivatives, albeit without the . The final product is really a visual treat.
It’s obtained from a piece of code I wrote on MATLAB, though the idea behind it is taken from the course material. What’s astonishing is how beautifully clear the partial differential equation becomes once the solution is visualised in such a manner. MATLAB is just awesome! That’s all I have to say.
P.S.: It’s a gif, and in case it’s not working for you, check it out here