[sage-support] Re: problem of using surf in SAGE online server 2

2008-09-20 Thread Mike Hansen
Hello, On Sat, Sep 20, 2008 at 3:47 PM, pong <[EMAIL PROTECTED]> wrote: > > >Thanks for the reply. If I want plot an algebraic curve using > SAGE, what should I do then? Any suggestion? For the above example, I would do something like: sage: var('x1,x2') (x1, x2) sage: implicit_plot(x1^3 -

[sage-support] Re: can't run a script on when using SAGE on Milnix.org server

2008-09-18 Thread Mike Hansen
On Thu, Sep 18, 2008 at 6:02 PM, pong <[EMAIL PROTECTED]> wrote: > > I have written an animation which runs fine in SAGE on my PC. > However, when I run the same script on Milnix.org server, I got an > error message: > > sh: convert: command not found > > what's the problem? any help? This is bec

[sage-support] Re: bug in limit()

2008-09-18 Thread Mike Hansen
On Thu, Sep 18, 2008 at 4:54 PM, Alex Raichev <[EMAIL PROTECTED]> wrote: > > Now, with the above in mind, how do you write a function to evaluate > that sine limit given a variable from the user? We know the following > does not work. > > sage: var('x') > x > sage: def limmy(w): > : retur

[sage-support] Re: bug in limit()

2008-09-17 Thread Mike Hansen
Hi Alex, > sage: limit(sin(y[0])/y[0],y[0]=0) > > File "", line 1 > SyntaxError: keyword can't be an expression (, line > 1) > > sage: w=x > sage: limit(sin(w)/w,x=0) > 1 > sage: limit(sin(w)/w,w=0) > sin(x)/x This is because keyword

[sage-support] Re: Is there a way to access the unsimplified form of a symbolic expression?

2008-09-16 Thread Mike Hansen
Hi Jason, > So until hit with an explicit simplify command, symbolic expressions > seem retain at least some information about how they were input. Is > there a way to get the input form of an expression back out? Can I > ever get sage to print something like > > sage: (x - x).some_devious_tric

[sage-support] Re: using "=="

2008-09-16 Thread Mike Hansen
Hi Bob, You can use the bool() function to turn an equation in to a True/False value. sage: q,j = var('q, j') sage: a = (2*j*2^(18*q) + 13*2^(18*q)/27 - 13/27) sage: b = (2^(18*q)*(2*j+0)+13*(2^(18*q)-1)/27) sage: a == b 2*j*2^(18*q) + 13*2^(18*q)/27 - 13/27 == 2*j*2^(18*q) + 13*(2^(18*q) - 1)/2

[sage-support] Re: efficient determinant of matrix over polynomial ring

2008-09-10 Thread Mike Hansen
Hello, On Wed, Sep 10, 2008 at 6:23 PM, phil <[EMAIL PROTECTED]> wrote: > This seems to scale very poorly with the number of variables. > Basically, it's impractical to compute determinants when there are > more than 4 variables. While the problem does become more computationally challenging, a

[sage-support] Re: SnapPeaPython

2008-09-10 Thread Mike Hansen
Hello, On Wed, Sep 10, 2008 at 5:45 PM, hypermonkey2 <[EMAIL PROTECTED]> wrote: > unable to execute gcc: No such file or directory > error: command 'gcc' failed with exit status 1 > > any ideas where this gcc problem comes from? It looks like you don't have gcc installed on your system. --Mike

[sage-support] Re: variable names for matrix elements

2008-09-09 Thread Mike Hansen
Hello, On Tue, Sep 9, 2008 at 8:03 PM, phil <[EMAIL PROTECTED]> wrote: > > Is there a way to create a matrix whose elements are variables in a > symbolic ring or polynomial ring without naming all the elements > manually? > For example, I've been doing something like: > vars('x11,x12,x21,x22') >

[sage-support] Re: Erratic behaviour with "Evaluate All" in a notebook

2008-09-07 Thread Mike Hansen
Hi Stan, On Wed, Sep 3, 2008 at 2:14 AM, Stan Schymanski <[EMAIL PROTECTED]> wrote: > > Has anyone had time to verify if this is a bug? I suspect that it > could be fixed quite easily and I think that it would be VERY helpful > to be able to do "Evaluate All" reliably in a notebook, as this could

[sage-support] Re: Upgrade to version 3.1.1

2008-09-05 Thread Mike Hansen
Hello, > Okay, here's another big problem that seems to have come with version > 3.1.1: > "Edit a copy" doesn't work any more on published worksheets! Sage > makes a copy, but I can't edit it. This is a big problem, as we're > working with several users. I fixed this a few days ago, and it will

[sage-support] Re: Memoizing methods.

2008-09-03 Thread Mike Hansen
Hi Adrian, I wrote some code to do this a few releases ago. It's the cached_method decorator in Sage. Here's your example: sage: class dog(): : def __init__(self, bark='guau'): : self._bark = bark : @cached_method : def bark(self): : sleep(5) ..

[sage-support] Re: Copying/moving worksheets

2008-09-02 Thread Mike Hansen
> Well, that's the thing; once one downloads the new VMWare image and > tries to put the worksheets back where they belong, one still needs to > look for them by hand, which of course would take an insane amount of > time - unless I'm missing something. So upgrading on VMWare is sort > of like mo

[sage-support] Re: Infinite sum

2008-08-30 Thread Mike Hansen
On Sat, Aug 30, 2008 at 11:15 AM, Robert Dodier <[EMAIL PROTECTED]> wrote: > Dunno if it matters but maybe you can handle this directly in Maxima. > > foo : sum (1/(k + m)^3, k, 1, inf); > > load (simplify_sum); > simplify_sum (foo); > => -psi[2](m+1)/2 > > ev (%, m=2); > => zeta(3)-9/8 > > ev (

[sage-support] Re: convert string to sage expression

2008-08-29 Thread Mike Hansen
Hello, On Fri, Aug 29, 2008 at 4:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I want to construct a set of equations using strings. For example: > > for i in range(0,10): > eq1="eq=x^"+str(i)+"-"+str(i) Is there a reason why you wanted to do it using strings? It's a bit cleaner/easier

[sage-support] Re: Plotting functions with asymptotes

2008-08-28 Thread Mike Hansen
Hello, On Thu, Aug 28, 2008 at 6:47 AM, kcrisman <[EMAIL PROTECTED]> wrote: > > Speaking of asymptotes, any ideas on > http://trac.sagemath.org/sage_trac/ticket/3907 > ? I would be glad to try it, but don't understand enough of how > infinity and _tasteful_ticks work in Sage. > ... > Very good!

[sage-support] Re: getting a list of points from a plot (was: Plotting functions with asymptotes)

2008-08-27 Thread Mike Hansen
Hi Dan, On Wed, Aug 27, 2008 at 5:13 PM, Dan Drake <[EMAIL PROTECTED]> wrote: > The "Plotting functions with asymptotes" thread reminded me of something > I've wondered for a while: is it possible to get access to the list of > points that a plot object uses? It's easy enough to make up my own li

[sage-support] Re: Plotting functions with asymptotes

2008-08-27 Thread Mike Hansen
Hello, On Tue, Aug 26, 2008 at 8:47 PM, kcrisman <[EMAIL PROTECTED]> wrote: > > There have been tons of great improvements to the plotting making > their way through trac lately. Do any of those changes for ranges > etc. deal with the very weird output one gets for e.g. > > sage: plot((x-1)/(x+2

[sage-support] Re: Plotting and constant functions

2008-08-25 Thread Mike Hansen
Hello all, > It would be nice if the plotting functions could be fixed. None of > these techniques works (easily) from the user level. I just put a patch up at #3952 which fixes many of these issues. Now you can do things like sage: plot(2, -2, 2) #horizontal line at y=2 sage: parametric_plot

[sage-support] Re: Plotting and constant functions

2008-08-21 Thread Mike Hansen
> For example, is there NO WAY to draw a horizontal or vertical line > using parametric_plot? This is one way: sage: def xt(t): return t sage: def yt(t): return 1 sage: parametric_plot((xt,yt), -2, 2) --Mike --~--~-~--~~~---~--~~ To post to this group, send emai

[sage-support] Re: Why standalone Python/Sage scripts take longer to run ?

2008-07-19 Thread Mike Hansen
Hi Shing, You can actually make HTTP calls to the Sage notebook using Robert Bradshaw's simple API. For example, the following is a (condensed) Python script which authenticates with a running Sage notebook. import urllib, re def get_url(url): h = urllib.urlopen(url); data = h.read(); h.clo

[sage-support] Re: Sage and Maple

2008-07-15 Thread Mike Hansen
>> Note that the list of completions is cached the very first time it is >> created so you may want to delete it from your ~/.sage/ directory. > > I see a binary file maple_commandlist_cache.sobj. Is this one? Yep, that's the one. --Mike --~--~-~--~~~---~--~~ To

[sage-support] Re: Sage and Maple

2008-07-15 Thread Mike Hansen
Hello Alejandro, > I would like to transfer these listings to a text file for a better > analysis of this output. Is there a simple way? If you run maple.trait_names(), you'll get a Python list where each entry is a string of the name. To see how that list is created, you'll want to do sage: m

[sage-support] Re: Spam bots

2008-07-15 Thread Mike Hansen
On Tue, Jul 15, 2008 at 4:55 PM, Alec Mihailovs <[EMAIL PROTECTED]> wrote: > That could happen, with probability 20%. I guess in the end I'm not sure what you wanted to accomplish with this thread. Are you saying that there is an individual associated to the Sage project that is spamming your wi

[sage-support] Re: Spam bots

2008-07-15 Thread Mike Hansen
> Still, the spam text contained it. I don't think that a bot was searching > for the pages in the wiki and randomly chose that one. My guess is that the spam bot wanted to assign its page to a category, and it can easily find the already existing categories on your wiki from http://mapleadvisor.

[sage-support] Re: Spam bots

2008-07-15 Thread Mike Hansen
On Tue, Jul 15, 2008 at 4:03 PM, Alec Mihailovs <[EMAIL PROTECTED]> wrote: > > Sage seems to be used for creating spam bots. In particular, the FrontPage > in Maple Wiki was corrupted yesterday from 193.53.87.109 with spam ending > with CategorySage, see > > http://mapleadvisor.com/cgi-bin/moin.cg

[sage-support] Re: Performance problem, and a more basic question.

2008-07-15 Thread Mike Hansen
> Very interesting... but, I think you sent me a copy of my worksheet... > Yours, very sincerely While the name is the same, it's a different worksheet. Anyways, here's the faster code: def NewtonInterpolation(x,y,f): poly=f[0] q=1 s=f[0:len(f)] stride=1 for k in range(len(f

[sage-support] Re: problem with sum()

2008-07-10 Thread Mike Hansen
> ah. I try to avoid using __repr__ because i was told that this is > supposed to return a string from which the object can be reconstructed > -- and i certainly don't want to go through all that trouble just for > what i need. Do you know what happens if __repr__ simply returns the > same as __st

[sage-support] Re: problem with sum()

2008-07-10 Thread Mike Hansen
Hello, > this is probably just a silly Python question, but let me try. I've > designed a little class that has a __add__() method, and it works fine > for expressions like x+y. However, sum() does not work on a list of > such objects ! do I need to do something else ? (in the meanwhile i go > re

[sage-support] Re: problems building matplotlib on Ubuntu 8.04

2008-07-08 Thread Mike Hansen
Hi Adam, Sorry for the delayed reply. I'm not exactly sure what's going on in your case, but I'll ask Michael Abshoff about it since he probably has a much better idea of what is going on. --Mike On Jul 3, 1:33 pm, Adam Webb <[EMAIL PROTECTED]> wrote: > Hi all, > > I have been having problems

[sage-support] Re: solve doesn't always solve

2008-07-08 Thread Mike Hansen
Hi Stan, I don't think there is any other way to solve an equation such as that in Sage. You can do it using Sage's interface to Maple (if you have it installed / access to it), but it's not as clean as it should be due to bug #3610. sage: var('wcnew,epsln,ysnew,delyu,sumsunew,sunlayersnew,dely

[sage-support] Re: NTL installation

2008-07-08 Thread Mike Hansen
Hello, What type of machine are you running this on? --Mike On Jul 6, 6:37 pm, Wim Verleyen <[EMAIL PROTECTED]> wrote: > Hello, > > ranlib ntl.a > make[2]: Leaving directory `/home/purplehat/tmp/sage-3.0.3/spkg/build/ > ntl-5.4.2.p3/src/src' > make[2]: Entering directory `/home/purplehat/tmp/sa

[sage-support] Re: Debian Etch: Error trying to plot

2008-07-07 Thread Mike Hansen
Hello, In order to figure things out, I think we need to know a bit more about your install. How did you install Sage? Did you use one of the binaries or did you build from source? What processor is your computer running? --Mike On Mon, Jul 7, 2008 at 3:59 PM, Alejandro Jakubi <[EMAIL PROTEC

[sage-support] Re: Accessing terms in an expression

2008-07-02 Thread Mike Hansen
Hi Phil, I don't think there is an official way to get at the terms, but here is something that works: sage: var('x,y') (x, y) sage: t = x^2 + y^2 sage: type(t) sage: t._operator sage: t._operands [x^2, y^2] sage: t._operands[0] x^2 --Mike On Wed, Jul 2, 2008 at 7:49 PM, phil <[EMAIL PROTECT

[sage-support] Re: variable number of arguments for a function

2008-06-30 Thread Mike Hansen
Hello, In Python you can use *args and **kwds in the function definition to match optional arguments and keyword arguments; args will be a tuple of the arguments and kwds will be a dictionary for the keyword arguments. For example, look at the behavior of the following function: sage: def f(*ar

[sage-support] Re: matrix, Singular -->SAGE

2008-06-30 Thread Mike Hansen
Hello Gema, You just need to run the following: sage: m.sage_matrix(QQ) [-6 5 4 3 0] [ 6 0 -2 -3 1] [ 6 -1 0 -3 2] [ 6 -1 -2 0 3] [-6 1 2 3 0] or you can replace ZZ with whatever ring you want the matrix to be over. --Mike On Mon, Jun 30, 2008 at 8:31 AM, gema m. <[EMAIL PROTEC

[sage-support] Re: group rings question

2008-06-29 Thread Mike Hansen
Hello, Sorry I didn't get in on this sooner -- I've been really busy with things this past week. Anwyays, CombinatorialAlgebra is getting a bit of an update, and the changes are on the sage-combinat patch repository. You can see a working group ring here: http://sage.math.washington.edu:8837/h

[sage-support] Re: Precision Problems

2008-06-23 Thread Mike Hansen
> Mike's solution is ok for the precision but doesn't work for our > little example log(2+a-2), because it still says - infty and in my > application it doesn't fit either. Doing log(2+a-2) instead of log(2-a-2) should work assuming that you have enough precision to avoid the cancellation problem

[sage-support] Re: Precision Problems

2008-06-20 Thread Mike Hansen
Hello, > while working a little with sage I encountered some problems sage has > concerning numerical precision at very small numbers. > I hope I can make my point with a little example. > > sage: a=1e-175 > sage: log(a) > -402.952391273958 There are a few issues at hand here. First, you have t

[sage-support] Re: coercion problem?

2008-06-02 Thread Mike Hansen
Hello, This is definitely not a problem with coercion -- it's a problem with the iterator for G. For example. try this: sage: z = iter(G) sage: z sage: z.next() [0 1] [1 0] sage: z.next() [0 1] [1 1] It takes quite a bit of time to do each .next() which makes me suspect that something silly i

[sage-support] Re: bar chart fails in pylab

2008-06-01 Thread Mike Hansen
Hi Thomas, The issue comes from Pylab not knowing how to deal with instances of Sage's RealNumber class. When you do "4.0" from the command line, it gets changed into "RealNumber('4.0')". You can see this with the following commands: sage: preparse('4.0') "RealNumber('4.0')" In order to get P

[sage-support] Re: using parametric_plot for more than one function

2008-05-29 Thread Mike Hansen
Hi Andrew, You can do this by saving the plots to an object and then adding them together. sage: t = var('t') sage: p1 = parametric_plot( (s), sin(2*t)), 0, 2*pi, rgbcolor=hue(0.6) ) sage: p2 = parametric_plot( (cos(t), cos(3*t)), 0, 2*pi, rgbcolor=hue(0.3) ) sage: (p1+p2).show() One can do thi

[sage-support] Re: Notebook insecure by default

2008-05-26 Thread Mike Hansen
This issue came up before and is being tracked here: http://trac.sagemath.org/sage_trac/ticket/2827 --Mike On Mon, May 26, 2008 at 4:09 PM, Greg Landweber <[EMAIL PROTECTED]> wrote: > > Hello, > > I just noticed that as of Sage 3.0.1, the notebook has default > secure=False. While that is all we

[sage-support] Re: take Sage formulas into MSWord

2008-05-22 Thread Mike Hansen
> With html(latex(sage-output) we get html code, right? And MSWord is > among other things also a html-editor capable of reading and writing > html. So if I could save the sage html code somehow then I could try > whether MSWord can read and display it... > Now I just tested that and of course...

[sage-support] Re: take Sage formulas into MSWord

2008-05-22 Thread Mike Hansen
Maybe this? http://ooolatex.sourceforge.net/ --Mike On Thu, May 22, 2008 at 2:04 AM, roleic <[EMAIL PROTECTED]> wrote: > > On May 22, 9:56 am, "Mike Hansen" <[EMAIL PROTECTED]> wrote: >> On Thu, May 22, 2008 at 12:45 AM, roleic <[EMAIL PROTECTED]> wrote:

[sage-support] Re: take Sage formulas into MSWord

2008-05-22 Thread Mike Hansen
On Thu, May 22, 2008 at 12:45 AM, roleic <[EMAIL PROTECTED]> wrote: > > I can do html(latex(sage-output)) > What is the best way to import it into MSWord? I don't have Word, but maybe this might be useful: http://www.chikrii.com/ . There is no way to get latex for the input since it only makes s

[sage-support] Re: calling SAGE from C or Mathematica

2008-05-06 Thread Mike Hansen
I think you might have an easier time getting Pythonika ( http://dkbza.org/pythonika.html ) to do what you want. --Mike On Tue, May 6, 2008 at 11:41 PM, Amir <[EMAIL PROTECTED]> wrote: > > > Can I start a Sage session from C? I would need to pass commands, set > and get variables, and cleanly

[sage-support] Re: How to tell the installation script of setup for Sage not to installed python packages

2008-04-25 Thread Mike Hansen
Sage uses Python 2.5 while your system installation looks like 2.4. --Mike On Fri, Apr 25, 2008 at 6:25 PM, Hector Villafuerte <[EMAIL PROTECTED]> wrote: > > On Fri, Apr 25, 2008 at 7:20 PM, Hector Villafuerte <[EMAIL PROTECTED]> > wrote: > > On Wed, Apr 2, 2008 at 6:36 AM, William Stein <[EM

[sage-support] Re: parenthesis matching in notebook environment

2008-04-22 Thread Mike Hansen
Hi, Do you know a good example of an javascript text editor that does this? If you could search around, that would be most helpful. The biggest concern is probably the impact on performance; it's the same issue with things like syntax highlighting. --Mike On Tue, Apr 22, 2008 at 1:21 AM, pong

[sage-support] Re: Python decorators to implement Maple's "options remember"

2008-04-21 Thread Mike Hansen
Hello, Sage already has two decorators that provide this functionality. @func_persist will remember the computed values across Sage sessions since the results are written to a file @CachedFunction just stores the results in memory Note that all of the arguments to the function whose results you

[sage-support] Re: Evaluate matrix

2008-04-20 Thread Mike Hansen
Hi Aleks, You can just treat m as any symoblic expression and call it as a function. sage: x,y = var('x,y') sage: m = matrix([[cos(x),0],[0,-sin(y)]]) sage: m [ cos(x) 0] [ 0 -sin(y)] sage: m(x=1, y=2) [ cos(1) 0] [ 0 -sin(2)] sage: m.variables() (x, y) sage: m(1,2) [ cos(1

[sage-support] Re: Posets or others

2008-04-16 Thread Mike Hansen
On Wed, Apr 16, 2008 at 5:40 PM, kcrisman <[EMAIL PROTECTED]> wrote: > > Dear Group, > > What support is there for posets and/or totally ordered sets in Sage? > It doesn't seem to be in the Reference manual. Nor is it in the > Python documentation, but it seems like in order to do sorting Pyt

[sage-support] Re: GeneratorsOfGroup

2008-04-07 Thread Mike Hansen
Hi Becky, Did you have a particular group in mind? --Mike On Mon, Apr 7, 2008 at 3:19 PM, Becky <[EMAIL PROTECTED]> wrote: > > Is there a command for SAGE to write an element of a group in terms of > the group's generators? > -Becky > > > --~--~-~--~~~---~--~---

[sage-support] Re: code to find roots no longer works

2008-04-07 Thread Mike Hansen
Hi, The issue is that .roots() now returns tuples with the root and its multiplicity. You can see this if you look at v. You need to select the 0th entry of the tuple to raise to a power. sage: RDF = RealDoubleField() sage: R. = PolynomialRing(RDF) sage: # Let y be x^(1/9). sage: f = y + RDF(2

[sage-support] Re: [sage-devel] Re: [sage-support] PDE and Finite Element methods

2008-04-07 Thread Mike Hansen
On Mon, Apr 7, 2008 at 6:25 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > Yes, I did. This is the code developed by people at Simula. It works > nice, but it's quite difficult to install. I generally prefer smaller > tools, if I can get the job done. > > Ondrej Other than size and build issu

[sage-support] Re: Getting Started Questions

2008-04-06 Thread Mike Hansen
Hi James, Hello, On Sun, Apr 6, 2008 at 1:33 PM, James Hart <[EMAIL PROTECTED]> wrote: > > How should I be formatting this tuple if I want it to plot each graph > in a different color but in the same plot graph? > It works when it's all the same color i.e. The idiom that Sage uses is to const

[sage-support] Re: sage -notebook

2008-04-06 Thread Mike Hansen
Hi Chris, The problem is due to the way sage -notebook is handling options passed to it. This was pointed out to me by stefanv on IRC last night. I've made the following ticket for it http://trac.sagemath.org/sage_trac/ticket/2827. You can pass arbitrary strings to run with "sage -c". For exa

[sage-support] Re: feature request ...

2008-04-03 Thread Mike Hansen
Hello, > sage: r = matrix(SR, 4, 4, [[21,17,6,8], [-5,-1,-6,-3], [4,4,16,2], > [2,3,-4,-1]]) > sage: r.exp() > . This is happening since Maxima is failing to do the computation for reasons that I don't know. I suppose it wouldn't be too difficult to write our own matrix exponentiation.

[sage-support] Re: Genus calculation

2008-04-03 Thread Mike Hansen
e to cycle these partitions > through this calculation. I can get the partitions and do it all by > hand, but that's an awful pain. > > ~Erick > > > > On Apr 3, 5:51 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > > Hi Erick, > > >

[sage-support] Re: Genus calculation

2008-04-03 Thread Mike Hansen
Hi Erick, How do you calculate the delta invariant? (This is not my area of math.) How large of m and n do you want to work with? For example, here is some Sage code to generate all the integer partitions of 40: sage: time l = Partitions(40).list() CPU times: user 0.50 s, sys: 0.03 s, total:

[sage-support] Re: feature request ...

2008-04-02 Thread Mike Hansen
Hi Georg, There is currently support for taking the matrix exponential of a symbolic matrix already in Sage since it is using Maxima in the background. I suppose that this should be extended to other types of matrices. sage: matrix(SR, 3, 3, [[21,17,6],[-5,-1,-6],[4,4,16]]).exp() [ (13*e^16 -

[sage-support] Re: SAGE-2.10.4 Install Problems

2008-03-31 Thread Mike Hansen
Hi Daryl, > --- > Problem 1: TEST FAILURE This was a known problem ( http://trac.sagemath.org/sage_trac/ticket/2722 ). It was fixed in Sage 2.11 which was released today. > >

[sage-support] Re: Problem to access C code

2008-03-30 Thread Mike Hansen
Hello, What version of Sage are you using? I tried this on my local machine and can't duplicate the error that you're getting. --Mike On Sun, Mar 30, 2008 at 12:44 PM, bourba <[EMAIL PROTECTED]> wrote: > > Hello. > > I would like to access external C code so I have > exactly followed the ex

[sage-support] Re: typesetting matrices

2008-03-29 Thread Mike Hansen
AFAIK, you can't use LaTeX packages with jsmath. It just implements the standard mathmode. --Mike On Sat, Mar 29, 2008 at 1:18 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > > gerhard wrote: > > closely related question: > > I wanted to use easymat for a matrix display. jsmath seems to support

[sage-support] Re: random questions

2008-03-27 Thread Mike Hansen
Hello, > 1. The solve wrapper of maxima does some nice stuff symbolically, but > of course it can't handle everything, like > > sage: solve(x^5-x-12,x) > [0 == x^5 - x - 12] > > which makes sense! But I poked around a little for a numerical > approximation of solutions command and didn't

[sage-support] Re: solve()

2008-03-24 Thread Mike Hansen
I don't know of any way to do it using solve(). What you're really wanting to do is use the Chinese Remainder Theorem. After removing redundant equations, you can do the following: sage: a = [2,3,4] sage: b = [3,4,5] sage: CRT_list(a,b) 59 sage: lcm(b) 60 That being said, I think the behavior

[sage-support] Re: MAC PC configuration problem.

2008-03-05 Thread Mike Hansen
Hi Neal, When you start up the notebook on the Mac, pass the option server='192.168.1.103' and then you should able to access it on you Windows box by going to https://192.168.1.103:8000 . Let me know if that works. --Mike On Wed, Mar 5, 2008 at 8:06 AM, Neal <[EMAIL PROTECTED]> wrote: > > I

[sage-support] Re: Spline question

2008-03-04 Thread Mike Hansen
On Tue, Mar 4, 2008 at 8:03 PM, dean moore <[EMAIL PROTECTED]> wrote: > I'm trying to spline the unit circle. The graph looks like a polynomial, > not a fit to > the unit circle. > Well, you're going to have some problems using spline since it does a univariate polynomial spline interpolation. W

[sage-support] Re: Spline question

2008-03-04 Thread Mike Hansen
Maybe I'm missing something, but what is your question? --Mike On Tue, Mar 4, 2008 at 12:00 PM, dean moore <[EMAIL PROTECTED]> wrote: > Playing with splines for other reasons, I found what I beat down to the > following snippet (see attached) > > v = [] # Will hold point

[sage-support] Re: Why does "==" not return True or False?

2008-02-08 Thread Mike Hansen
Hello, > You and John explained that "x==x" returns an equation since the > underlying maxima system does. > So, why does maxima('x')==maxima('x') return True? > And why maxima('x==x') freezes? When John said that the underlying system (maxima) uses that construction, he didn't mean it _literall

[sage-support] Re: Why does "==" not return True or False?

2008-02-08 Thread Mike Hansen
Hi Simon, > That's to say, the expressions are displayed in the same canonical > form, but "==" does not return True. This is the desired behavior in Sage with symbolic objects -- it returns the equation you specified. You can get a Boolean with bool(). sage: eq = ((-x^4-1)/(x^2)) == ((x^4+1)/

[sage-support] Re: Help with Sage install

2008-02-06 Thread Mike Hansen
Hi Jimmy, It looks like you downloaded the 10.5 (Leopard) binary when you are running OS X 10.4 (Tiger). If this is the case, then you should try downloading the binary for 10.4. --Mike On Feb 6, 2008 5:09 PM, Jimmy Crockett <[EMAIL PROTECTED]> wrote: > > > I downloaded Sage and followed steps

[sage-support] Re: Error calling plots.

2008-02-04 Thread Mike Hansen
Hello, > /usr/lib/firefox/firefox-bin: symbol lookup error: /usr/lib/libxml2.so. > 2: undefined symbol: gzopen64 This looks like this bug: https://bugs.launchpad.net/ubuntu/+source/libxml2/+bug/151045 --Mike --~--~-~--~~~---~--~~ To post to this group, send emai

[sage-support] Re: Taylor series of a matrix

2008-02-02 Thread Mike Hansen
> To easily see the coefficients of each > term in the taylor polynomial? Yes, that would be the reason why in this case. --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

[sage-support] Re: Taylor series of a matrix

2008-02-02 Thread Mike Hansen
Hello, Here is an example of the underlying problem sage: a = -x/(2*x-4) sage: e = lambda e: taylor(e,x,3,4) sage: e(a) -3/2 + x - 3 - (x - 3)^2 + (x - 3)^3 - (x - 3)^4 sage: type(_) sage: b = e(a)._maxima_(); b x-(x-3)^4+(x-3)^3-(x-3)^2-9/2 What happens is that is able to construct a Symbolic

[sage-support] Re: old SAGE link at MSRI

2008-01-24 Thread Mike Hansen
I will ask people in the computing department tomorrow. --Mike On Jan 24, 2008 5:15 PM, David Joyner <[EMAIL PROTECTED]> wrote: > > Hi: > Just curious if there a way to update the SAGE link at > http://www.msri.org/about/computing/mathdocs > - David Joyner > > > > --~--~-~--~~--

[sage-support] Re: Putting parentheses around -1.

2008-01-23 Thread Mike Hansen
It is due to the fact that ^ has a higher precedence than - in Python. n(-1^(1/3)) is the same as n((-1^(1/3))). --Mike On Jan 23, 2008 5:04 PM, Ted Kosan <[EMAIL PROTECTED]> wrote: > > Does anyone have any thoughts on why the following 2 code samples give > different results?: > > #SAGE Version

[sage-support] Re: Elementary symmetric function expansion (bug?)

2008-01-20 Thread Mike Hansen
Hello, It turns out that symmetrica internal representation of the result has three variables (although the last one isn't used). The wrappers for symmetrica live under sage/libs/symmetrica . I've made this http://trac.sagemath.org/sage_trac/ticket/1873 and posted a patch there. The solution w

[sage-support] Re: SAGE at ISP etc

2008-01-19 Thread Mike Hansen
Hello, >I happen to have lots of space on an ISP site which I administer. > Is it possible to unarchive the sage package in the public_html folder > and start sage with a .php script to host educational notebooks? If you have shell acess on your ISP's machine than it's probably possible. >

[sage-support] Re: exponentiation bug?

2008-01-18 Thread Mike Hansen
On Jan 18, 2008 12:24 PM, Georg Grafendorfer <[EMAIL PROTECTED]> wrote: > OK, thanks, so sage-python just refers to the "sage-version" of python > instead of the systems own python version and nothing else !? Correct. --Mike --~--~-~--~~~---~--~~ To post to this

[sage-support] Re: exponentiation bug?

2008-01-18 Thread Mike Hansen
Hello, When you call, ./example.sage, it is being run by the Python interpreter with no preparsing done at all. Thus, 2^3 corresponds is interpreted as Python interprets it (not exponentiation). When you do "load example.sage", then it is preparsed by Sage, and your '^' gets changed to a "**" i

[sage-support] Re: show doesn't work under Ubuntu 7.10

2008-01-17 Thread Mike Hansen
Hello, It looks like this was fixed in 2.10 which will be out in a few hours. The ticket can be found here: http://sagetrac.org/sage_trac/ticket/975 The Sage Trac server is where we keep track of issues and development related things. --Mike On Jan 17, 2008 9:03 PM, Rick Pember <[EMAIL PROTEC

[sage-support] Re: hang problem and type question

2008-01-17 Thread Mike Hansen
Hi Kate, I actually just put a patch up for #1289 last night which should make it into 2.10. Here is the behavior with the patch: sage: madness(10.0, exp) 'Life is sane.' sage: madness(10, exp) 'Life is sane.' sage: madness(10.0, log) 'Life is sane.' sage: madness(10, log) 'Life is sane

[sage-support] Re: Elementary symmetric function expansion (bug?)

2008-01-16 Thread Mike Hansen
---- > > sage: sage: k=SFAElementary(QQ) > sage: sage: f=k([2]) > sage: sage: f.expand(3) > x0*x1 + x0*x2 + x1*x2 > sage: > > Mike Hansen did post a patch that was merged early on in 2.10.alpha2 > or so. He might be

[sage-support] Re: Computations with Lie algebras?

2008-01-14 Thread Mike Hansen
Hi Kiran, Adding good Lie algebra support to Sage has been something on my list for awhile. I just made it out here to Berkeley and am going to be here all semester for the program at MSRI. I was that you were registered for the workshop next week. What time do you get in? We can discuss thing

[sage-support] Re: Symbolic computation is slow

2007-12-31 Thread Mike Hansen
Hello, Sympy provides it's own matrices. As mentioned before, there needs to be more work done with sympy in Sage so that what you tried does work. In the meantime, look at the following example: sage: import sympy sage: x = sympy.Symbol('x') sage: m = sympy.Matrix([[1,x],[x,1]]) sage: m 1 x x

[sage-support] Re: Symbolic computation is slow

2007-12-27 Thread Mike Hansen
Hello, The reason why the symbolic stuff in Sage is slow is that it uses a psuedo-tty interface to talk to Maxima. There is a lot of overhead with this due to waiting, synchronization, parsing the string output, etc. One way to get the symbolic stuff to be faster is to make using Sympy since i

[sage-support] Re: kernel function documentation is misleading

2007-12-26 Thread Mike Hansen
I had made this a ticket a few days ago: http://sagetrac.org/sage_trac/ticket/1587 --Mike On 12/26/07, William Stein <[EMAIL PROTECTED]> wrote: > > On Dec 26, 2007 7:35 PM, Marshall Hampton <[EMAIL PROTECTED]> wrote: > > > > At least in the United States, and I assume some other places as well,

[sage-support] Re: Can't find my way around Sage source code

2007-12-23 Thread Mike Hansen
Hello Bill, sage: E = EllipticCurve('5077a'); E Elliptic Curve defined by y^2 + y = x^3 - 7*x + 6 over Rational Field sage: E? Type: EllipticCurve_rational_field Base Class: String Form:Elliptic Curve defined by y^2 + y = x^3 - 7*x + 6 over Rational Field Namespace: Intera

[sage-support] Re: Accessing a windows installation remotely

2007-12-11 Thread Mike Hansen
> One more question not related to this topic. I already use maxima > some by itself. I use a package called wxmaxima or something like > that, and it formats the output in a pretty way. Will sage do that? > I see in the reference manual that I can tell it to give me output in > latex, but it d

[sage-support] Re: Is this a memory problem?

2007-12-09 Thread Mike Hansen
ance increase. > > Thanks very much, > > -- > [EMAIL PROTECTED] > > > On Dec 9, 11:34 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > The actual issue was that I forgot to covert symmetrica's LONGINT type > > ( 22 ) ove

[sage-support] Re: Is this a memory problem?

2007-12-09 Thread Mike Hansen
Hello, The actual issue was that I forgot to covert symmetrica's LONGINT type ( 22 ) over to the correct Sage type. I hadn't actually tested it with calculations that got up to numbers that big. I made a ticket for this and posted a patch: http://sagetrac.org/sage_trac/ticket/1445 It will be in

[sage-support] Re: Questions about solve()

2007-12-08 Thread Mike Hansen
http://www.sagemath.org:9002/sage_trac/ticket/1235 should be faster. --Mike On Dec 8, 2007 12:50 PM, Ted Kosan <[EMAIL PROTECTED]> wrote: > > William wrote: > > > As a start I've implemented find_root (and some minizing and > > maximizing functions) > > and posted a patch here: > > http://tr

[sage-support] Re: Weaning

2007-12-07 Thread Mike Hansen
> It means 5.+N applied to 5.85987. (In Mathematica f[x] is how you > would express applying f to x). I think what confusing is the following: In[1]:= Pi // N Out[1]= 3.14159 In[2]:= Pi // N + 2 Out[2]= (2 + N)[Pi] What does it mean in Mathematica to add 2 to N? Does it just treat N as a form

[sage-support] Re: Weaning

2007-12-07 Thread Mike Hansen
> Is there some easy way I could have figured out that m would respond > to the message `apply_map'? > (Or whatever messages are called in the post-Smalltalk era.) In Python, they're known as methods and they come associated with an object based on its type. To get a list of all the methods that

[sage-support] Re: Weaning

2007-12-03 Thread Mike Hansen
Hello, > 1) Taylor series of a rational function. > > This works: > sage: cos(x).taylor(x,0,2) > > This doesn't: > sage: x/(1+x).taylor(x,0,2) > > This is very confusing: > sage: var('x') > sage: x/(1+x).taylor(x,0,2) This is due to the fact that '.' binds tighter than '/'. For example, sage:

[sage-support] Re: Nasty bug in Calculus?

2007-11-30 Thread Mike Hansen
e numbers given, it generated the same error on larger values > of n. > > regards > john perry > > > On Nov 30, 3:58 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > > In Maple one typically write f:=x->x if one means a func

[sage-support] Re: Nasty bug in Calculus?

2007-11-30 Thread Mike Hansen
Hello, > In Maple one typically write f:=x->x if one means a function instead > of an expression. Doing something similar in SAGE makes a *lot* of > sense, so I don't object inherently to the lambda notation, although > the default Python syntax ("lambda") is not intuitive to an "ordinary" > math

[sage-support] Re: Nasty bug in Calculus?

2007-11-30 Thread Mike Hansen
Hello, This is an instance of http://trac.sagemath.org/sage_trac/ticket/847 . I / we haven't had time to fix that one, but hopefully we can get to it tomorrow. For now, you should make sure that f is an actual Python function. sage: f = lambda x: x sage: Midpoint_Riemann_Sums(0, 5, f, 1000) 12

[sage-support] Re: Questions about solve()

2007-11-26 Thread Mike Hansen
Hello, I've posted a patch for # -- http://sagetrac.org/sage_trac/ticket/ --Mike On Nov 26, 2007 3:34 PM, Ted Kosan <[EMAIL PROTECTED]> wrote: > > William wrote: > > > I think one student working for two weeks could greatly enhance solve, > > but making it: > > > >(1) try the maxima

<    1   2   3   4   5   >