CAS vs Plot
#1

Hi all!

I am _not_ the mathematician so I need some help for following function I found in the CAS examples.

      SIN(X)^2
------------
COS(X)TAN(X)
---------------------- = 1
_ +------------------
|/ SIN(X)COS(X)TAN(X)
On the emulated HP40 with CAS version 4 (4/27/2000) I get this result too (after TAN2SC and EXPAND). But if I plot this function it shows a square wave between 1 and -1.
Question: CAS does not respect the sign?

Ciao.....Mike

#2

Mike,

It depends on where the square should be on the top term.

Is it (sin(x))^2 (i.e. the entire sin function that is squared) or sin (x^2) (i.e. the argument of the sin function that is squared)?

If it is the first, then this set of trig functions does not even have to be evaluated! It reduces exactly to 1.

Why? Well, you can express tan(x) as sin(x)/cos(x). If you do this, then everything cancels out. In the denominator square root, for instance, you'd get (leaving off the (x) arguments for ease of notation)

sqrt( sin cos (sin/cos) ) = sqrt (sin^2 ) = sin

Similarly, the top of your equation reduces first to

sin^2/sin = sin

Leaving for the final step, sin/sin = 1

#3

Thank you Dave for your investigation, but I am not convinced: in the denominator you may reduce to sqrt(sin^2) what is never negative due to square. Further reduction would be abs(sin). But as numerator you get after reduction sin^2/sin what keeps the sign of sin (even if you keep your fingers crossed <G>).

So the overall reduction would be sin/abs(sin) what is 1 or -1 every now and again. So the plot on the HP-40G revealed a nasty surprise (as ugly as sin or remissible peccadillo?) in it's own CAS. Bombs on Babylon! Mathematical gomorrah!! The 40G was made to use at school.

Ciao.....Mike (sinning, pondering, scapegoat)
No-no abs(sin) has nothing to do with absinth and I did not drink too much of it...


Edited: 16 Nov 2004, 11:05 a.m.

#4

Mike says: "Thank you Dave for your investigation, but I am not convinced: in the denominator you may reduce to sqrt(sin^2) what is never negative due to square."

NO! because

sqrt(anything^2) = +/-anything

So, in the end, Mike's original expression reduces to *either* +1 or -1, depending on your choice of root. The "abs" function has no relevence here.

(I am assuming that when Mike writes "SIN(X)^2" he means exactly that---namely "(SIN(X))^2" which mathematicians prefer to write as "SIN^2(X)".)

--Mark

#5

Yep - you are correct! Now when I read

sqrt(anything^2) = +/-anything
I remember. How could I forget.

So the correct answer would be sign(sin(x)) or abs(sin(x))/sin(x)?

Ciao.....Mike



Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: CAS taylor Alberto Candel 5 3,875 12-13-2013, 09:45 PM
Last Post: Alberto Candel
  HP Prime CAS curiosity bluesun08 11 4,710 12-10-2013, 01:03 PM
Last Post: Han
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 2,141 12-07-2013, 07:15 PM
Last Post: CompSystems
  HP Prime: complex numbers in CAS. Alberto Candel 1 1,856 12-06-2013, 02:36 PM
Last Post: parisse
  [HP Prime] plotfunc() bug in CAS Chris Pem10 2 2,362 12-04-2013, 02:46 PM
Last Post: Chris Pem10
  HP Prime: Home/CAS? Alasdair McAndrew 11 3,780 11-26-2013, 02:48 PM
Last Post: Alberto Candel
  HP Prime numerical precision in CAS and HOME Javier Goizueta 5 2,353 11-16-2013, 03:51 AM
Last Post: Paul Dale
  Need CAS help Michael de Estrada 6 2,586 11-13-2013, 01:29 AM
Last Post: cyrille de Brébisson
  HP Prime - CAS functions in Spreadsheet App CR Haeger 6 2,398 11-11-2013, 12:37 AM
Last Post: Michael de Estrada
  Another HP Prime CAS question Michael de Estrada 3 1,787 11-09-2013, 10:56 AM
Last Post: Michael de Estrada

Forum Jump: