How can we account for a friction force changing sign in a conservation of energy equation? I want to solve a simple mechanical problem whereby three forces act upon an object.


*

*$F_1 = (10 - x)$ N

*$F_2 = -3 N$ (friction force)

*$F_3 = -10x$ N


So at $x$ = 0 we see that $F_1$ + $F_2$ + $F_3$ = 7 N and so the object will accelerate. I want to know at what distance $d$ it will stop. To do so, I think I can write the static conservation of energy, that is, the sum of the works done by all my forces equal 0.


*

*$W_1 = 10d - \frac{d^2}{2}$ ($\int_0^d F_1 dx$)

*$W_2 = -3d$

*$W_3 = \frac{(-10d^2)}{2}$


So: $W1 + W2 + W3 = 0$ leads to $d(\frac{-11d}{2} + 7) = 0$ and I can find two solutions:


*

*$d = 0$

*$d = \frac{14}{11}$


$d = 0$ makes sense because no work at all is done by any forces initially, and $d = 14/11$ means, I guess, that the object will stop at $x = 14/11$. But when I calculate the sum of the forces at $x = 14/11$ I find that F equals -7 N! 
Which clearly implies that the system is not stopped and that the object will now move backward. But by thinking about it I realized that then my friction force should change direction (so it should change sign, from -3 N to +3 N), and I guess that's why my reasoning is flawed. But how can I account for the friction forces in a static conservation of energy equation then?
 A: Typically, the Friction force will be proportional to the velocity of the object it affects (or at least it is usually assumed to be proportional).
The Force you describe is constant and pointing in negative x-direction.
The situation you are describing resembles an object on a Hookean spring in a gravity field. At first, F1 pulls it upward (positive x) far stronger than the 'gravity' force F2, so it accelerates. Once it passes the equilibrium point of F1 (x=10 in your case), both forces point to negative x ('downwards'). The mass is decelerated and comes to a halt at some certain height. But this does not mean it will stop there indefinitely, the force acting on the object there is still present and will accelerate the object further 'downwards'.
You could introduce a friction force  like this:
$F2' = -A \cdot  \frac{dx}{dt} = -A \cdot v$
So the direction of the 'friction' always counteracts the momentary movement of the object.
Using your force F1 and this new F2', the equation of motion will describe a damped harmonic oscillator - you can find the complete derivation on Wikipedia
--> So, even with friction in place - in this form at least - the object will never come to a final halt. Either it oscillates with decreasing amplitude, or it approaches its final position - but only reaches it after an infinite time.
