Hello! 

This movie has been stuck in my head the past few days and I need help remembering the movie title.

Definitely had sexual content in it. It starts with a failed writer who moves in with her friend and her husband who is a doctor. Her friend begins an affair with an ex-lover (also a doctor) who happens to be best friends with her husband. Eventually the husband finds out and they eventually separate at the end.

I believe the movie was made in the past 15 years. 

Any ideas?