What I'm doing:
I was attempting to evaluate this
$Assumptions =
a \[Element] Reals && b \[Element] Reals && c \[Element] Reals &&
d \[Element] Reals && h \[Element] Reals && k \[Element] Reals &&
t \[Element] Reals && r \[Element] Reals && r >= 0 && t >= 0 &&
t <= 2*Pi;
Re[ComplexExpand[(a*((h + r*Cos[t]) + I*(k + r*Sin[t])) +
b)/(c*((h + r*Cos[t]) + I*(k + r*Sin[t])) + d)] ]
Which is basically asking for the real part of $$ \text{Re}\left[ \frac{a(h+r\cos(t))+ i (k+r\sin(t))+b}{c(h+r\cos(t))+ i(k+r\sin(t)) + d} \right] $$
Which is the Möbius transform $\frac{az+b}{cz+d}$ applied to the circle given by parametric equation of a generic circle $(h + r\cos(t), k + r\sin(t))$.
What Happened:
I was a bit shocked at the output. In particular certain expressions that were clearly not complex were assumed to have a nontrivial imaginary part. See below:
What I was expecting:
I was expecting instead to see something like
$$ \frac{bd+bch+adh+ach^2+ack^2+(bcr+adr+2achr+acr^2 \cos(t))\cos(t)+2ackr\sin(t)+acr^2 \sin(t)^2 }{(d + c(h+r \cos(t)))^2 + c^2(k+r\sin(t))^2}$$
Or at least a fractional decomposition of that. Certainly I did NOT expect to see stray "Re" and "Im" operators in the output. That entire "Im" section should be just 0 in the Mathematica output.
What I tried to Troubleshoot:
I thought perhaps Mathematica couldn't reason about the $\sin(t)$ and $\cos(t)$ since they were functions. So I thought to add those to the assumptions as well. Namely that they are real. Unfortunately that did not seem to change this behavior.
What I'm asking for:
I'm looking either for an operator to apply to this expression that gets Mathematica to drop those "Im" terms that are clearly 0.
Or alternatively some other configuration/command that will cause Mathematica to consider my assumptions more carefully and see for itself that the "Im" term should be 0.
In[298]:= Together@ ComplexExpand[ Re[(a*((h + r*Cos[t]) + I*(k + r*Sin[t])) + b)/(c*((h + r*Cos[t]) + I*(k + r*Sin[t])) + d)]] Out[298]= (b d + b c h + a d h + a c h^2 + a c k^2 + b c r Cos[t] + a d r Cos[t] + 2 a c h r Cos[t] + a c r^2 Cos[t]^2 + 2 a c k r Sin[t] + a c r^2 Sin[t]^2)/(d^2 + 2 c d h + c^2 h^2 + c^2 k^2 + 2 c d r Cos[t] + 2 c^2 h r Cos[t] + c^2 r^2 Cos[t]^2 + 2 c^2 k r Sin[t] + c^2 r^2 Sin[t]^2)
maybe? $\endgroup$e=(a*((h+r*Cos[t])+I*(k+r*Sin[t]))+b)/(c*((h+r*Cos[t])+I*(k+r*Sin[t]))+d); o=ComplexExpand[e]; Select[o,FreeQ[#,I]&]//FullSimplify
gives same output as above by Daniel's. I do not know now why what you did, did not work. $\endgroup$$Assumptions =...
? $\endgroup$