Abstract : We are interested in studying a heat transfer problem which modeling a welding process. The approach that we consider deals only with the solid part of the plate. It consists in solving a free boundary problem. For this, we propose a shape optimization formulation. The state problem governed by an operator which for some data is not coercif. This complicates the study of the continuity of the state problem. We overcome this difficulty using the topological degree of Leray-Schauder and we show the existence of an optimal domain. Next, we consider a discretization of this problem based on linear finite elements. We prove that the approximate problem is solvable and we show that a subsequence of the solution of this approximate problem converges to the solution of the continuous problem. Finally, we present numerical results achieved by two methods : the deterministic method based on the gradient-likes method and genetic algorithms combined with fuzzy logic and parallel computing. A comparative study of two methods for qualitative and quantitative levels was presented.