Finding the mass of a block after colliding with a spring

Homework Statement

A block moves along a frictionless surface with an initial velocity of 10 m/s. It contacts a spring of spring constant 350 N/m. Underneath the spring at and after the point of contact the ground is rough and applies a constant friction force of 45 N. The spring compresses 0.75 m before the mass stops. What is the mass of the block?

Homework Equations

Ki + Ui = Kf + Uf

The Attempt at a Solution

Ui and Kf are zero, so I had 1/2mv2 = 45 + 1/2kx2, but I'm not sure where to put the friction force in the equation.

Energy is not conserved in this problem .Apply Work Energy theorem .

That is just Kf - Ki = W, correct? How would I add the spring energy and friction force?

They will be accounted in terms of work done by them .Be careful with the signs.

What will be the work done by friction when the block moves by a distance x ?
What will be the work done by spring when it compresses by a distance x?

oh ok, I got the right answer. Thank you.
So in the work energy theorem, is it always the case that kinetic energy is on one side of the equation and all the other energies are on the other?

You can write work energy theorem in a couple of ways .

1. Kf-Ki = Wnet ,where Wnet is the work done by all the forces including conservative forces like gravitational and the spring force.

2.Wnc = ΔKE+ΔPE , where Wnc is the work done by non conservative forces like friction .On the right side you have the change in mechanical energy .Here the work done by conservative forces are accounted on the right side ,in terms of the potential energy.