In recent years mathematical approaches to optimal semiconductor design gained considerable attention in the engineering as well as in the mathematics community. In this talk we present classical and modern analytical and numerial tools for the solution of these design problems. A typical design question is the optimization of doping profiles to gain a higher on-state current. For the construction of numerical algorithms one derives the first and second order optimality conditions. Using the adjoint variables one can elegantly compute gradients and Hessians for the minimization problem. Especially, the interconnection of the continuous and discrete adjoints is of interest and we will present an adjoint discretization for the drift diffuson...