I want to solve the one-dimensional heat PDE backward in time ∂u/∂t = -∇2u = -∂2u/∂x2 , x element of [0,L] Basically, I want to find what the initial temperature profile u(x,t=0) should be such that after some time t1 of diffusion, I am left with the bar at a uniform temperature u(x,t1)=c for c>0 and boundary conditions are convective, i.e. ∂u(L,t)/∂x = -h*u(L,t) I am having trouble doing this numerically using finite difference in MATLAB, and I realize this is an ill-posed problem. But it seems to be pretty simple so it should be possible. Is there some trick to solving this, or would I have to resort to a brute-force method of guess/check? I'd appreciate some insight. Thanks!