In the inverse problem in electrocardiology, the goal is to recover electrophysiological activity in the heart without measuring directly on its surface i.e. without using catheter interventions. Today the inverse computation is frequently applied by solving some quasi-static models. These models don't take into account the heart dynamic in time and may result in considerable errors in the reconstruction
of the solution on the heart. In this paper, a 3D numerical inverse problem constrained by the bidomain equations in electrocardiology is investigated. The state equations representing a coupled reaction-diffusion system and modelling the propagation of the intracelullar and extracellular electrical potentials, and ionic currents are extended to further consider the effect of an external bathing medium. We demonstrate that reformulating the inverse problem as an optimal control problem where the control corresponds to the natural stimulation of the heart may improve the reconstruction of the epicardial and transmembrane potentials. This novel concept of applying electrophysiological data might be useful to improve noninvasive
reconstruction of electrical heart activity. Numerical experiments representing the effects of the heart dynamic, heterogeneities and noise on the inverse solutions are presented and the results discussed.