I'm trying to solve a system of springs and masses that is confusing me. First, the balls are all lined up linearly. Secondly, the ball in the middle has a smaller mass $m$ while the first and last balls have a larger mass of $M$. The larger balls are each connected to the middle ball with a spring with a spring constant of $k$. They are assumed to move in the right direction and there is no additional external force.
x_1 x_2 x_3
*--------*---------* ------> x
M k m k M
I'm trying to solve this system using the eigenvalue concept, but I'm having trouble. I've dealt with a two mass spring system, but never a three mass, so I'm a bit confused.
From what I gather, I just set the $\ddot{x}$ to $F/m$ and set up the matrix, much like for a two mass system. But I don't know how to do that with the third mass. Like for example, for $\ddot{x}_1$, I think that we have
$$0 -(k/m)(x_1-x_2) -(k/M)(x_2-x_3) $$
and for $\ddot{x}_2$
$$ 0 -(k/m)(x_2-x_1) -(k/M)(x_2-x_3)$$
and for $\ddot{x}_3$
$$ 0+0-(k/M)(x_3-x_2)$$
but I really don't know if I'm right. I highly doubt it. So if some kind soul could tell me what I'm doing wrong/right and point me in the next direction, I would be forever grateful.

