How should this be written to correct the dangling modifier?

The cost of production can be reduced by purchasing an ultra-pure water system.

I don't see any dangling modifier in there.

To correct the dangling modifier in this sentence, you should make the subject of the main clause (the cost of production) the subject of the modifying phrase. Here's one possible revision:

"Purchasing an ultra-pure water system can reduce the cost of production."

In this revised version, the subject of the main clause ("the cost of production") is now the subject of the modifying phrase ("purchasing an ultra-pure water system"), removing the dangling modifier. The sentence now clearly and correctly states that purchasing the water system is the action that can reduce the cost of production.