JavaScript

Solving the Schrödinger Equation with Numerov's Algorithm
Jul 10, 2013

3 min read
The Schrödinger equation describes the energy and timeevolution of a particle or system of particles, and is one of the fundamental building blocks of modern physics. In it’s general form, the (timeindependent) Schrödinger equation for a onedimensional harmonic oscillator reads thus:^{1}
\begin{equation} \label{eq:sch} \frac{\hbar^2}{2m} \frac{\partial^2}{\partial z^2}\psi(z) + \frac{mz^2}{2} \psi(z) = E\psi(z) \end{equation}
There are relatively few situations in which the Schrödinger equation can be solved analytically, and numerical methods and approximations are one way around that analytical limitation. To demonstrate how this is possible and how a numerical solution works, what better way than to solve a system which can be solved analytically and comparing the results.

Fourth Order Runge Kutta Algorithm in Javascript With Demo
May 2, 2013

3 min read
The general RungeKutta algorithm is one of a few algorithms for solving first order ordinary differential equations. Below is a specific implementation for solving equations of motion and other second order ordinary differential equations (ODEs) for Physics simulations, amongst other things.

Physics Bungee Rope Cursor Trailer
Apr 13, 2013

1 min read
I’m getting ready for starting a course in computational physics, and so, ignoring the fact I’m meant to be revising for an exam this Monday, I thought I’d prepare for the more exciting of the two. I’ve always wanted to code this little physics model ever since I saw it on one of those JavaScript snippet websites back when dialup was fast and people downloaded mp3s one at a time. Those were the days.