I am guessing that you aren't actually asking how to write hidden octaves and fifths, because they are to be avoided in species counterpoint; rather you want to understand what they are, so that you know what to avoid. Simply put, "hidden" (or "direct" as they're sometimes called) octaves and fifths are those intervals approached in similar motion, i.e., both voices move to the interval in the same direction- either both ascending or both descending. Parallel motion is actually an example of similar motion as the voices both move in the same direction while the interval between them remains intact. Similar motion as a more broadly defined phenomenon, as it includes those instances in which the interval changes. There can be two ways in which this happens- either the interval expands, or it contracts. If the voices of a C-E third both descend to a G-D, the lower voice by skip and the upper by step, then the interval expands in similar motion to a fifth. The same interval could be approached from an inversion of the third, as in E-C moving in ascent to G-D. In that case, a sixth is contracting in motion towards a third.
This is what I am supposing you are asking about, but, the way you asked it actually touches upon a valuable experiment to undertake. As a predicate to detailing the experiment, there are different pedagogical ideas about such fifths and octaves. Some teachers and methods simply proscribe any and all instances of them in species counterpoint, others allow them if one of the voices moves by half step. Rather than satisfy an externally imposed rule on paper, and keep track of what variant are your instructors preferences, I suggest it's better to make your own determination. I once did a whole series of species counterpoints that were all correct except for my having deliberately inserted in each one, somewhere in the middle, an example of a fifth or an octave approached as described. I did enough so that every possible fifth or octave in a diatonic system was tried in approach, ascending and descending, from as many possible prior intervals, both in expansion and contraction. This sounds like a formula for precipitating a huge number of exercises to do, but in actuality, there are not that many of them, if all other rules of species counterpoint are followed. Anyway, doing these, and then hearing them, quickly demonstrated to my hearing just why the "rule' exists (I did the same thing for unsupported fourths). I did not discern any forgiveness factor afforded in the spare texture of species counterpoint by a half step approach in either voice. In every case, the exampled interval stuck out like a sore thumb, and hammered against the ear in the contextual flow. But, be aware that the parameters of "contextual flow" in a species counterpoint exercise is very artificially narrow. There is a lot going on in multi-textured free composition that can mitigate against the effect that they have when left bare, or , the compositional plan may even deliberately invoke such effect. So, the training of the inner ear is not necessarily towards defining "good" vs. "bad" movement, it is more towards developing a sensitivity to what the sounds actually are, and the connotations they can have, either for good or for ill, in different settings. For now, continue with your species counterpoint as if its a "game" with arbitrary rules. They're good for doing in your head while trying to go to sleep, like counting sheep.
Last edited by guitareleven on Mon May 14, 2018 5:08 pm, edited 1 time in total.