Calculating the mass of an object in an Atwood machine system Sorry if the title doesn't represent my question correctly, I'm just learning physics and so I don't know what a proper title would be to describe the problem. I would be more than happy to be corrected for next time.
For the question at hand.
I have the given diagram:

The mass of the rope is insignificant and there's no friction between the wheel and the rope.
I need to find the mass m given these parameters:
$
M = 40kg\\
\theta = 30°\\
a = 0.5g\hspace{20pt}\text{(acceleration uphill of M)}\\
\mu_k = \mu_s = 0.231
$

Now this is what I came up with:

$
\sum F_x = T - Mg\sin \theta - \mu_kMg\cos \theta = 0\\
T - 40g\sin(30°) - 0.231 \cdot 40g\cos(30°) = 0\\
T = 117.57N\\[20pt]
\sum F_y = T - mg = -ma\\
T = mg - ma\\
T = ma\\
117.57 = 0.5mg\\
m = 24kg
$

Now according to the book the answer is $m = 96kg$ and so I got this wrong.
For their calculation of $\sum F_x$ the did the following:
$
T - Mg\sin\theta - \mu Mg\cos\theta = \frac{1}{2}Mg
$

And they made the net force on the x axis equal $0.5Mg$.
I made it equal to 0 because I thought that since a kinetic force is acting upon the object with mass M then the object is thus moving at constant speed so $a = 0 \implies \sum F_x = am = 0$
But I guess I'm wrong about that so I don't understand this part because as far as I know if there's a kinetic force the object moves at a constant speed so the acceleration should be zero.
 A: What you did wrong: When finding tension, you assumed the system was in equilibrium (i.e. at rest/moving at constant speed). The system, however, is not in equilibrium, as implied by the given acceleration value.

Note: it is unclear in which direction the system accelerates. I will just assume that mass $m$ is accelerating downwards.
Before I hint at the approach, I will elaborate on the following:

You can calculate the net force on the whole system (both blocks). You can also calculate the net force on an individual block.

The beauty of calculating the net force on the whole system is that internal forces (like the tension) cancel out.
The force of gravity on $m$ is accelerating the system in what I will declare as the positive direction. So we have $+mg$. Next up, we have a component of the force of gravity on $M$ pulling the opposite way, so we have $-Mg\sin\theta$. We also have the friction, so that's $-\mu_kMg\cos\theta$. Putting it all together, we get:
(try to get the following equation yourself, before revealing the spoiler)

 $$mg-Mg\sin\theta-\mu_kMg\cos\theta=(m+M)a$$

Notice that tension is not in this equation (which is good, one less variable to worry about).
From there, use the relationship you have for the acceleration $a$, you can solve for $m$.
Note: you can also solve this problem using your approach (by solving for tension first), but it's just more needless work. However, I encourage you to use both approaches to convince yourself that they indeed arrive at the same result.
