No, those two formulas should not give the same result for your model.

The only way your formula would give the same result is in a different model where there is only one link with a fixed support on one end and is free on the other end.

In your model ux(4) and uy(4) are functions of L1, T1, L2, T2 CTE, nx(1), ny(1), nx(2) and ny(2).  In the different model I mentioned, there is no Link 2.