My four functions are -

[imath]\phi_1(x)=\arccos{\frac{-x}{\sqrt{x^2+10000}}}[/imath]

[imath]\phi_2(x)=\arccos{\frac{\frac{200}{\tan{\pi/3}} - x}{\sqrt{(\frac{200}{\tan{\pi/3}} - x)^2 + 90000}}}[/imath]

[imath]\phi_3(x)=\arccos{\frac{20-x}{\sqrt{(20-x)^2+10000}}}[/imath]

[imath]\phi_4(x)=\arccos{\frac{20+\frac{200}{\tan{\pi/3}} - x}{\sqrt{(20+\frac{200}{\tan{\pi/3}} - x)^2 + 90000}}}[/imath]

Now here's the problem:

That is the plot of all four functions, where all but ONE of the functions behave as you would expect within the domain I need (that is, [-500,500]), but one of them, [imath]\phi_2(x)[/imath], does not. It seems to terminate at around [imath]x=-200[/imath], and as it turns out, becomes a complex value.

What's even more confusing is that all the functions have the same limit (as I would expect), but like I said, one of them decides to give complex values for a certain

So I come to you asking if there is a rhyme or reason for this behaviour, based on the functions I have shown you.

I can scan in the diagram where I derived these functions from if it would help diagnose the issue. To put it simply, these are values of the angle the horizontal makes with a vector pointing to a set of four fixed points, with a variable point along the horizontal as the origin of each of the four vectors. I derived these expressions using a simple scalar product (a unit vector of (1,0) dotted with four different unit vectors, each dependent on x).

Thanks in advance for your help.

EDIT: I've discovered that [imath]\phi_2(x)[/imath] becomes complex-valued for ALL values less than ~-200. This is why [imath]\lim_{x\rightarrow -\infty} \phi_2(x)=0[/imath]; there is no REAL part of the value left, as it's completely complex.