Heres the problem:

A 103 g bullet is fired from a rifle having a barrel .796 m long. Assuming the origin is placed where the bullet begins to move, the force exerted on the bullet by the expanding gas is F = a + bx - cx^2, where a = 10600 N, b = 5000 N/m, c = 39400 N/m^2, with x in meters.

Determine the work done by the gas on the bullet as the bullet travels the length of the barrel.

Also, if the barrel is 1.136 m long, how much work is done?

---------------------------------
I wasnt sure whether or not to treat this problem as a variable force one.... the only way i really know how to do that is by using a "spring-like" constant, but im not sure if that is really applicable in this problem.

Could anyone point me in the right direction???

$$W_F = \int _{x_1}^{x_2}Fdx$$