We describe a general method for modelling γ-ray burst (GRB) prompt emission, and determine the range of magnetic field strength, electron energy, Lorentz factor of the source and the distance of the source from the central explosion that is needed to account for the prompt γ-ray emission of a typical long-duration burst. We find that for the burst to be produced via the synchrotron process unphysical conditions are required – the distance of the source from the centre of the explosion (Rγ) must be larger than ∼1017 cm and the source Lorentz factor ≳103; for such a high Lorentz factor the deceleration radius (Rd) is less than Rγ even if the number density of particles in the surrounding medium is as small as ∼0.1 cm−3. The result, Rγ > Rd, is in contradiction with the early X-ray and optical afterglow data that show that γ-rays precede the afterglow flux that is produced by a decelerating forward shock. This problem for the synchrotron process applies to all long GRBs other than those that have the low-energy spectrum precisely ν−1/2. In order for the synchrotron process to be a viable mechanism for long bursts, the energy of electrons radiating in the γ-ray band needs to be continuously replenished by some acceleration mechanism during much of the observed spike in GRB light curve – this is not possible if GRB-prompt radiation is produced in shocks (at least the kind that has been usually considered for GRBs) where particles are accelerated at the shock front and not as they travel downstream and emit γ-rays, but might work in some different scenarios such as magnetic outflows.
The synchrotron-self-Compton (SSC) process fares much better. There is a large solution space for a typical GRB-prompt emission to be produced via the SSC process. The prompt optical emission accompanying the burst is found to be very bright (≲14 mag; for z∼ 2) in the SSC model, which exceeds the observed flux (or upper limit) for most GRBs. The prompt optical is predicted to be even brighter for the subclass of bursts that have the spectrum fν∝να with α∼ 1 below the peak of νfν. Surprisingly, there are no SSC solutions for bursts that have α∼ 1/3; these bursts might require continuous or repeated acceleration of electrons or some physics beyond the simplified, although generic, SSC model considered in this work. Continuous acceleration of electrons can also significantly reduce the optical flux that would otherwise accompany γ-rays in the SSC model.