Hello,
why do we calculate phase shift between voltage U1 and U2 as an arg, of the circuit:

That rectangle is a resistor. (It's a European symbol)
Those two voltages (U1,U2) are alternating, right? Because there is no phase shift in DC.
Thanks.
Hi,
Yes when we talk about phase we are talking about AC voltages. That does not mean there is no DC response though, and we might want to calculate that too, but it will not have a phase shift associated with it like the AC components will.
For your circuit the input output relationship is:
Vout(jw)/Vin(jw)=(R*(R-w^2*C*L*R))/((R-w^2*C*L*R)^2+w^2*L^2)-(j*w*L*R)/((R-w^2*C*L*R)^2+w^2*L^2)
so the imaginary part is:
ip=-(w*L*R)/((R-w^2*C*L*R)^2+w^2*L^2)
and the real part is:
rp=(R*(R-w^2*C*L*R))/((R-w^2*C*L*R)^2+w^2*L^2)
and the best way to calculate the phase shift for the usual analysis is like so:
Ph=atan2(ip,rp)
where atan2() is the two argument inverse tangent function and is defined over the whole 0 to 2pi range.
The two argument atan function figures out the correct sign of the result as it checks the sign according to the four quadrant possibilities:
+ip,+rp
-ip,+rp
-pi,-rp
+ip,-rp
as well as some limits.