Author Topic: What does exactly cause "Invalid polar complex" error?  (Read 3718 times)

0 Members and 1 Guest are viewing this topic.

Offline Goran

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
What does exactly cause "Invalid polar complex" error?
« on: January 09, 2014, 01:33:43 pm »
Hello,

I ran into this error on Nspire CX CAS, but saw already that this error message also exists on other TI calcs like 89, 92 and Voyage200.

I got as a result of my program/function a complex function, let's say z(omega), that was calculated correctly and also was shown correctly in e.g. calc application.

But when I want to play with the function further (e.g. getting it's real or imag part, or even to show in again in calculator by typing z(omega)<ENTER>,
I get "Invalid polar complex" error.

On CX CAS you can reproduce the problem if you define a complex function in polar format as e.g.

   z(omega):=(sqrt(omega) @< 90)

On the other hand, if you define the function as

   z(omega):=(abs(sqrt(omega)) @< 90)

everything works fine.

So I thought (as TI says: complex numbers must be properly defined) the problem is that sqrt() function has two solutions (+/-sqrt(x))
and therefore the magnitude of the function internaly is not a scalar value but a two-items entity (e.g. a list), and therefore the error,

but if you define

   z(omega):=(sqrt(4) @< 90)

it works ok as well (sqrt(4) gives 2, not {-2,2}, so I get confused again)

My goal is to understand the cases/circumstances that produce "invalid polar complex" error, in order to circumvene such
problems, if possible (idea: by decomposing the calculation to steps that can be given constraints in order to
force/help engine to yield intermediate results that will in the end result in a valid polar complex).

Thanks for any help and regards,
Goran