Can someone explain why current Iout in Fig 5.23b is simply gm1Vin/2? What about the current from M2?
I have annotated what I think in the figure.
Can someone explain why current Iout in Fig 5.23b is simply gm1Vin/2? What about the current from M2?
I have annotated what I think in the figure.
Your annotations correctly show the small-signal current magnitude of \$g_mv_{in}/2\$ on each branch of the differential pair, but I think you have an opposite assumption for sign - the text appears to assume that the input to M2 swings up (\$v_{in}/2\$ over AC ground) while the input to M1 swings low by the same magnitude below AC ground.
Then, M4 is a constant current source (seeing as it is the output side of a current mirror biased by a constant current) meaning it contributes essentially zero small-signal current; by KCL this means that the output current must also be \$g_mv_{in}/2\$.
You may be confusing this structure with this one, which mirrors the current from one branch into the other:

Schematic and annotations are my own work reproduced from this answer of mine
which does have a system transimpedance of \$g_m\$ rather than \$g_m/2\$.