Re: [sage-support] Problem with sagetex with a large file (many sage calculations)

2012-01-19 Thread Dan Drake
On Fri, 16 Dec 2011 at 12:41PM -0800, Steven McKay wrote:
> Hi,
> I have been writing a large set of notes for Differential Equations,
> and have come across an annoying problem (that is probably my fault.)
> After adding enough sage constructions to my latex file, I started
> getting errors like:
> 
[...]
> 
> Which repeats over and over many times.  This is only for
> constructions using desolve_odeint, and only for the later sage
> constructions, not the earlier ones. *However*, the same sage code in
> a notebook runs as expected without errors.  So I know I don't have
> any errors in my code that is doing this. In fact, I took the sections
> with the "offending code" and compiled them separately in a smaller
> document, and the sage code ran correctly.
> 
> So, it seems as if I am overloading sage with too many calculations.
> This confuses me, however, because I thought sage did each calculation
> separately.

It does them separately, but all in one session.

I'm not sure what is happening here. Can you provide a minimal example
that demonstrates the problem? I've never seen anything like this, and
can't imagine why it would happen. 

Dan

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


signature.asc
Description: Digital signature


Re: [sage-support] Two problems using SageTex on Sage 4.7.2

2012-01-19 Thread Dan Drake
On Fri, 16 Dec 2011 at 03:54AM -0800, Anthony Wickstead wrote:
> The first, that I can work around although it is redious, is that
> sagetex when processing "test.tex" now produces "test.sagetex.sage"
> rather than "test.sage". When processed using remote-sagetex.py this
> puts plots into a directory "sage-plots-for-test.sagetex.tex".
> Unfortunately when running LaTeX on test.tex again LaTeX looks in
> "sage-plots-for-test.tex" for the plots. A rename can get around this
> but it is a bit of a pain.

remote-sagetex.py hasn't been maintained very much, and I'm actually a
bit surprised it even works. I've made a note to fix this, which won't
happen in the immediate future because of travel and the start of
classes. But it's on my lsit.

Dan

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


signature.asc
Description: Digital signature


Re: [sage-support] Issues with bessel function.

2012-01-19 Thread Michael Orlitzky

On 01/19/2012 05:57 PM, Eric Kangas wrote:

I have worked with bessel functions before and haven't had a problem
until now.

Code:
-
r,p,z,ro,gro,g,k = var('r, p, z,ro,gro,g,k')
g = 1; k = 1; ro = 1; gro = 1

def Psi(r,z): return lambda r,z: (r*bessel_J(1, g*r))/(ro*bessel_J(1,
gro))*cos(k*z) if y != 0 and t != 0 else infinity

Error:
-

Syntax Error


What are 'y' and 't'? When did it crash -- while you were typing it in, 
when Psi was called, or when the returned function was called?


I tried guessing at some inputs and haven't seen the error. If you could 
come up with a test case it would help!


--
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] Minor issue: Polynomial simplify, square roots

2012-01-19 Thread Michael Orlitzky

On 01/17/2012 04:54 AM, Jori Mantysalo wrote:

After saying

R.  = PolynomialRing(QQ)

both of these works:

expand ( (t-(5-sqrt(7))) * (t-(5+sqrt(7))) )
expand ( (t-(5-sqrt(7))) * (t-(5+sqrt(7))) )

and I got t^2 - 10*t + 18 and t^2 - 4*t + 1 as expected. However,

expand ( (t-(2-sqrt(3))) * (t-(2+sqrt(3))) * (t-(5-sqrt(7))) * (t-(5+sqrt(7))) )

does not work in a similar way. If I put ".simplify_full()" at the end of
the expression, I got simplified answer.

What is logic behind this?



Sometimes expanding a product simplifies it, and sometimes it doesn't. 
This is the smallest example I could come up with.


  sage: a,b = var('a,b')
  sage: f = a*(a+b)
  sage: f.expand()
  a^2 + a*b
  sage: f.simplify()
  (a + b)*a

Furthermore, sage automatically simplifies some *really* easy 
expressions like,


 sage: 1*a + 2*a
 3*a

That's why you get an answer with three terms in the first two cases. It 
won't automatically combine square roots, though:


  sage: sqrt(2)*a + sqrt(3)*a
  sqrt(2)*a + sqrt(3)*a

So the "simplified" answer in the first two cases was just lucky. In 
general you have to call simplify() or full_simplify().


--
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: Attribute error when multiplying elements of a quotient free algebra

2012-01-19 Thread Starx
Ah, I understand.  Thank you for your help :)

-Jim

On Jan 17, 4:10 pm, Maarten Derickx 
wrote:
> Dear Jim,
>
> The problem is that kQ.gens()[0] is not an element of the kQ.monoid() as is
> required as said in the documentation and the examples. To fix your problem:
>
> sage: kQ = FreeAlgebra(QQ ,2 , 'x')
> sage: gens=kQ.monoid().gens()
> sage: mons = [gens[0], gens[1], gens[0]*gens[1]]
> sage: mats = [Matrix(QQ,3,[1, 0, 0, 0, 1, 0, 0, 0, 0]), Matrix(QQ, 3, [0,
> 0,
> : 0, 0, 0, 0, 0, 0, 1])]
> sage: A = FreeAlgebraQuotient(kQ, mons, mats, 'x')
> sage: A.gens()[0]*A.gens()[1]
> 0

-- 
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] Issues with bessel function.

2012-01-19 Thread Eric Kangas
I have worked with bessel functions before and haven't had a problem
until now.

Code:
-
r,p,z,ro,gro,g,k = var('r, p, z,ro,gro,g,k')
g = 1; k = 1; ro = 1; gro = 1

def Psi(r,z): return lambda r,z: (r*bessel_J(1, g*r))/(ro*bessel_J(1,
gro))*cos(k*z) if y != 0 and t != 0 else infinity

Error:
-

Syntax Error
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (949, 0))

---
TypeError Traceback (most recent call last)

/home/nooniensoong97/ in ()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/calculus/all.pyc in symbolic_expression(x)
94 return vector(SR,x)
95 else:
---> 96 return SR(x)
97
98 import desolvers

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7326)()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3268)()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3171)()

/home/nooniensoong97/programs/sage-4.7.2/local/lib/python2.6/site-
packages/sage/symbolic/ring.so in
sage.symbolic.ring.SymbolicRing._element_constructor_ (sage/symbolic/
ring.cpp:4418)()

TypeError:


Some sort of syntax error I don't see any.

-- 
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: plots in 3d are not published?

2012-01-19 Thread LFS
Thanks so much! Linda

-- 
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] Order of a cyclic group

2012-01-19 Thread John Cremona
On 19 January 2012 15:39, Santanu Sarkar  wrote:
> Consider a polynomial f(x) over GF(2)[x]. How is it possible
> to find the order of the cyclic group generated by f(x)?

What do you mean by the group generated by the polynomial?  Do you
mean the group generated by a root of f (when f is irreducible)?

John Cremona

>
> --
> 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] Order of a cyclic group

2012-01-19 Thread Santanu Sarkar
Consider a polynomial f(x) over GF(2)[x]. How is it possible
to find the order of the cyclic group generated by f(x)?

-- 
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] sage build FAIL - An error occurred while installing patch-2.5.9.p2

2012-01-19 Thread Dan Drake
Having patch fail to build sounds truly strange. Is your source tarball
corrupt? I'd check the md5sum and make sure it's correct. 

If it is, then something bizarre is happening so that patch isn't
building addext.o, argmatch.o, and those other files.



Dan

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


signature.asc
Description: Digital signature


Re: [sage-support] sage build FAIL - An error occurred while installing patch-2.5.9.p2

2012-01-19 Thread Jeroen Demeyer
On 2012-01-18 21:48, Sean McDuffee wrote:
> Hi,
> 
> Trying to build sage on an Intel x86_64 4 core cpu based computer
> running Fedora 14.  GCC version 4.5.1.  It bombs on the following:
That's very weird and looks a bug with "make", building the executable
"patch" when the dependencies aren't built.  Does the problem persist if
you simply try "make" again?

-- 
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] sage build FAIL - An error occurred while installing patch-2.5.9.p2

2012-01-19 Thread Sean McDuffee
Hi,

Trying to build sage on an Intel x86_64 4 core cpu based computer running
Fedora 14.  GCC version 4.5.1.  It bombs on the following:

gcc -o patch -g -O2   addext.o argmatch.o backupfile.o basename.o dirname.o
getopt.o getopt1.o inp.o maketime.o partime.o patch.o pch.o quote.o
quotearg.o quotesys.o util.o version.o xmalloc.o
gcc: addext.o: No such file or directory
gcc: argmatch.o: No such file or directory
gcc: backupfile.o: No such file or directory
gcc: basename.o: No such file or directory
gcc: dirname.o: No such file or directory
gcc: getopt.o: No such file or directory
gcc: getopt1.o: No such file or directory
gcc: inp.o: No such file or directory
gcc: maketime.o: No such file or directory
gcc: partime.o: No such file or directory
gcc: patch.o: No such file or directory
gcc: pch.o: No such file or directory
gcc: quote.o: No such file or directory
gcc: quotearg.o: No such file or directory
gcc: quotesys.o: No such file or directory
gcc: util.o: No such file or directory
gcc: version.o: No such file or directory
gcc: xmalloc.o: No such file or directory
gcc: no input files
make[2]: *** [patch] Error 1
Error building GNU patch

real0m10.426s
user0m2.512s
sys0m3.755s
sage: An error occurred while installing patch-2.5.9.p2

My entire log is attached.  Hope you guys can help.  Sage sounds pretty
great.

Thanks,
Sean

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


patch-2.5.9.p2.log
Description: Binary data