First, formulate a maxim that enshrines your reason for acting as you propose. Second, recast that maxim as a universal law of nature governing all rational agents, and so as holding that all must, by natural law, act as you yourself propose to act in these circumstances. Third, consider whether your maxim is even conceivable in a world governed by this law of nature...
If your maxim fails the third step, you have a ‘perfect’ duty... if your maxim passes all four steps, only then is acting on it morally permissible.
One example is lying:
The maxim of lying whenever it gets what you want generates a contradiction once you try to combine it with the universalized version that all rational agents must, by a law of nature, lie when it gets what they want.
Imagine there is a dance called the hokey cokey (there actually is, but I don't think this is it) which involves two people. They stand side by side, and the one on the left starts by putting their left leg in, out, and shaking it all about. Then the person on the right does the same, with their right leg.
According to wikipedia, a maxim is
1) the action, or type of action; (2) the conditions under which it is to be done; and (3) the end or purpose to be achieved by the action, or the motive
So what if we consider the following maxim:
- If you want to dance the hokey cokey (3) start with the left foot (1) when music is playing (2)
This seems impossible to universalise: so why isn't it immoral (and, moreover, a perfect duty not) to deliberately do the hokey cokey to music?
As there is no way for everyone to start with the left foot, and still dance the hokey cokey to music, because to do the hokey cokey you need a dance partner who goes second.
Unless (I suppose) you can do the dance by accident.