Cosine for fun


A fellow colleague of mine asked her calculus class what the graph of y=Cos(x)^Cos(x) might look like (for real valued results). A TI84 didn't show any of the "interesting" part. A TI89 showed a little of it. With Mathematica I was able to show "almost all" of it (with some effort), but unfortunately I haven't tried it on an HP yet (I'll have to dig out my HP50 from storage this weekend).

What was interesting is that for expressions like (-1/3)^(-1/3) [hint] the TI84 gave the real valued root, but the Casio fx9860g gave the first complex valued root, agreeing with Mathematica (which is why it took some effort with Mathematica to graph the real parts).

For a "fun" weekend time waster see if you can get a "mostly complete" graph from 0 to 2pi.

Edit: don't trust Wolfram Alpha entirely on this one.

Edited: 4 Dec 2009, 12:40 a.m.


If it's plotting the real values of the results of Y=Cos(x)^Cos(x) for x=0 to 2pi, then on the 48G:
PLOT menu:
Equation = 'RE(Cos(x)^Cos(x))' edit#2: should read EQ: 'Y=RE(Cos(x)^Cos(x))' [does not seem to make a difference though]
Independent variable = X
X-scale =0, 360
Y-scale automatic
Output graph:
click here.

Edit: the above was in DEG mode, similar results are obtained in RAD mode for X=0 to 6.2832 (2pi).

If the absolute value of the eqution is used ('Y=ABS(Cos(x)^Cos(x)'), the following is obtained:

Edited: 4 Dec 2009, 8:10 a.m. after one or more responses were posted


I don't know why my hp 50g can't plot the middle part of the graph.I used the same settings that Bart. The table function results in indefinite values for the corresponding x, but if I evaluate the function in the stack it gives the correct result. So I had to plot the following program:
<< x cos dup ^ RE >>. That's works.


Hello again ,

Finally, I did the plot using on the Plot Setup of the 50g

EQ: << RE(cos(x)^cos(x))>>.

But, if I try without the markers program, then it doesn't work.

Anybody know why?



The interesting part is where pi/2 < cos(x) < 3pi/2 because here the values of cos(x) are negative (between -1 and 0), causing negative numbers to be raised to negative number.

This can cause complex or imaginary results: such as (-.5)^(-.5) = -1.414i, which can not be graphed on the real coordinates system (don't just graph the real part of the solution)

....or negative results such as (-1/3)^(-1/3) = -1.4422

....or positive results such as (-2/3)^(-2/3) = 1.3104

It all depends on the numerator and denominator being odd or even, and the irrationality of the numerator and denominator.

So, depending on the value of cos(x) in this region the graph should bounce from positive and negatives, but not be connected anywhere due to the complex results.

The trick was to get a graph to show this behavior. Some calculators will only show the complex values (or roots), and others give the real valued roots.

For instance, the value of (-2/3)^(-2/3) will either be real or complex depending on the calculator or math software: Hp's and TI's give the real root, while Mathematica and the Casio Fx9860g will only give the complex root.

The trick was to find the values of x that produces real roots (both positive and negative). After some trial and error, this is what I came up with:

The middle portion is the non continuous positive-negative-complex behavior. It should be filled-in completely, but I only used fractions as large as -38/39 (i.e. (-38/39)^(-38/39) which gives a positive value) and this will occur for radians of about 2.91 and 3.368, hence the large gap. Had I used values closer to 1, i.e., 257/259 the gap would have been smaller.

Anyway, fun problem, but I think I spent way to much time kicking it around. :)

Have great weekend.


Edited: 4 Dec 2009, 7:52 p.m.


Here's a screen grab of three superimposed graphs:




XRNG: (0, 2*PI), YRNG: (-2, 2)

And here's a graph of RE(SIN(X)^COS(X)), which happens to be discontinuous at x=PI:

XRNG: (0, 2*PI), YRNG: (-2, 2)


Dave, your graphs are similar to what Wolfram|Alpha gives: individual graphs of the real part a the first root, or the imaginary part of the first root. However, I'm looking for the graph for just the entire real roots, not just the real portion.

That is...there are three cube roots of (-3) or three values (-1/3)^(-1/3). Two are complex, one is real: graph the real one. The problem is, some CAS give only the first complex value making graphing the real root impossible (and other values have no real root). I hope I make sense. :(

Possibly Related Threads...
Thread Author Replies Views Last Post
  Fun graphs on HP Prime Mic 9 1,136 09-15-2013, 08:30 AM
Last Post: Eddie W. Shore
  Fun things found by running strings on the 39gII emulator bhtooefr 11 1,583 05-16-2013, 12:40 AM
Last Post: Mic
  Fun with the HP-35 Gerson W. Barbosa 11 1,370 08-02-2012, 10:58 AM
Last Post: Gerson W. Barbosa
  First post here: something fun... Jeff Dinkins 4 686 04-22-2012, 02:42 PM
Last Post: Jeroen Van Nieuwenhove
  devolution of the wp34s label---or fun with colors troy 19 2,330 02-09-2012, 02:52 PM
Last Post: Egan Ford
  OT: Cosine curio Bob Patton 3 504 12-13-2011, 05:45 AM
Last Post: C.Ret
  HP 15c searchable Adv Fun Handbook (link) - done by Joe Horn Gene Wright 19 1,872 11-24-2011, 04:59 AM
Last Post: Joel Setton (France)
  15C LE -- fun with the PSE Katie Wasserman 6 754 09-14-2011, 04:04 PM
Last Post: Katie Wasserman
  TI people have more fun Don Shepherd 7 877 06-14-2011, 10:45 PM
Last Post: Gerson W. Barbosa
  having fun with the HP-17b Don Shepherd 12 1,270 06-08-2011, 10:08 PM
Last Post: Don Shepherd

Forum Jump: