All diodes are assumed to be ideal.
When Vi > 3V, D3 started conducting.
When it started conducting, Vo = VA will be at \$(Vi + 3)/2\$ volts.
Which means, when Vi = 6V, VA = 4.5V. D1 does not stop conducting. It will stop conducting only at VA = 6V, i.e, when Vi = 9V.
After 9V, only D3 will conduct. When it conducts, Vo = VB = \$(2/3)Vi\$ volts.
Which means, Vi should reach 30V, for D2 to start conducting. After that both D2, D3 will conduct upto 50V.
Your ranges [3,6] [6,20], [20,50] therefore are incorrect.
You can learn behavior of these circuits by a simulator.
See here
Yeah, you are on the right path.
When Vin > 0, D1 = forward biased, D2 = reverse biased
We have two cascaded inverting amplifiers now.
So Vout will be:
$$V_{out} = V_{in}*(-R/R)*(-R/R) = V_{in}$$
When Vin < 0, D1 = reverse biased, D2 = forward biased
This means the non-inverting terminal of the second op-amp will be at some voltage V', and the same voltage would be there at the inverting terminal too.
This is in contrast with the first case, where both terminals of the second op-amp were at '0'. So we were able to find the Vo straightforward.
Let us try to find V in this case now.
At node A, since voltage = 0, we can write a KCL equation:
$$\frac{V'}{2R} + \frac{V_{in}}{R }+ \frac{V'}{R} = 0 $$
$$\implies V' = -\frac{2}{3}V_{in}$$
The second op-amp is now nothing but a non-inverting configuration.
$$\therefore V_{out} = V'(1+\frac{R}{2R}) = -V_{in} $$
So the conclusion is this circuit acts as a precision full-wave rectifier. The analysis remains the same even if 0.7 V drops are considered, because the diode drops get compensated at the outputs of the op-amp. The same output is still obtained. Hence the term "precision" full-wave rectifier, which acts as a rectifier with ideal diodes.
Best Answer
You can analyse it in two conditions of input ui.
The op-amp output is positive and hence D1 will be forward biased and D2 will be reverse biased. Assuming ideal diodes and op-amps, we can draw the circuit like this.
Op-amps are ideal and have negative feed back. So \$V_B = V_A = ui \$
At the node B, apply KCL/nodal analysis for three branches.
Input currents to op-amps are zero. So:
$$\frac{(V_B - uo)}{R} + 0 + 0 = 0$$ $$\implies V_B = uo$$ $$\therefore uo = ui$$
The op-amp output is negative and hence D1 will be reverse biased and D2 will be forward biased. Assuming ideal diodes and op-amps, we can draw the circuit like this.
A little more neatly.
It is simply a buffer driving an inverting amplifier. The input to the inverting amplifier is ui itself. I can therefore write the traditional input output relation of inverting amplifier like:
$$uo = -ui(\frac{R}{R})$$ $$\therefore uo = -ui$$
Now you can plot a sine waveform for ui as \$V_{in}\$ and u0 as \$V_{out} \$ to see that it would just act as a full wave rectifier.
--EDIT--
Even if diode drops are considered, the same output is obtained at the end. This is an example of Full Wave Precision Rectifier. It acts as a rectifier with ideal diodes.