An inclined plane of mass $m_1$ inclined at an angle $\theta$ lies on the $x$-axis. Let $(x,0)$ denote the position of the plane. A spring with spring constant $k$ is attached to the right of the plane. The spring is horizontal and unstretched when $x=0$. A block of mass $m_2$ slides without friction down the plane.
I'm asked to find the constraint force acting on the plane given that the tension in the spring is a conservative force.
So far I have done the following:
\begin{align*} m_1 \begin{pmatrix} \ddot{x} \\ 0 \end{pmatrix} & = \begin{pmatrix} 0 \\ -m_1g \end{pmatrix} + \begin{pmatrix} 0 \\ N_2 \end{pmatrix} + \begin{pmatrix} N_1\sin\theta \\ -N_1\cos\theta \end{pmatrix}+ \begin{pmatrix} -T \\ 0\end{pmatrix} \\ & = \begin{pmatrix} N_1\sin\theta-T \\ N_2-N_1\cos\theta-m_1g \end{pmatrix} \end{align*}
This gives $$N_1=\frac{T+m_1\ddot{x}}{\sin\theta}$$ and $$N_2=(T+m_1\ddot{x})\tan\theta+m_1g$$ where $N_2$ is the normal between the plane and the $x$-axis, and $N_1$ is the normal pointing inwards to the plane from the block $m_2$.
So the force of constraint acting on the plane is $$\begin{pmatrix} 0 \\ N_2 \end{pmatrix} + \begin{pmatrix} N_1\sin\theta \\ -N_1\cos\theta \end{pmatrix}=\begin{pmatrix} T+m_1\ddot{x} \\ m_1g \end{pmatrix}$$
