I guess you may be working on the assumption that you have a total amount of energy for your ride and you choose which parts of the ride to use it on, or when to use it most quickly. Perhaps you suspect that, due to the lower wind resistance, you're better off spending more energy going uphill at the cost of needing to relax on the downhill?
Consider the simplest case of going up a hill and back down the same way, with no true wind (only what you induce by moving). My thinking used to be that I should go as hard as I possibly could up the hill, so that I had to coast down the other side. When climbing, I thought, very little of my effort would be lost to wind resistance. I'd be slower on the descent, but this would mean a smaller proportion of my work would be spent on overcoming (induced) wind resistance. I've read that at 20kph you are using 50% of your effort to overcome wind resistance and, as pointed out by Daniel R Hicks, wind resistance increases with the square of speed, so this strategy seems intuitively sensible.
However, my experience doesn't bear it out. I think the problem is pacing. I can't actually work hard enough on the climb to make this work. If I pedal flat out, then I need more than the same distance downhill to recover for the next hill or to keep me going on the flat. But working at, say, 40-80% of maximum is more sustainable for anything longer than a ten minute up and down. Extreme effort actually costs more than slightly above-average effort. (Also see a question about standing up to pedal).
Lately I've been concentrating more on my target average speed. Any time I'm below it I work a little harder and when I'm over my target I relax a bit. I don't have a heart rate monitor or power meter, but these might help too.
I'm afraid I don't know all the equations, but I think they'd have to take into account aspects of your body's performance, not just power and aerodynamics, so would be pretty complicated.
For me, working out through practice the best times to put the effort in on a 1-hour route is part of the fun of racing against my previous times.