Solution of the Heat Equation

Heat equation is solved for the case of a metallic onedimensional bar in which initially a sinusoidal distribution of temperature is set along the bar.

In tones of red are the zones of positive temperature and in blue negative temperatures (centigrade scale). The bar ends are put at initial time at zero degrees and kept at zero temperature; the bar begins to change its temperature and the curve shows the temperature as one part cools and the other heats.