Consider a body attached to a horizontal spring and resting on a surface, inclined at an angle $\theta$ from the ground.
The spring constant is $k$. Initially the spring was kept in its natural length while the body was held still by some external agent. When the external agent was removed, the body slid $x$ units down the inclined plane to achieve equilibrium.The coeffecient of (kinetic) frictional force acting on the body is $\mu$
To solve this problem, I can use two methods:
1.Work-Energy Theorem: This yields $$0=mg(x\sin\theta)-\frac12kx^2-\mu (mgx\cos\theta)$$
2.Equating forces at equilibrium: This yields $$kx+\mu mg\cos\theta-mg\sin\theta=0$$(along the inclined plane)
On solving the equations the two methods give different answers, while they should give the same. Is there anything I am missing out here? Please help me solve this problem.