The relation between Vin and Vout (diodes circuit)
No, this is not right. You are trying to use linear circuit analysis techniques on a circuit that has non-linear elements. For example, if you are using an ideal diode model then \$I_2\$ can not be positive...how do your equations account for that?