We present simulations of the electrostatic solitary waves (ESW) as observed by GEOTAIL which have been identified as broadband electrostatic noise (BEN) in previous studies. We have found that ESW are generated as a result of the nonlinear coalescence of strong electrostatic waves excited by an electrostatic beam instability. This instability is driven by an electron beam drifting relative to the ions and other electrons drifting with the ions. As a necessary condition for generation of ESW, the ion thermal velocity must be large enough so as to prevent decay of the electrostatic waves to ion acoustic waves. Another condition is that the density of the electron beam drifting relative to the ions must be larger than 30% of the plasma density.