# Determining the condition for the real part and imaginary parts of complex function using its modulus

So if I have a function like the following, where $$f$$ is a complex function and B is real: $$S(\lambda) = 1 + iBf(\lambda)$$ Suppose that I know that its modulus must be equal to 1, therefore:

Now how do I determine the conditions for the real part and its imaginary part? I know that: $$|1 + iBf(\lambda)|^2 = 1$$

From here: $$|1 + iB [Re(f(\lambda)) + iIm(f(\lambda)]|^2 = 1$$

Then I can say that the imaginary and real parts of the function would be: $$Im(S(\lambda)) = 1+ BRe(f(\lambda))$$ $$Re(S(\lambda)) = -BIm(f(\lambda))$$

Is my reasoning correct?

• Don't forget the $1$ on the real part! – cmk May 24 '19 at 17:22

For the modulus to be $$1,$$ you only need the product $$Bf$$ to be $$\pm1,$$ for since $$|1+iBf|=1,$$ it follows that $$(1+iBf)(1-iBf)=1+(Bf)^2=1,$$ and the result I claimed follows.

Of course I assumed $$B$$ and $$f$$ are real, since you do not say anything about them. Otherwise what I say above needs to be modified to be true.

OK, you have specified that $$f(\lambda)$$ is complex valued. Thus, if you write $$f=a+ib,$$ where $$a=a(\lambda),\,\, b=b(\lambda).$$ Then we have that $$1+iBf=1+iB(a+ib)=1-Bb+iBa.$$

For its modulus to be $$1,$$ we must have $$(1-Bb+iBa)(1-Bb-iBa)=1,$$ or $$(1-Bb)^2+(Ba)^2=1.$$ This gives $$B=\frac{2\Im f(\lambda)}{|f(\lambda)|^2}.$$

• I meant $f$ to be complex and B to be real – daljit97 May 24 '19 at 19:25
• @daljit97 Is $\lambda$ real or complex too? – Allawonder May 24 '19 at 22:11
• no, the $\lambda$ is not complex – daljit97 May 24 '19 at 22:49
• @daljit97 I adjusted my answer. See if it satisfies your conditions. – Allawonder May 24 '19 at 22:50