Diffusion reverted - what was the temperature of Lake Traunsee?

In my recent post What is the temperature of LakeTraunsee, we started with a cold and a warm half of the lake

and calculated the lake temperature after while during which diffusion transported heat from the warm side to the cold one.

Now we ask: Can we mathematically revert this process? This means, we would measure the final temperature (with arbitrary precsion) and would like to know the (in our case) jumpy initial temperature.

To do some analysis, we observe that on the space-time domain (0,1) times (0,T)

builds a system of eigenfunctions for the heat equation

when Dirichlet boundary conditions u= 0 are to be satisfied. (In our case, the constant 20, which satisfies the heat equation just has to be added).
This means that if we can develop the initial condition into a Fourier sine series, then the solution can be calculated at any future time (always assuming that boundary conditions do not change. The "exp" in the eigenfunction damps high-frequent oscillations in the initial conditon.

With the same analysis, we could develop the final condition into a Fourier series. Reverting time means that the damping factor becomes an amplifying factor now. An error in the n-th Fourier coefficient is amplified by exp(n^2 pi ^2 t). We actually can observe this:

Backwards heat equation: 20 Fourier coefficients used.

 However, so called regularization techniques help to overcome these oscillatory results. With a regularized singular value decomposition and a regularization parameter of 0.001 (top) and of 0.1 (bottom) we obtain:

This reproduction is reasonable, albeit not perfect. The jumps in the intial condition are the reason for slow convergence (in the appropriate Sobolev space).

Chapter 15 of the Workout deals with inverse problems arising in computational finance.