[sage-support] Re: why is this contour integral wrong?

2011-12-05 Thread achrzesz


On Dec 5, 5:31 am, Dan Drake dr...@kaist.edu wrote:
 I keep wondering whether Sage is making a mistake, or I'm not
 understanding complex analysis. I'm a little afraid to learn the answer.
 :)

 Take f(z) = (z-I)*(z-1)^2/(z-(-1/2-I/3)). It's analytic everywhere
 except at -1/2-I/3, where it has a simple pole. So, if I integrate over
 a circle centered at 0 of radius, say, 2, the answer should be

 2*pi*I*(residue of f at -1/2 - I/3),

 which is pi*(181/27 + 19*I/36). However, when I try to do the contour
 integral, I get:

 sage: integrate(f(2*exp(I*t)) * 2*I*exp(I*t), (t, 0, 2*pi))
 0

 even though the contour encloses the pole. It works if I center the
 circle around the pole:

 sage: integrate(f(-1/2-I/3 + exp(I*t)) * I*exp(I*t), (t, 0, 2*pi))
 (19/36*I + 181/27)*pi

 and also if I integrate over the square with vertices 1+i, 1-i, -1-i,
 -1+i. What's wrong with the circle at the origin?

 Note that Mathematica gets this right, although you need to ask for full
 simplification: with f[z_] = (z-I)*(z-1)^2/(z-(-1/2-I/3)), you get

 In[5]:= Integrate[f[2*Exp[I*t]] * 2*I*Exp[I*t], {t, 0, 2*Pi}]//FullSimplify

          181   19 I
 Out[5]= (--- + ) Pi
          27     36

 Any ideas?

 Dan

 --
 ---  Dan Drake
 -  http://mathsci.kaist.ac.kr/~drake
 ---

  signature.asc
  1KViewDownload

sage: maxima('rectform(2*%pi*%i*residue((z-%i)*(z-1)^2/(z-(-1/2-%i/
3)),z,-1/2-%i/3))').sage()
(19/36*I + 181/27)*pi

-- 
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] Re: Win 7 64 Host and SAGE/Fedora guest on VMware or Virtualbox

2011-12-05 Thread Carel van Dam
I'm doing my masters at the moment and I plan on running sage quite a bit
for now, both via the VM and a local linux install. I can try one image a
month for you guys (The cap is a bit of an issue), and I'll try break each
distro during my coffee breaks :P May be it'd help to setup a page on what
to do when X happens :) I'll read through the links you've sent a little
later. Thanks for the assistance once again.

On Fri, Dec 2, 2011 at 10:28 AM, emil emil.widm...@gmail.com wrote:



 On Dec 1, 11:42 pm, Carel van Dam carelv...@gmail.com wrote:
  Hi Mr. Widmann and Mr Braun,
 
  Thanks for your responses, sorry my reply has been slow. I'll try out
 your
  distro during the week Mr. Widmann, I ran out of cap last month :S. The
  Read Me I was referring to was both of the Read Me's on the Sage download
  site. I can't remember which one I'm afraid.
 
  As to the *.ovf, I got that by extracting the *.ova file, some old
  instructions I found on google told me to do that :S I'm now using the
  OVA's as supplied.
 
  In the *.ova, I had er... Sage 4.7.1, the problem still persists, some
 how
  the network settings were broken when I played around with the VM router
  File  Preferrences (Ctrl+G)  Network  Virtual Box Adapter (Select) 
  Edit (Space)  make changes applicable to your system.
  The network settings for the VM as per Mr. Braun's instructions are also
 to
  do with it.
 
  Since My last e-mail and your replies I got the 4.7.2 ova and the problem
  seems to have fixed itself I also installed  an Open SUSE VM to check I
  could get the network working with the VM and this seemed to work fine,
  both using NAT and the Bridged adaptor.
 
  Yesterday when I took the PC to another network, that broke the sage VM
  again. I fixed it this time by deleting the VM and re-importing, you
 loose
  your files that way but it atleast gets you running again. I believe the
  problem is with virtualbox and not the distribution, so thank you for
 your
  time spent helping me. I'll keep pocking around a bit, If I find anything
  that may be of use to some one who reads this mailing list then I'll
 reply
  here again, mostly because I've seen this question asked a few times on
 the
  web but it's seldomly replied to/solved.
 
  regards,
 
  Carel

 Hello Mr. van Dam,

 thank you for your detailed response. It is very helpful. The
 developement of the virtual machine image - although the most popular
 distribution of sage -
 is still kind of a fringe topic in sage developement. To have more
 people contributing, even if it is just short feedback about arising
 problems, could make an considerable impact about the quality of this
 product (and I explicitly include documentation/troubleshooting as one
 of the most important things).

 You are right that using virtualisation has its own tricks and
 pitfalls. About your problem with the lost net connection: I am
 shooting in the blue here, but it could be related to an existing MAC
 adress of the VM and some settings in the /etc/udev folder.

 Please read here:

 http://www.linuxquestions.org/questions/debian-26/no-network-on-virtualbox-udev-problem-822023/
 https://www.virtualbox.org/ticket/2286
 https://forums.virtualbox.org/viewtopic.php?t=7749highlight=udev

 If the network connectivity is lost I sometimes had success by just
 going to the network section of the Virtual Box GUI and unselect and
 reselect the adapter.

 Sometimes there are other issues - the last days and I installed and
 uninstalled VMs repeadetly. At one point - network was not working and
 I had absolutely no clue why - I had to log into my router because the
 dhcpd server had run out of possible new adresses and I had to
 increase the available pool - I don't think this was the problem in
 your case, just to show that there are some hard to find pitfalls.

 To improve and ease the distribution of the sage VM I built an
 integrated VirtualBox Sage VM installer the last days. To develope
 this further I need some feedback and testers. I know this needs some
 commitment of time and Bandwith but it is just a humble invitation to
 help to make sage an easier experience for a lot of users.

 I have announced this installer and the download link (650 MB) here:

 http://groups.google.com/group/sage-windows/browse_thread/thread/ca801cbfc5b9170d

 kind regards
 emil





 --
 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] Re: Win 7 64 Host and SAGE/Fedora guest on VMware or Virtualbox

2011-12-05 Thread emil
On Dec 5, 9:14 am, Carel van Dam carelv...@gmail.com wrote:
 I'm doing my masters at the moment and I plan on running sage quite a bit
 for now, both via the VM and a local linux install. I can try one image a
 month for you guys (The cap is a bit of an issue), and I'll try break each
 distro during my coffee breaks :P May be it'd help to setup a page on what
 to do when X happens :)

That sounds great!

about the site - it would be an idea to expand
http://wiki.sagemath.org/faq#How_do_I_run_Sage_with_VirtualBox.3F
there is already a small pool of questions here and also on
ask.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] Unicode characters in axes labels?

2011-12-05 Thread Eugene Goldberg
Hello!



I am trying to use unicode characters in axes labels and it fails with
exception:

P = plot_step_function([(i,prime_pi(i)) for i in
range(20)],thickness=2,color='black')
P.show(axes=False,frame=True,axes_labels=('текс','x'))

Traceback (most recent call last):
  File stdin, line 1, in module
  File _sage_input_28.py, line 10, in module
exec compile(u'open(___code___.py,w).write(# -*- coding:
utf-8 -*-\\n +
_support_.preparse_worksheet_cell(base64.b64decode(UC5zaG93KGF4ZXM9RmFsc2UsZnJhbWU9VHJ1ZSxheGVzX2xhYmVscz0oJ9GC0LXQutGBJywneCcpKQ==),globals())
+\\n); execfile(os.path.abspath(___code___.py))
  File , line 1, in module

  File /tmp/tmpzOkGkv/___code___.py, line 2, in module
exec
compile(uP.show(axes=False,frame=True,axes_labels=('\u0442\u0435\u043a
\u0441','x')) + '\n', '', 'single')
  File , line 1, in module

  File /home/sage/sage/local/lib/python2.6/site-packages/sage/misc/
decorators.py, line 456, in wrapper
return func(*args, **kwds)
  File /home/sage/sage/local/lib/python2.6/site-packages/sage/plot/
plot.py, line 1750, in show
self.save(**kwds)
  File /home/sage/sage/local/lib/python2.6/site-packages/sage/misc/
decorators.py, line 456, in wrapper
return func(*args, **kwds)
  File /home/sage/sage/local/lib/python2.6/site-packages/sage/plot/
plot.py, line 2484, in save
transparent=transparent)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
figure.py, line 1084, in savefig
self.canvas.print_figure(*args, **kwargs)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
backend_bases.py, line 1889, in print_figure
**kwargs)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
backends/backend_agg.py, line 438, in print_png
FigureCanvasAgg.draw(self)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
backends/backend_agg.py, line 394, in draw
self.figure.draw(self.renderer)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
artist.py, line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
figure.py, line 798, in draw
func(*args)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
artist.py, line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
axes.py, line 1946, in draw
a.draw(renderer)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
artist.py, line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
axis.py, line 1032, in draw
self.label.draw(renderer)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
artist.py, line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
text.py, line 526, in draw
bbox, info = self._get_layout(renderer)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
text.py, line 305, in _get_layout
clean_line, ismath = self.is_math_text(line)
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
text.py, line 989, in is_math_text
if cbook.is_math_text(s):
  File /home/sage/sage/local/lib/python2.6/site-packages/matplotlib/
cbook.py, line 1793, in is_math_text
s = unicode(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position
0: ordinal not in range(128)

I found this topic:
https://groups.google.com/group/sage-support/browse_thread/thread/9908f1869c7d7f45/1cc9473c667c162c?hl=enlnk=gstq=unicode+axes+labels#1cc9473c667c162c
No responses :(

Could anyone please suggest me something to workaround this problem?

-- 
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: why is this contour integral wrong?

2011-12-05 Thread achrzesz


On Dec 5, 10:04 am, achrzesz achrz...@wp.pl wrote:
 On Dec 5, 5:31 am, Dan Drake dr...@kaist.edu wrote:



  I keep wondering whether Sage is making a mistake, or I'm not
  understanding complex analysis. I'm a little afraid to learn the answer.
  :)

  Take f(z) = (z-I)*(z-1)^2/(z-(-1/2-I/3)). It's analytic everywhere
  except at -1/2-I/3, where it has a simple pole. So, if I integrate over
  a circle centered at 0 of radius, say, 2, the answer should be

  2*pi*I*(residue of f at -1/2 - I/3),

  which is pi*(181/27 + 19*I/36). However, when I try to do the contour
  integral, I get:

  sage: integrate(f(2*exp(I*t)) * 2*I*exp(I*t), (t, 0, 2*pi))
  0

  even though the contour encloses the pole. It works if I center the
  circle around the pole:

  sage: integrate(f(-1/2-I/3 + exp(I*t)) * I*exp(I*t), (t, 0, 2*pi))
  (19/36*I + 181/27)*pi

  and also if I integrate over the square with vertices 1+i, 1-i, -1-i,
  -1+i. What's wrong with the circle at the origin?

  Note that Mathematica gets this right, although you need to ask for full
  simplification: with f[z_] = (z-I)*(z-1)^2/(z-(-1/2-I/3)), you get

  In[5]:= Integrate[f[2*Exp[I*t]] * 2*I*Exp[I*t], {t, 0, 2*Pi}]//FullSimplify

           181   19 I
  Out[5]= (--- + ) Pi
           27     36

  Any ideas?

  Dan

  --
  ---  Dan Drake
  -  http://mathsci.kaist.ac.kr/~drake
  ---

   signature.asc
   1KViewDownload

 sage: maxima('rectform(2*%pi*%i*residue((z-%i)*(z-1)^2/(z-(-1/2-%i/
 3)),z,-1/2-%i/3))').sage()
 (19/36*I + 181/27)*pi

sage: f(z) = (z-I)*(z-1)^2/(z-(-1/2-I/3))
sage: 2*pi*I*f(z).maxima_methods().residue(z,-1/2 - I/3)
(19/36*I + 181/27)*pi

-- 
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] Define polynomial rings of given variables

2011-12-05 Thread Subhadeep Banik
If I have a boolean  expression of a certain number of variables, how
do I define a polynomial ring with them.. For example, let
(x0,x1,x2,x3,x4,x5,x6,x7) be a set of variables, and I have  an
expression S = x0 + x1*x3 + x7
I need to define the polynomial ring
R.x0,x1,x3,x7=BooleanPolynomialRing(4)

This exercise is fine, if the number of variables is small , but what
is the solution if the number of variables is large.

Thank You

Subhadeep Banik

Senior Research Fellow
Applied Statistics Unit
Indian Statistical Institute Kolkata
Phone : 91 9433037829 (M)
            91 33 - 25741829 (H)

-- 
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: Define polynomial rings of given variables

2011-12-05 Thread Nils Bruin
R=BooleanPolynomialRing(100,['x'+str(i) for i in [1..100]])
R.inject_variables()# if you don't really need the identifiers in
Python's namespace, better skip this

On Dec 5, 6:18 am, Subhadeep Banik monsieurlel...@gmail.com wrote:
 If I have a boolean  expression of a certain number of variables, how
 do I define a polynomial ring with them.. For example, let
 (x0,x1,x2,x3,x4,x5,x6,x7) be a set of variables, and I have  an
 expression S = x0 + x1*x3 + x7
 I need to define the polynomial ring
 R.x0,x1,x3,x7=BooleanPolynomialRing(4)

 This exercise is fine, if the number of variables is small , but what
 is the solution if the number of variables is large.

 Thank You

 Subhadeep Banik
 
 Senior Research Fellow
 Applied Statistics Unit
 Indian Statistical Institute Kolkata
 Phone : 91 9433037829 (M)
             91 33 - 25741829 (H)

-- 
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: why is this contour integral wrong?

2011-12-05 Thread kcrisman
So it sounds like you should file a ticket, Dan.  Maybe we're just
sending it to Maxima wrong.


(%i9) f(z):=(z-%i)*(z-1)^2/(z-(-1/2-%i/3));
   2
   (z - %i) (z - 1)
(%o9)  f(z) := -
 - 1   %i
z - (--- - --)
  23
(%i14) display2d:false;

(%o14) false
(%i15) integrate(f(-1/2-%i/3+exp(%i*t))*%i*exp(%i*t),t,0,2*%pi);

(%o15) %i*((4*%i-13)/3-((724*%i-57)*%pi+144*%i-468)/108)

(%i17) rectform(%i*((4*%i-13)/3-((724*%i-57)*%pi+144*%i-468)/108));

(%o17) (724*%pi+144)/108+%i*(-(-57*%pi-468)/108-13/3)-4/3

Is this right?

-- 
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: Define polynomial rings of given variables

2011-12-05 Thread achrzesz


On Dec 5, 3:18 pm, Subhadeep Banik monsieurlel...@gmail.com wrote:
 If I have a boolean  expression of a certain number of variables, how
 do I define a polynomial ring with them.. For example, let
 (x0,x1,x2,x3,x4,x5,x6,x7) be a set of variables, and I have  an
 expression S = x0 + x1*x3 + x7
 I need to define the polynomial ring
 R.x0,x1,x3,x7=BooleanPolynomialRing(4)

 This exercise is fine, if the number of variables is small , but what
 is the solution if the number of variables is large.

 Thank You

 Subhadeep Banik


If you need a polynomial ring with selected variables
then you can try for example

R=PolynomialRing(GF(2),'x',2^8)
x=R.gens()
S=x[253]+x[254]*x[255]
xx=S.variables()
l=len(xx)
P=BooleanPolynomialRing(l,map(str,xx))

Andrzej Chrzeszczyk



 
 Senior Research Fellow
 Applied Statistics Unit
 Indian Statistical Institute Kolkata
 Phone : 91 9433037829 (M)
             91 33 - 25741829 (H)

-- 
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] sagenb down

2011-12-05 Thread john_perry_usm
Hi

sagenb doesn't seem to be working. A student of mine is about to
defenestrate herself (her words) because it's not working.

If this is expected downtime; my apologies -- she wasn't supposed to
be using sagenb in the first place, but that's life. :-)

regards
john perry

-- 
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] sagenb down

2011-12-05 Thread D. S. McNeil
test.sagenb.org seems to be up, so if she has a saved local copy of a
worksheet, she could use that..


Doug

-- 
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] sagenb down

2011-12-05 Thread William Stein
On Dec 5, 2011 9:47 AM, john_perry_usm john.pe...@usm.edu wrote:

 Hi

 sagenb doesn't seem to be working. A student of mine is about to
 defenestrate herself (her words) because it's not working.

 If this is expected downtime; my apologies -- she wasn't supposed to
 be using sagenb in the first place, but that's life. :-)


I have just initiated restarting the server.

 regards
 john perry

 --
 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] Finding numerical solutions to an inequality in multiple variables

2011-12-05 Thread Cal
Hi, all,

I'm new here and new-ish to sage and I was hoping you could help me
with a rather complicated problem. My professor gave me this
inequality:

0  (2*n*(i+j+k))/(-k*n+j*(n-s)+i*s)  1

and he wants me to see if I can find solutions within the following
constraints: 0  s  n, i,j,k integers, and i = j+k, j = i+k, k=i
+j.

It seemed like it would be possible to get Sage to do this for me, and
sure enough, when i input:

sage: n = var('n')
sage: sage: s = var('s')
sage: sage: assume(s0)
sage: sage: assume(ns)
sage: sage: i = var('i')
sage: sage: j = var('j')
sage: sage: k = var('k')
sage: sage: assume(i,'integer')
sage: sage: assume(j,'integer')
sage: sage: assume(k,'integer')
sage: assume(i=j+k)
sage: assume(j=i+k)
sage: assume(k=i+j)
sage: solve((0  (2*n*(i+j+k))/(-k*n+j*(n-s)+i*s)  1),n)

I got a result, namely:

[[k  -i - j, 0  n, -i*s - j*n + j*s + k*n  0], [-i - j  k, n  0, -
i*s - j*n + j*s + k*n  0], [-i - j  k, 0  n, i*s + j*n - j*s - k*n
 0], [k  -i - j, n  0, i*s + j*n - j*s - k*n  0]]

My problem is, first, that I'm not sure the solutions are correct--
note that some of them have n  0, when I'm assuming the contrary (and
when I try to have it assume explicitly that n  0, Sage will tell me
that my assumption is redundant); and second, that I'm not sure how to
get specific numbers out of this. I've tried assigning specific values
to the variables, one by one, but I keep getting equations that don't
work, or simply []

Does anyone know what's going on, and if this problem is solvable in
sage?

Thank you!

Cal

-- 
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: sagenb down

2011-12-05 Thread Jason Grout

On 12/5/11 11:54 AM, William Stein wrote:


On Dec 5, 2011 9:47 AM, john_perry_usm john.pe...@usm.edu
mailto:john.pe...@usm.edu wrote:
 
  Hi
 
  sagenb doesn't seem to be working. A student of mine is about to
  defenestrate herself (her words) because it's not working.
 
  If this is expected downtime; my apologies -- she wasn't supposed to
  be using sagenb in the first place, but that's life. :-)
 

I have just initiated restarting the server.



It looks like it's another mess of filedescriptor errors:


2011-12-05 09:54:07-0800 [-] Unhandled Error
Traceback (most recent call last):
  File 
/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/Twisted-11.0.0-py2.6-linux-x86_64.egg/twisted/application/app.py, 
line 392, in startReactor

self.config, oldstdout, oldstderr, self.profiler, reactor)
  File 
/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/Twisted-11.0.0-py2.6-linux-x86_64.egg/twisted/application/app.py, 
line 313, in runReactorWithLogging

reactor.run()
  File 
/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/Twisted-11.0.0-py2.6-linux-x86_64.egg/twisted/internet/base.py, 
line 1162, in run

self.mainLoop()
  File 
/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/Twisted-11.0.0-py2.6-linux-x86_64.egg/twisted/internet/base.py, 
line 1174, in mainLoop

self.doIteration(t)
--- exception caught here ---
  File 
/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/Twisted-11.0.0-py2.6-linux-x86_64.egg/twisted/internet/selectreactor.py, 
line 104, in doSelect

[], timeout)
exceptions.ValueError: filedescriptor out of range in select()

2011-12-05 09:54:07-0800 [-] Malformed file descriptor found.  Preening 
lists.

2011-12-05 09:54:07-0800 [-] bad descriptor HTTPChannel #190108 on 


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] Re: Finding numerical solutions to an inequality in multiple variables

2011-12-05 Thread Volker Braun
I don't think maxima does polyhedral computations in its assume facility, 
so you probably get the wrong answer.

We do, however, have quite a lot of tools for polyhedral computations:

sage: P = Polyhedron(ieqs=[(1,2), (10,-7)])
sage: P
A 1-dimensional polyhedron in QQ^1 defined as the convex hull of 2 vertices
sage: P.Hrepresentation()
(An inequality (-7) x + 10 = 0, An inequality (2) x + 1 = 0)
sage: P.Vrepresentation()
(A vertex at (10/7), A vertex at (-1/2))
sage: P.integral_points()
((0), (1))

-- 
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: sagenb down

2011-12-05 Thread john_perry_usm
On Dec 5, 11:54 am, William Stein wst...@gmail.com wrote:
 On Dec 5, 2011 9:47 AM, john_perry_usm john.pe...@usm.edu wrote:

  sagenb doesn't seem to be working. A student of mine is about to
  defenestrate herself (her words) because it's not working.

 ...

 I have just initiated restarting the server.

Our windows thank you.

john

-- 
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: sagenb down

2011-12-05 Thread Jason Grout

On 12/5/11 11:47 AM, john_perry_usm wrote:

defenestrate herself (her words)


For the curious: http://en.wikipedia.org/wiki/Defenestration

Defenestration is the act of throwing someone or something out of a 
window.[1] The term defenestration was coined around the time of an 
incident in Prague Castle in the year 1618. The word comes from the 
Latin de- (down or away from) and fenestra (window or opening).[2] 
Likewise, it can also refer to the condition of being thrown out of a 
window, as in The Defenestration of Ermintrude Inch.[3]


(also http://www.merriam-webster.com/dictionary/defenestrate for those 
that don't trust wikipedia)


Wow.  What a great word.  I hope she doesn't defenestrate herself!

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


Re: [sage-support] Re: Jmol on Android tablet

2011-12-05 Thread William Stein
On Sat, Nov 26, 2011 at 10:12 PM, pong wypon...@gmail.com wrote:

 Thanks for the tips, but I would like to have live 3D-plots (ones
 that one can spin and drag around).

In theory, doing this (written by Bill Cauchois) should work, but it
doesn't work on Android:

   I = icosahedron()
   I.show(viewer='canvas3d')

The plot appears, but there is no way to rotate it around with your
finger. You can on a normal computer with a mouse, but unfortunately
this doesn't currently translate into touch (yet).

William



 On Nov 26, 6:56 pm, A. Jorge Garcia calcp...@aol.com wrote:
 pong wypon...@gmail.com wrote:

 Two days ago during Thanksgiving dinner, I tried showing SAGE notebook
 to my cousin who has an Android tablet. Well... I then realized that
 Jmol (or rather Java runtime environment) is not supported on android
 (at least not out of the box)

 My questions are:

 1) Has someone successfully run Jmol on an Android browser?

 There is a youtube clip showing Jmol 12.3 is working on 
 Android:http://www.youtube.com/watch?v=og-lXFnDU-w

 2) If so, what's the best way to make that happen?

 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 
 athttp://groups.google.com/group/sage-support
 URL:http://www.sagemath.org

 On my android phone, I use show(viewer=tachyon) instead of jmol.
 HTH,
 A. Jorge Garcia
 Applied Math and 
 CompScihttp://shadowfaxrant.blogspot.comhttp://www.youtube.com/calcpage2009
 Sent via DROID on Verizon Wireless

 --
 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



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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] Re: why is this contour integral wrong?

2011-12-05 Thread achrzesz


On Dec 5, 4:56 pm, kcrisman kcris...@gmail.com wrote:
 So it sounds like you should file a ticket, Dan.  Maybe we're just
 sending it to Maxima wrong.

 (%i9) f(z):=(z-%i)*(z-1)^2/(z-(-1/2-%i/3));
                                                    2
                                    (z - %i) (z - 1)
 (%o9)                      f(z) := -
                                          - 1   %i
                                     z - (--- - --)
                                           2    3
 (%i14) display2d:false;

 (%o14) false
 (%i15) integrate(f(-1/2-%i/3+exp(%i*t))*%i*exp(%i*t),t,0,2*%pi);

 (%o15) %i*((4*%i-13)/3-((724*%i-57)*%pi+144*%i-468)/108)

 (%i17) rectform(%i*((4*%i-13)/3-((724*%i-57)*%pi+144*%i-468)/108));

 (%o17) (724*%pi+144)/108+%i*(-(-57*%pi-468)/108-13/3)-4/3

 Is this right?

Applying expand(ratsimp( )); to your %o15 one can obtain Dan's result.

The problem is that the integral should not depend on the center of
the circle
containing the pole. It looks like maxima bug (?)

-- 
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: Finding numerical solutions to an inequality in multiple variables

2011-12-05 Thread Cal
That would explain why it wasn't working. I've never done polyhedral
computations before, but I will look at your example and the reference
manual and see what I can do!

Thank you!

On Dec 5, 1:45 pm, Volker Braun vbraun.n...@gmail.com wrote:
 I don't think maxima does polyhedral computations in its assume facility,
 so you probably get the wrong answer.

 We do, however, have quite a lot of tools for polyhedral computations:

 sage: P = Polyhedron(ieqs=[(1,2), (10,-7)])
 sage: P
 A 1-dimensional polyhedron in QQ^1 defined as the convex hull of 2 vertices
 sage: P.Hrepresentation()
 (An inequality (-7) x + 10 = 0, An inequality (2) x + 1 = 0)
 sage: P.Vrepresentation()
 (A vertex at (10/7), A vertex at (-1/2))
 sage: P.integral_points()
 ((0), (1))

-- 
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: computing the cup-product in the cohomology of a simplicial complex

2011-12-05 Thread Felix Breuer
Here is a first implementation of the cup product. I hope (of course) that 
the code is correct, but it is certainly not very idomatic. Any suggestions 
for improvement are welcome!

def cup_product(X,c1,dim1,c2,dim2):
d = dim1 + dim2 
faces1 = list(X.n_faces(dim1))
faces2 = list(X.n_faces(dim2))
faces = list(X.n_faces(d))
res = []
for sigma in faces:
sigma1 = Simplex(sigma[0:dim1+1])
sigma2 = Simplex(sigma[dim1:d+1])
index1 = faces1.index(sigma1)
index2 = faces2.index(sigma2)
coeff1 = c1[index1]
coeff2 = c2[index2]
coeff = coeff1 * coeff2
res.append(coeff)
return vector(tuple(res))

To use it on the Torus, for example, you can do this:

X = simplicial_complexes.Torus()
C = X.chain_complex(cochain=True)
H = C.homology(generators=True)
gen1 = H[1][1][0]
gen2 = H[1][1][1]
d1 = C.differential()[1]
q = cup_product(X,gen1,1,gen1,1)
print q
print d1.solve_right(q)
p = cup_product(X,gen1,1,gen2,1)
print p
print d1.solve_right(p) #error

The last line throws an error, because p is not in the image of d1. This 
shows that p, the cup product of the two generator of the cohomology group 
in degree 1, is a non-trivial element of the cohomology group in degree 2.

If there is interest, I would be willing to put in the additional work to 
add this function to Sage. But for that I would need to learn about the all 
the other issues that I don't know anything about but that I should take 
care of first :)

Cheers,
Felix

-- 
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] some problem with installation on winxp

2011-12-05 Thread issacnewton
Hi

I am trying to set up sage using vitualbox. What base memory should I
set in virtualbox for the sage ? While setting up, I assigned 1024 MB
base memory. Later the Virtualbox keeps reminding me that base memory
is more than 50 % of total memory (1.74 GB) and there might be
problems.
I also don't know how to change the base memory in Virtualbox ? So
please let me know what base memory should be set and how to change
the already given amount in Virtualbox

Thanks

-- 
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