What can you do to start labor if you're 39 weeks and 4cm dilated and 90 percent effaced and you've had a few contractions 5 minutes apart but they stopped and castor oil and sex didn't work?

I would suggest walking and lots of it. If possible up and down a stairs it has worked for a few friends of mine. Hopefully it will work for you. An old wives tale is to scrub the kitchen floor. I don't suggest you actually do it but crawling on all fours might help. You have probably had the baby by now but this answer might be useful for someone else.