There are a couple of ways. They make a coupling device that requires a small section of pipe to be removed. One end of the coupler then "glues" onto one end of the pipe. The other end of the coupler slides within the body of the coupler and "glues" to the remaining pipe. Works well and there is some latitude in the space. I've never used one on 4", but I have used them to repair 3/4" sprinkler lines quite successfully. In a non-pressurized system, you could use a no-hub connector.