>According to Longman Dictionary,
"Why not" is a "spoken phrase" used to say that you agree with a suggestion.The question is "Can I use "why-not" in "formal writing" as the following sentence.

1. He asked me why I didn't run and fetch the doctor.