Why does hair thicken and become more rough after a razor shave but not after one using a trimmer?
Hair does not grow back thicker when it is cut. This is somewhat of an optical illusion because when you shave with a razor it leaves the top of the hair flat rather than pointed so it appears thicker. For instance see this picture:

As you can see the hair is tapered at the top and when cut loses this taper to leave a large cross-sectional area. I would say that for your question with with the trimmer that it is probably cutting the hair further up the taper where the hair is 'thinner' to begin with. A razor cuts closer to the base and thus gives a thicker appearance.
Evidence: http://www.scientificamerican.com/article/fact-or-fiction-if-you-shave-or-wax-your-hair-will-come-back-thicker/
http://www.sciencedirect.com/science/article/pii/S0190962299701817