I have the following expansions but I don't know how my teacher gets them. Apparently there is a formula for it (though the guy who told me didn't know it well), but I cannot find it in my notes.
For example, let $z$ be a complex number. Then,
It makes total sense to me in this case, but I get completely confused in this second case:
What is/are the formulas that I need to compute this? Thanks!