A thermal analysis in laser welding using inverse problems