Math Help - Find the tension...

1. Find the tension...

A 0.300 kg object is suspended from the ceiling of an accelerating boxcar as in the figure below. The acceleration a = 2.90 m/s2
a) find the angle that the string makes with the vertical
b) find the tension in the string.
I'm not sure how to do this problem, I tried using Newton's 2nd law
$\sum F = ma$ and go part b to be 8.526. Please help.

2. the forces acting on the mass are tension (T) in the string and weight (mg).

weight is straight down in direction.

let $\theta$ be the angle the string makes with the vertical.

the components of T are ...

$T_x = T\sin{\theta}$

$T_y = T\cos{\theta}$

since there is no acceleration in the y-direction, net force in the y-direction is 0 ...

(1) $T\cos{\theta} = mg$

tension in the x-direction is providing the necessary net force ...

(2) $T\sin{\theta} = ma$

solve for T in the first equation ...

$T = \frac{mg}{\cos{\theta}}$

substitute this expression for T in the second equation ...

$\frac{mg}{\cos{\theta}} \cdot \sin{\theta} = ma$

$g \tan{\theta} = a$

$\tan{\theta} = \frac{a}{g}$

$\theta = \arctan\left(\frac{a}{g}\right)$

go back and find T.