# Calculating gain, input and output resistances of a current amplifier circuit

In the circuit below, I want to calculate the gain, $$\frac{I_{out}}{I_{in}}$$

as well as the input and output resistances. I wrote the node equations for the two nodes:

$$V_x (g_{ds}+G_D)-V_{gs}g_{ds}=-gV_{gs}$$ $$V_{gs}g_{ds}-V_x g_{ds}=gV_{gs}+I_{in}$$

The first one show that the two node voltages are proportional,

$$V_x = V_{gs} \left( \frac{g_{ds}-g}{g_{ds}+G_D} \right)$$

and the second one allows me to solve for the current:

$$I_{in}=V_x G_D$$

But looking at the resistor through which I_out flows, I have

$$I_{out}=V_x G_D$$

And therefore the gain is just 1.

Now to find the input resistance, I want to find the ratio $$\frac{V_{gs}}{I_{in}}$$

Expressing one voltage as a multiple of the other, I end up with $$R_{in}= R_D \frac{g_{ds}+G_D}{g_{ds}-g}$$

which is not the right answer (it should be R_D || r_ds). For the output resistance, am I supposed to disconnect the input current source and add one to the output node (that's the tiny bit thats protruding in the upper right corner)? That gives me R_D as the output resistance, which is consistent with the answer I have (the problem is from a past exam).

simulate this circuit – Schematic created using CircuitLab