What I am wrong here?

Please see my attached file. In the picture is a figure about the relation between Vin and Vout when Vin varies from 0 to VDD.
As in the file, if Vin < Vth1, M1 is in cut off and M2 is in deep triode.
Here is my reasoning:
Call Ids1, Ids2 is the currents through M1 and M2.
If Vin < Vth1, M1 is in cut off and Ids1= Ids2 =0.
But when Ids2=0 then M2 must be in cut off not deep triode. This isn't consistent with the solution above?
Could you tell me where I am wrong here?

Even with M1 cut-off and the drain-to-source currents in both M1 & M2 being at or near zero, this doesn't imply automatically that M2 is also at cut-off. It's [M2's] simply starved of current from the source by virtue of M1's state. M2 may well be in a very low ohmic state but the fact that M1 is not conducting would prevent current flow from the source and down the series path through M1 & M2 to ground.

To actually get M2 into cut-off one would have to set Vb [at M2 Gate] less than VTH2. The diagram in your post doesn't state what the value of Vb might be.

Thanks,
Is there any an easy way to see that if Vin increase then Vout also increase?
If I know this it will be more easier for me to figure out the relationship between Vin and Vout as in the picture.
With this type of exercise I always have to assume all cases that can happen then solve and see if it is suitable.
For example, in this case I have to consider all combinations between M1 and M2.
M1 and M2 can be cut off, triode, saturation therefore I have to try 9 cases

As with a BJT in which you can make a rough claim, subject to some caveats, that Vbe is about equal to one diode drop, you can make a similar rough claim, again subject to some (stronger) caveats, that Vds is about one threshold voltage drop.

Another way that is more general is to assume that the circuit is stable with some Vin and some Vout. Now make an incremental increase Vin and walk it over to what direction Vout will change in. In this case, an increase in Vin means that Vgs increases. That means that Ids increases. That means that Vds for the lower transistor increases (same Vgs, so more Ids means more Vds). That means that Vout goes up. Or, you can look at it as when Vgs on the top transistor goes up, Rds goes down. So you now have a voltage divider in which the upper resistor has gone down, hence Vout will go up.

As with a BJT in which you can make a rough claim, subject to some caveats, that Vbe is about equal to one diode drop, you can make a similar rough claim, again subject to some (stronger) caveats, that Vds is about one threshold voltage drop.

Click to expand...

I thought about this but it seems to me that MOSFET is unlike BJT. In BJT when
BJT is in forwards bias, Vbe is about equal to one diode drop, but in MOS, Vgs will change accordingly to Ids (for example in saturation). Vgs can be any value???

Another way that is more general is to assume that the circuit is stable with some Vin and some Vout. Now make an incremental increase Vin and walk it over to what direction Vout will change in. In this case, an increase in Vin means that Vgs increases. That means that Ids increases. That means that Vds for the lower transistor increases (same Vgs, so more Ids means more Vds). That means that Vout goes up.

Click to expand...

How can you see that when Vin increases, Vgs will increase? In this case Vgs= Vin - Vout. You said that if Vin increases, Vgs also increases but how can you know that because it may be Vout also increase?

I thought about this but it seems to me that MOSFET is unlike BJT. In BJT when
BJT is in forwards bias, Vbe is about equal to one diode drop, but in MOS, Vgs will change accordingly to Ids (for example in saturation). Vgs can be any value???

Click to expand...

Yes, which is why the caveats are stronger. But it is still often a useful initial assumption.

How can you see that when Vin increases, Vgs will increase? In this case Vgs= Vin - Vout. You said that if Vin increases, Vgs also increases but how can you know that because it may be Vout also increase?

Click to expand...

Walk the changes through incrementally. When Vin increases a bit, it takes time for Vout to change. So, just as you make the increase in Vin, Vgs increases. It may well be that, later, Vout increases which will have the ultimage effect of reducing how much Vgs increases by, but you do NOT expect Vout to increase so much that Vgs will actually decrease, since that would result in LESS current flowing than was flowing previously which would require that Vout decrease from its original value.

Whether you are in the triode region or the saturation regions, if you increase Vgs you get higher Ids for the same Vds, correct? At any given moment you have an effective Rds which is Vds/Ids. Thus, if you increase Vgs the effective Rds tends goes down. That's the point. You can visualize the how things work several different largely equivalent ways. Pick whichever one floats your boat!

Walk the changes through incrementally. When Vin increases a bit, it takes time for Vout to change. So, just as you make the increase in Vin, Vgs increases.

Click to expand...

I got this part.

It may well be that, later, Vout increases which will have the ultimate effect of reducing how much Vgs increases by, but you do NOT expect Vout to increase so much that Vgs will actually decrease, since that would result in LESS current flowing than was flowing previously which would require that Vout decrease from its original value.

Now after some time, as you said above Vout will not increase so much that Vgs will actually decrease.

It may well be that, later, Vout increases which will have the ultimate effect of reducing how much Vgs increases by, but you do NOT expect Vout to increase so much that Vgs will actually decrease, since that would result in LESS current flowing than was flowing previously which would require that Vout decrease from its original value.

Click to expand...

But why after the time, Vout has to increase? Is it possible that Vout will decrease after the time?
For now, let's assume that Vout will increase. For example, let's say that Vout increases so much that Vgs decrease.
Then with M1:
Vgs: decreases
Vds: decreases
=> Ids also decreases
=> Ids through M2 also decreases and because the transistor has Vgs= const
therefore its Vds= Vout has to decrease.
Now I think I understand what you said here but why the case is impossible?

How about the case that when Vin increase and Vout will decrease?
Assume that Vin increases and Vout decreases.
With M1:
Vgs= Vin - Vout: increases because Vin increases and Vout decreases
Vds= Vdd- Vout: increases
=> Ids increases
With M2:
Ids increases => Vout has to increases (which is not appropriate with initial assumption)
=> The case don't happen
Is this right?

Whether you are in the triode region or the saturation regions, if you increase Vgs you get higher Ids for the same Vds, correct?

Click to expand...

Yes, I can see it from Id-Vds characteristics.

At any given moment you have an effective Rds which is Vds/Ids. Thus, if you increase Vgs the effective Rds tends goes down. That's the point. You can visualize the how things work several different largely equivalent ways. Pick whichever one floats your boat!

Click to expand...

As you have proved when Vin increases Vout also increases but it always increases in a maner so that Vgs = Vin - Vout also increases.
With transistor M1:
Vgs = Vin - Vout : increases
Vds = Vdd- Vout: decreases
=> Ids can increase or decrease
=> Rds= Vds/Ids can also increase or decrease
With transistor M2:
Vgs = Vb = const
Vds = Vout : increases
=> Ids increases
=> Rds = Vds/Ids increases
Therefore, in this case if I model the transistors as Rds and they make a voltage divider. But there is a problem that Rds(M1) is unknown if it increases or decreases.
Could you point out that? What I need to consider?