I've been stumped on the same question for a long time. All the conflicting suggestions here remind me of the book "The Soprano on Her Head"... in it is a chapter entitled "Drink Your Milk/Don't Drink Your Milk," in which the author makes the case that, for every problem that you run into, you can find people giving you completely contradictory solutions. Some say milk does a body good; some people disagree. You'll find healthy people in both camps. Is one piece of advice better than another? Perhaps... the question can only be answered by YOU, though. Everybody is different, and we all come at these sorts of problems from different angles.
If I told you what I've found to be the case for me, it isn't necessarily the same as it would be for you, and in any case even if it were, I might not be able to describe the sensations I've had well enough for you to recognize them as your own.
Rejoice! You've encountered a technical difficulty that you MUST solve on your own. However long you spend at this, puzzling over why it is so damn hard, is time well-spent. In the process, if you really search for an answer, you'll find out a tremendous amount about technique that has applications in all other sorts of technical problems.
I urge you not to believe that anyone else, even your teacher, can solve this one for you. You'll have to study your motions and find out what is necessary and what isn't... and of course, read suggestions like those posted here, and try out the practice suggestions of your teacher... but whatever you do, don't just do something and hope that it works. Always evaluate whether or not it works, and WHY. If your teacher's practice suggestions work, then figure out WHY they worked, or it is wasted--because if you don't answer that question for yourself, you haven't learned anything, and you'll stumble blindly into the next technical problem without any lessons from this one to help you on the next.
I can tell you that in the three or four years I've been studying this problem, I have made considerable progress, and the willingness to really engage in STUDYING it, has revealed to me a wealth of experience in other technical challenges. If you'll believe it, trying to figure out how to play fast octaves has, for me, led to discoveries on:
-how to play FF passages with a great tone and nearly effortlessly
-how to always go to the bottom of the key
-how to use more active fingertips
-how to keep from getting tense in scale- or arpeggio-passages.
Now I'm finally to the point where I can play the 6th Hungarian Rhapsody and that pesky passage in the Dante Sonata, with ease. I can sustain triplet eighths at quarter=160, and ordinary sixteenth notes at quarter=132. My goal now is sixteenths at quarter=144 for the Presto of the Hungarian Rhapsody, and I'm making progress on it.
I always approach technical issues with this attitude: if it is hard to execute it, I'm doing something wrong. Sure, in very difficult passages, there is a problem with consistency. It won't *always* work. But I'm talking about the physical stress of playing. If it's hard, it's impossible. There is a beautiful, easy, elegant solution to every problem of the piano, which is available to ALL of us. You don't have to be born with the reflexes of an 8-year-old video-game addict in order to play fast. You can learn, if you're willing to think for yourself not take "it's not possible" or "it's always gonna be tough" or "no one solution will work" for an answer.
Take a look on youtube for videos of pianists playing the 6th Hungarian Rhapsody, Erlkoenig, the Dante Sonata, and La Campanella. Those pieces all have fast, repeated octave passages. Try to learn from how they move.
OK now down to my own solutions, which may or may not help you, but will add to your archive of "other peoples' answers"....
There are two ways to play octaves from the key, as far as I can tell, that are healthy tone-wise and physically. One is to use only the wrist. The other is to use only the upper arm.
With the wrist motion, the wrist itself rises very slightly in response to the fingers pressing the key down. There is no other arm involvement. With the arm motion, the wrist descends (as though it has a string tied around it, that you are pulling down on from beneath it) as the fingers press into the keys. In this way the wrist acts like a shock absorber. Lehvinne and Cortot both wrote about this method. In both cases, strong fingertips are a must.
The important part for me, after learning to execute both those motions, was learning to NOT flex the bicep while executing either one of them. This is the muscle that you use to do curls; notice when your arm "stiffens" that there is muscle fiber being flexed at the base of your forearm where it meets the bicep--sort of the inside of the elbow. This is bad news; it's what stops everything.
I haven't tried shaking a rug out--maybe that is helpful. But do try this exercise, which is intended to isolate the wrist motion from the rest of the arm. Try resting your arm on a table top, and knocking on the table with your knuckles--just like knocking on a door. Don't let the bicep tense up; you don't want to see that muscle fiber standing up on the inside of your elbow. If you start with just two fast knocks, "da-da!" as fast as you can, without any tension, and try to get that rebound feeling, then you can slowly add knocks while trying to keep the speed. For me, doing little groups of knocks allowed me to really use the rebound of my knuckles bouncing off the table-top (or other surface), in a way that dramatically increased the speed. Notice how much faster you can do just two knocks at a time, than you can when you try to do 4 or 6, at first. Again, find out WHY. And use that knowledge. If you can do two really fast, it is possible to eventually do four, then 8, then any number. Then go to the piano and try to replicate the motion.
At some point you might try combining a mixture of the upper arm motion and the wrist motion--either together, or alternating in some sort of pattern; perhaps pulsing each beat with the upper arm, and then following through with the wrist. That is one school's answer, and I've found it beneficial--but it requires practice to coordinate. At first, it is most important to make sure that the bicep isn't involved no matter what.
Hope that helps. I'd be delighted to hear how you do with this, and any responses you have to my suggestions or others'! Best wishes.
Kevin