[sage-support] Plotting Cube Root

2017-01-17 Thread Tom Clark
My students had trouble with plotting cos(x^(1/3)) as a homework problem. What's happening is that x^(1/3) generates a primitive complex root so I explained that to them, then I found this work around: def oddroot(x,n): sgn(x)*(abs(x))^(1/n) This is work for any odd number n and will

Re: [sage-support] Plotting Cube Root

2017-01-17 Thread William Stein
On Tue, Jan 17, 2017 at 7:26 AM, Tom Clark wrote: > My students had trouble with plotting cos(x^(1/3)) as a homework problem. > What's happening is that x^(1/3) generates a primitive complex root so I > explained that to them, then I found this work around: > > def