The wavefield is often reconstructed through solving a wave equation corresponding to an active source and using our best available medium parameters to reproduce the data. Alternatively, if the medium parameters are unknown, the wavefield can be inverted, along with the velocity model, in an extended optimization problem. In this case, the process requires a matrix inversion at practically every iteration. Alternatively, we formulate a bilinear optimization problem with respect to the wavefield and a modified source function, as independent variables. We specifically recast the wave equation so that velocity perturbations are included in this modified source function (that includes secondary sources), and thus, it represents the velocity perturbations implicitly. The optimization includes a measure of the wavefield's fit to the data at sensor locations and the wavefield, as well as the modified source function, compliance with a wave equation corresponding to the background model. One of the features of this background model wave equation is that it provides opportunities for efficient solutions, and it extends the source to accommodate perturbations missing in the background medium. Meanwhile, the velocity perturbations can be extracted in a separate step via direct division. We demonstrate these features on a simple two-anomalies model.