Suppose I have a function

F[r_]:= A/r + B/r^2 + Conjugate[C]/r^3 

with A, B, C being complex numbers and r being a real variable. I would like to series expand


in powers of inverse r. How do I tell mathematica to treat A, B, and C as complex numbers while r as a real variable? Can I do this when defining the function F[r]? Can I do this while using Series[] ? Which is the shortest way to do this?



F[r_]:= A/r + B/r^2 + Conjugate[C]/r^3

here are two ways:

Series[ComplexExpand[Re[F[r]^3], {A, B, C}], {r, ∞, 4}] // FullSimplify
   (A^3 + Conjugate[A]^3)/(2 r^3) + Re[-3 Im[A] (B Im[A] + 2 A Im[B]) +
   3 B Re[A]^2]/r^4 + O[r, ∞]^5

if you only want a few terms, or

Collect[ComplexExpand[Re[F[r]^3], {A, B, C}] /. r -> 1/u, u, FullSimplify] /. u -> 1/r

if you want the full expansion.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.