[sage-support] problem with integral (Maxima)

2010-11-08 Thread pong
I have encountered a problem in using integral

integral(x * sqrt((-2*cos(x))^2 + (2*sin(x))^2), x, 0, pi)

correctly gives pi^2

but

integral(sin(x) * sqrt((-2*cos(x))^2 + (2*sin(x))^2), x, 0, pi)

results in a complaint that Maxima encountered a Lisp error: 2 is not
of the type LIST.

Why so? Any help?

Thanks in advance

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Display all XXXX possibilities? Problem

2010-11-08 Thread JJBWebb
I'm trying to build a power series, and when I call the function to
build it, sage responds Display all  possiblities? (y or n).

I hit n, then the same command pops up and then computes the power
series correctly.

Is there some way to get it so I don't have to hit n (i.e. avoid the
Display all ... completely) so I can automate this process?

Thanks,
-John

--
| Sage Version 4.2, Release Date: 2009-10-24 |
| Type notebook() for the GUI, and license() for information.|
--
sage: P = 79
sage: m = 2
sage: upbound= integer_floor(P^m*(P-1)/10)+10
sage: R.q = PowerSeriesRing(IntegerModRing(P^m),upbound)
sage: def EEbuild(bound):
:   EE = 1 - q -q2 +O(q^upbound)
:   for i in range(2,bound+1):
: EE=EE+(-1)^i*(q^((1/2)*i*(3*i+1))+q^((1/2)*i*(3*i-1)))
:   return EE
:
sage: lil = integer_floor(sqrt(upbound*4/3)) + 10
sage:
sage: ee = EEbuild(lil)+O(q^upbound)
Display all 1859 possibilities? (y or n)
sage: ee = EEbuild(lil)+O(q^upbound)
sage:

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Display all XXXX possibilities? Problem

2010-11-08 Thread JJBWebb
it should be q^2, i don't know why it didn't copy in right.



On Nov 8, 10:52 am, Minh Nguyen nguyenmi...@gmail.com wrote:
 Hi John,

 On Tue, Nov 9, 2010 at 2:27 AM, JJBWebb johnjackw...@gmail.com wrote:
  sage: def EEbuild(bound):
  :           EE = 1 - q -q2 +O(q^upbound)

 What's the definition for q2? Running your code on Sage 4.6, I got this error:

 sage: version()
 'Sage Version 4.6, Release Date: 2010-10-30'
 sage: P = 79; m = 2
 sage: upbound= integer_floor(P^m * (P-1) / 10) + 10
 sage: R.q = PowerSeriesRing(IntegerModRing(P^m), upbound)
 sage: def EEbuild(bound):
 :     EE = 1 - q - q2 + O(q^upbound)
 :     for i in range(2,bound+1):
 :         EE=EE+(-1)^i*(q^((1/2)*i*(3*i+1))+q^((1/2)*i*(3*i-1)))
 :     return EE
 :
 sage: lil = integer_floor(sqrt(upbound*4/3)) + 10
 sage: ee = EEbuild(lil)+O(q^upbound)
 ---
 NameError                                 Traceback (most recent call last)

 /home/mvngu/ipython console in module()

 /home/mvngu/ipython console in EEbuild(bound)

 NameError: global name 'q2' is not defined

 --
 Regards
 Minh Van Nguyen

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Display all XXXX possibilities? Problem

2010-11-08 Thread Robert Bradshaw
Sounds like you have a tab in there somewhere, it typically shouldn't
be doing this.

On Mon, Nov 8, 2010 at 7:27 AM, JJBWebb johnjackw...@gmail.com wrote:
 I'm trying to build a power series, and when I call the function to
 build it, sage responds Display all  possiblities? (y or n).

 I hit n, then the same command pops up and then computes the power
 series correctly.

 Is there some way to get it so I don't have to hit n (i.e. avoid the
 Display all ... completely) so I can automate this process?

 Thanks,
 -John

 --
 | Sage Version 4.2, Release Date: 2009-10-24                         |
 | Type notebook() for the GUI, and license() for information.        |
 --
 sage: P = 79
 sage: m = 2
 sage: upbound= integer_floor(P^m*(P-1)/10)+10
 sage: R.q = PowerSeriesRing(IntegerModRing(P^m),upbound)
 sage: def EEbuild(bound):
 :           EE = 1 - q -q2 +O(q^upbound)
 :   for i in range(2,bound+1):
 : EE=EE+(-1)^i*(q^((1/2)*i*(3*i+1))+q^((1/2)*i*(3*i-1)))
 :   return EE
 :
 sage: lil = integer_floor(sqrt(upbound*4/3)) + 10
 sage:
 sage: ee = EEbuild(lil)+O(q^upbound)
 Display all 1859 possibilities? (y or n)
 sage: ee = EEbuild(lil)+O(q^upbound)
 sage:

 --
 To post to this group, send email to sage-support@googlegroups.com
 To unsubscribe from this group, send email to 
 sage-support+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-support
 URL: http://www.sagemath.org


-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] radical ideals check

2010-11-08 Thread andrew ewart
I want to write code  that does the following
Given ideals I,J in CC[x1,...,xn]
check if Radical(I+J)=Radical(I)+Radical(J)
also maybe throw in an example of yes and no just to see it working

Radical(I)={f:there is an m such that f^m is in I} (f is a polynomial
of CC[x1,...,xn]
also Radical(I)=I(V(I)) by Nullstellensatz

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Display all XXXX possibilities? Problem

2010-11-08 Thread Minh Nguyen
Hi John,

On Tue, Nov 9, 2010 at 2:27 AM, JJBWebb johnjackw...@gmail.com wrote:
 I'm trying to build a power series, and when I call the function to
 build it, sage responds Display all  possiblities? (y or n).

 I hit n, then the same command pops up and then computes the power
 series correctly.

It works fine for me with Sage 4.6:

sage: version()
'Sage Version 4.6, Release Date: 2010-10-30'
sage: P = 79; m = 2
sage: upbound= integer_floor(P^m * (P-1) / 10) + 10
sage: R.q = PowerSeriesRing(IntegerModRing(P^m), upbound)
sage: def EEbuild(bound):
: EE = 1 - q - q^2 + O(q^upbound)
: for i in range(2,bound+1):
: EE=EE+(-1)^i*(q^((1/2)*i*(3*i+1))+q^((1/2)*i*(3*i-1)))
: return EE
:
sage: lil = integer_floor(sqrt(upbound*4/3)) + 10
sage: ee = EEbuild(lil)+O(q^upbound)
sage: ee = EEbuild(lil)+O(q^upbound)


 Is there some way to get it so I don't have to hit n (i.e. avoid the
 Display all ... completely) so I can automate this process?

Ensure you don't use tabs.

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: problem with integral (Maxima)

2010-11-08 Thread JamesHDavenport
My maxima (5.19.2) also generates an error here.

On Nov 8, 8:24 am, pong wypon...@gmail.com wrote:
 I have encountered a problem in using integral

 integral(x * sqrt((-2*cos(x))^2 + (2*sin(x))^2), x, 0, pi)

 correctly gives pi^2

 but

 integral(sin(x) * sqrt((-2*cos(x))^2 + (2*sin(x))^2), x, 0, pi)

 results in a complaint that Maxima encountered a Lisp error: 2 is not
 of the type LIST.

 Why so? Any help?

 Thanks in advance

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Display all XXXX possibilities? Problem

2010-11-08 Thread JJBWebb
There was a tab there. . .

Thank you for your help.

On Nov 8, 1:35 pm, Minh Nguyen nguyenmi...@gmail.com wrote:
 Hi John,

 On Tue, Nov 9, 2010 at 2:27 AM, JJBWebb johnjackw...@gmail.com wrote:
  I'm trying to build a power series, and when I call the function to
  build it, sage responds Display all  possiblities? (y or n).

  I hit n, then the same command pops up and then computes the power
  series correctly.

 It works fine for me with Sage 4.6:

 sage: version()
 'Sage Version 4.6, Release Date: 2010-10-30'
 sage: P = 79; m = 2
 sage: upbound= integer_floor(P^m * (P-1) / 10) + 10
 sage: R.q = PowerSeriesRing(IntegerModRing(P^m), upbound)
 sage: def EEbuild(bound):
 :     EE = 1 - q - q^2 + O(q^upbound)
 :     for i in range(2,bound+1):
 :         EE=EE+(-1)^i*(q^((1/2)*i*(3*i+1))+q^((1/2)*i*(3*i-1)))
 :     return EE
 :
 sage: lil = integer_floor(sqrt(upbound*4/3)) + 10
 sage: ee = EEbuild(lil)+O(q^upbound)
 sage: ee = EEbuild(lil)+O(q^upbound)

  Is there some way to get it so I don't have to hit n (i.e. avoid the
  Display all ... completely) so I can automate this process?

 Ensure you don't use tabs.

 --
 Regards
 Minh Van Nguyen

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: 2D plot looks wrong in sage

2010-11-08 Thread Karsten
I just tested the following:
plot(arrow((-0.03,-0.03),(6,6)))
which corrects the problem and makes it seem as if the arrow
actually starts from (0,0).
Is this intended?

On 8 Nov., 23:46, Karsten karste...@gmail.com wrote:
 Thanks! This corrects plotting the sine and cosine functions.
 But there is no difference when plotting arrows, except the fuzzier
 axes you mentioned.
 Any ideas about that one?

 I really prefer plotting to look as it should with fuzzier axes since
 otherwise sage can not be used to present graphs for other people.

 On 8 Nov., 19:37, Jason Grout jason-s...@creativetrax.com wrote:







  On 11/8/10 5:00 PM, Karsten wrote:

   I am a beginner using sage, and I have encountered a problem using the
   plot function. Plotting a simple sine or cosine function is not very
   precise:

   t=var('t')
   v=plot(sin(t),-pi,pi

   The function is clearly positive in t=-pi, where it should be zero.
   The mistake becomes even more clear when setting line thickness to 99:

   t=var('t')
   v=plot(sin(t),-pi,pi,thickness=99)

   In this case when x=0 the line is crossing 1 in the upper side and not
   -1 in the lower side.

   This problem occurs in all functions i have encountered so far, as if
   the function is displayed 1 or 2 pixels off. It's even worse when
   plotting arrows:

   plot(arrow((0,0), (2,3)))

   Here the arrow is clearly not starting in (0,0) as it should.

   Is there a solution for this kind of problem?

  Yes.  It's a tradeoff between sharper graphics and rounding issues with
  pixels in plots.  IIRC, the basic issue is that horizontal and vertical
  lines are snapped to the nearest pixel, so that they aren't
  anti-aliased and fuzzy.

  This has been investigated quite a bit at:

 http://trac.sagemath.org/sage_trac/ticket/7808

  In short, you can do:

  import matplotlib
  matplotlib.rcParams['path.snap'] = False

  This will make horizontal and vertical lines (like the axes) not snap to
  the nearest pixel.  Things may be a bit fuzzier, though.

  Thanks,

  Jason

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Service Temporarily Unavailable

2010-11-08 Thread Rolandb
Hi,

I got the following message using Firefox with Sage 4.5.3 via VM 3.1.1
build-282343.

Service Temporarily Unavailable

The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.
Apache/2.2.12 (Ubuntu) Server at 192.168.231.128 Port 80

Also starting Sage in VM-player (Ubuntu) is strange. It shows only a
flash of comments (can't read it) and then the application closes.

I'm especially worried that I cannot reach anymore my workbook
files

Any help is much appreciated!

Roland

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org