The Reynolds analogy for the fluid flow past a flat plate at zero incidence is considered. For viscous incompressible fluid, we show that at any positive Eckert number, the Reynolds analogy as a function of the Prandtl number has a maximum. For a rarefied gas flow, we investigate the extended Reynolds analogy, i.e., the relation between the shear stress and the energy flux transferred to the plate using the direct simulation Monte Carlo method. We find that the extended Reynolds analogy for a supersonic monatomic rarefied gas flow with the temperature of the undisturbed gas equal to the surface temperature depends weakly on the Knudsen number, it is close to 0.5. We show that the extended Reynolds analogy for supersonic gas flow depends on the plate velocity and temperature and undisturbed gas temperature mainly via the Knudsen and Eckert numbers. We generalize the extended Reynolds analogy. The generalized Reynolds analogy depends on the Knudsen number much more than on the Eckert number.