In this paper two invariant sets are derived for a second order nonlinear affine system using a sliding mode controller. If the state started in these sets, it will not leave it for all future time. The invariant set is found function to the initial condition only, from which the state bound is estimated and used when determining the gain of the sliding mode controller. This step overcomes an arithmetic difficulty that consists of calculating suitable controller gain value that ensures the attractiveness of the switching manifold. Also, by using a differentiable form for the approximate signum function in sliding mode controller formula, the state will converge to a positively invariant set rather than the origin. The size of this set is found function to the parameters that can be chosen by the designer, thus, it enables us to control the size of the steady state error. The sliding mode controller is designed to the servo actuator system with friction where the derived invariant sets are used in the calculation of the sliding mode controller gain. The friction model is represented by the major friction components; Coulomb friction, the Stiction friction, and the viscous friction. The simulation results demonstrate the rightness of the derived sets and the ability of the differentiable sliding mode controller to attenuate the friction effect and regulate the state to the positively invariant set with a prescribed steady state error.