0
$\begingroup$

I have a problem for extracting the real part of a complex number. The problem is the following: Suppose $f(z)=\frac{1}{z+\frac{\Delta_{1}}{z+\frac{\Delta_{2}}{z+\frac{\Delta_{3}}{z+...}}}}$, in which z is a complex number $(z= a+bi)$ and $\Delta_{1}$, $\Delta_{2}$ ... are number and $f(z)$ is a continued fraction. And I want to compute $\phi(b)$ since I would like to plot $\phi(b)$ in the end

$$\phi(b)=\lim_{a\rightarrow0}Ref(a+bi)$$

But Mathematica doesn't allow me to do that. I use "Limit" in Mathematica and set all $\Delta_{n} = 0 , n > 1$ and $\Delta_{1}=1$ , I get 0. Even I let some $\Delta_{n} $ to be nonzero, I still end up with 0.

Here is my code. I set $\Delta_{1}=1$ and $\Delta_{2}=0.5$, rest are zero.

Limit[ComplexExpand[Re[1/(a + b*I + (1/(a + b*I + (0.5/(a + b*I)))))]], a -> 0]

Can someone help me with this ? I am guessing the "Limit" function in Mathematica can't not handle this problem.

Thank you very much !!!

$\endgroup$

1 Answer 1

2
$\begingroup$

Are you sure 0 is not the right answer? The problem is not with the limit. Look at your function without limits. I changed your 0.5 to 1/2.

ComplexExpand[Re[1/(a + b*I + (1/(a + b*I + (1/2/(a + b*I)))))]] // Simplify
(*(a (4 a^4 + 8 a^2 (b^2 + 1) + 4 b^4 + 3))/((a^2 + b^2) (4 a^4 + 4 a^2 (2 b^2 + 3) + (3 - 2 b^2)^2))*)

with a as a factor in the numerator you don't need the limit.

% /. a -> 0
(*0*)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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