I have trouble understanding Virtual Work (in statics) as I understand what's happening but I do not understand the signs or directions.
This is what I know. If the force acts in the opposite direction to the displacement then it's taken as negative. But sometimes we don't do this and instead we take the derivative of an angle. Then, the derivative will account for the direction. (Do we also assume the direction of the derivative and plot it and that is why the following part happens?)
In this exercise, the work would be the work done by the spring in the positive y and x axis (standard) and the $W$, multiplied by their respective distances. In this case I took $d_y=-0.45\sin\theta\text{d}\theta$ and $d_x=-0.45\cos\theta\text{d}\theta$.
What I thought was substituting $d_y$ and $d_x$ into $\text{d}U= Wd_y + F\cos\alpha\text{d}x + F\sin\alpha\text{d}y$.
However in the solution it is said that instead is $-Wd_y - F\cos\alpha\text{d}x + F\sin\alpha\text{d}y$.
What am I misunderstanding? I hope it is clear what I'm trying to say.