A point mass $m$ is hanging by a string of length $l$ in a car moving with a constant acceleration $a$. Using car frame and pseudo force, we easily get that the angle made by string with vertical is :
$$\theta = \arctan(\frac{a}{g})$$
However when I solve it using work-energy theorem , I'm getting that :
$$\theta = 2\arctan(\frac{a}{g})$$
Here's how I did it : When the mass $m$ will finally make an angle $\theta$ which we need to find, it's velocity will be zero ( working from car frame). So change in kinetic energy is zero. Hence, sum of work done by each forces is zero so that :
$$W_g+ W_T+ W_f=0$$
$W_g$ is work done by gravity which is $-mgl(1-\cos(\theta))$.
$W_T$ is work done by tension which is zero because tension force was always perpendicular to displacement vector at any instant.
$W_f$ is work done by pseudo force which is equal to $mal\sin(\theta)$.
Hence , by work energy theorem :
$$mal\sin(\theta)=mgl(1-\cos(\theta)$$
Which gives ,
$$\theta = 2\arctan(\frac{a}{g})$$
Here's a diagram to help visualise the situation :
Note that vertical displacement is $l(1-\cos\theta)$ and $ma$ is pseudo force.
Please explain in simple language what wrong is going here. Thanks !