Various analytical solutions for computing production and injection-induced pressure changes in aquifers and oil reservoirs have been derived over the past century. All prior solutions assumed a constant well rate as the boundary condition. However, in many practical situations, the fluid withdrawal from and/or injection into such subsurface reservoirs occurs with the aid of pump devices that maintain a constant bottomhole pressure in the well. Until now, how the well rate will decline over time, based on the pressure difference in the well relative to the initial reservoir pressure, could not be rapidly computed analytically (using the diffusivity as the key governing system parameter), because no concise expression had been derived with the boundary condition of a constant bottomhole pressure. The present study shows how the pressure diffusion equation can be readily solved for wells acting as sinks and sources with a constant bottomhole pressure condition. We consider both fractured and unfractured completions, as well as injection and production modes. The new solutions do not require an elaborate time-stepped pressure-matching procedure as in nodal analysis, the only other physics-based analytical method currently available to compute the well rate decline when a constant bottomhole pressure production system is used, which unlike our new method proposed here is limited to single well systems.