A. By playing along, within reason.
Ellie, our 5-year-old, has complained about mysterious leg pains since she was 3. The "pains" move from limb to limb and tend to vanish miraculously the minute her sister comes home from school or her father agrees to let her use him as a jungle gym. Of course, I didn't automatically assume Ellie's complaints were imaginary. I went straight to worrying about bone cancer and had her legs examined by any physician I came in contact with. So first do whatever you feel is necessary to rule out the possibility that her symptoms are real.
Then realize that this is essentially just a game, the primary object of which is that you figure out what it is your child really needs: empathy, diversion, some quiet time?
One mom I know has a 3-year-old who suffers from a trio of recurring complaints -- stomachaches, tiredness, and a case of dangerous hangnails: "I go along because I think it gives her the attention she's seeking. I'll say, 'Maybe you should lie down and rest if you're tired' or 'Maybe you should take a break from dinner if your stomach hurts.'"
If the whining continues, feel free to use a little trickery: "Too bad your tummy hurts, because we have a special dessert tonight." (Hey, one good trick deserves another.)
Recently in my house, the imaginary-ailment game went too far: Ellie started asking for "the delicious grapey medicine, to make my leg feel better." Medicine, I explained, can actually hurt your body if you take it when you're not sick -- a fact, I added, that she needed to know if she wanted to be a doctor (her current career goal). "Okay, then I'll be something else," she said. "Now can I have the grapey medicine?"
Trisha Thompson is a contributing editor to PARENTING magazine and a former editor-in-chief of BabyTalk.