Two-block system acceleration when applying a force in the $x$ direction

Two blocks are connected by a light-weight string that passes over a friction-less pulley (a.k.a. Atwood's machine). Block # 1 (called $m_1$) hangs from the edge of a friction-less table. Block # 2 (called $m_2$) stands on the table in a horizontal position. A force is applied in the $m_2$ block towards the positive $x$ direction and away from tension generated by $m_1$. Find a mathematical expression for the acceleration of the system.

I have been working on this kind of problems with no previous difficulty when no force is applied and the system depends only on the masses of the blocks, but as soon as a force is introduced my calculations seems not to work.

When no force is applied:

$$F_x = -T = m_2 a$$

$$F_y = T - m_1 g = m_1a$$

Adding these two equations and solving for the acceleration you get:

$$a = -\frac{m_1}{m_1 + m_2} g$$

Now, I guess if we want to add a force being applied towards the positive $x$ direction and away from the tension generated by $m_1$:

$$F_x = F - T = m_2 a - T = m_2 a$$

I know my mistake is when formulating above equation because I can't added to the $F_y$ equation.

How can I get the acceleration expression when a force is involved ?

• I edited the post for readability with math formatting. – John Alexiou Sep 18 '14 at 23:20

Intuitively, the force will be applied to the total mass of the blocks and cause an acceleration (in addition to the one of gravity) of $\frac F{m_1+m_2}$, so the total acceleration will be $\frac {F-m_1g}{m_1+m_2}$
In your solution you cannot replace $F$ with $m_2a$ because $F$ is not the whole force on $m_2$ It is correct to say $F-T=m_2a$. You already have $T-m_1g=m_1a$ That gives you two equations in two unknowns, $a,T$