Here we are interested in identifying the flux in a system of conserva
tion laws. This problem is ill-posed, but we can deal with the indeter
mination by using an a priori problem as a constrained minimization of
a cost function J. A Lagrangian formulation leads us to a formal comp
utation of that gradient of J. We then perform an exact computation of
the gradient of the discrete cost function. Finally, we give a few nu
merical results obtained through a conjugate gradient method.