Let represent the force on the gun. Then the impulse is equal to the change in momentum:

Since the force increases and decreases uniformly,

And f(t) is the equation of a line from 0 to 0.5: f(t) = kt + c

But c = 0 since f(0) = 0,

so solve for k.

Then .