<p style='text-indent:20px;'>The aim of this work is to reconstruct the depletion region in pn junction. Starting with famous drift diffusion model, we establish the simplified equation for the considered semiconductor. There we call the shape optimization technique to formulate a minimization problem from the inverse problem at hand. The existence of an optimal solution of the optimization problem is proved. The proposed numerical algorithm is a combined Domain Decomposition method with an efficient hybrid conjugate gradient guided by differential evolution heuristic algorithm, the finite element method is used to discretize the state equation. At the end we establish several numerical examples, to prove the validity of theoretical results using the proposed algorithm, in addition we show some simulation of the depletion region approximation under two different functioning modes.</p>