Find the work done for an object to slide down an inclined plane against the frictional force.
The answer my book shows is : $$ W = mg ({\mu}_k \cos \theta - \sin \theta) S $$ where S = displacement done by the object down the inclined plane and the other symbols have their usual meaning.
Well, when I saw the question first time, I thought we may find the Total Energy of the object at initial and final state and then find the change in Energies (Total) which will be equal to the Work done by the object. But, following this approach I came to the following expression (in bold) :
Total Energy at starting point, A = P.E = mgh
Total Energy at final point, B = K.E = $ \cfrac{1}{2} mv^2 = \cfrac{1}{2} m (2gS) = mgS$
So, Change in Energy of the object in sliding down the inclined plane from A to B is:
$$\textbf{Change in Energy} = mgS - mgh $$ The above expression looks far different from the answer given by book. Is my approach somewhere wrong? If it is right, then how can I simplify it further to get the answer similar to the book's one. Any help will be greatly appreciated.