It's time for a more involved example that illustrates the use of` for`

loops and lists in numerical computing. The analytical solution to a partial differential equation often includes a summation of an infinite series. In this example, we are going to write a short program that computes a solution to the diffusion equation in one dimension on a finite interval of length l. The diffusion equation is defined by:

The diffusion equation can be used to model physical problems such as the diffusion of heat in a solid, or the diffusion of molecules through a gas or liquid. The value of v(x,t) ...

Start Free Trial

No credit card required