The net accelerating force is given by :
Net accelerating force = Force by engine - Frictional force
We know that the force is given by :
or
or
Thus acceleration of the train is .