[sage-support] Re: Infinite sum

2008-08-29 Thread tkeller

I asked this question myself a few months ago, and the easiest 2
solutions seem to be utilizing sympy or maxima.

Via sympy it is:
import sympy
sympy.var('x')
print sympy.sum(2**(-x), (x, 1, oo))

I'm taking this from a question I posed on the sympy message list:
http://groups.google.com/group/sympy/browse_frm/thread/5348ded3ebe8a25e?tvc=1

It should return a result of 1, but in sage 3.1.1 it returns 1-2*2**(1-
Infinity).  While technically correct, this should clearly return 1
when simplified so I guess there is some complication when
transferring between modules. Ondrej will assuredly give more useful
information if he sees this.

More specifically , your example using m=2 is:
sympy.sum(1/((x+2)**3)),(x,1,oo))

Unfortunately this returns
Sum((2 + x)**(-3), (x, 1, Infinity))

n() on this function does not work, maybe a sympy equivalent would?
It may work better with a %python header, though I haven't tested this
yet (if you use the notebook).

I don't remember the maxima parsing offhand.  I believe I got some
information about it from delving into the sage/washington undergrad
mail list.  I'll try to look into it tomorrow.  Making a natural
implementation for infinite series seems quite valuable and hopefully
a short-term goal considered for Sage.  This is a specific dismay I've
come across when trying to broadcast Sage to an otherwise quite pro-
opensource professor.

Would a function called nsum or such that called sympy/maxima be
feasible? This would lead to a supplementation rather than a
replacement for the python sum().

Thomas
On Aug 29, 5:54 pm, Raouf <[EMAIL PROTECTED]> wrote:
> Hi,
> I am a newbie in sage and i want to compute an infinite sum with
> parameter m, like sum(1/(k+m)^3) k=1 to infinity.
> Can you please help me?
> thanks
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



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

2008-08-29 Thread William Stein

On Fri, Aug 29, 2008 at 5:12 PM, Simon King <[EMAIL PROTECTED]> wrote:
>
> Hi Geir,
>
> If you really want to use strings, it may work like that:
> sage: var('x y')
> (x, y)
> sage: EqL=['y==x**%d-%d'%(i,i) for i in range(10)]
> sage: for X in EqL:
> : print X
> : print solve(eval(X))

Use sage_eval instead of eval, unless you want to
confusing results:

sage: eval('2/3')
0
sage: eval('2^3')
1




> :
> y==x**0-0
> [
> y == 1
> ]
> y==x**1-1
> [
>   x == y + 1
> ]
> y==x**2-2
> [
>   x == - sqrt(y + 2),
>x == sqrt(y + 2)
> ]
>
> etc...
>
> Note that double-= yields an equation (not a boolean!) if symbolic
> expressions such as x and y are involved. A single "=" is an
> assignment.
>
> Cheers
>Simon
>
> >
>



-- 
William Stein
Associate 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



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

2008-08-29 Thread Simon King

Hi Geir,

If you really want to use strings, it may work like that:
sage: var('x y')
(x, y)
sage: EqL=['y==x**%d-%d'%(i,i) for i in range(10)]
sage: for X in EqL:
: print X
: print solve(eval(X))
:
y==x**0-0
[
 y == 1
]
y==x**1-1
[
   x == y + 1
]
y==x**2-2
[
   x == - sqrt(y + 2),
x == sqrt(y + 2)
]

etc...

Note that double-= yields an equation (not a boolean!) if symbolic
expressions such as x and y are involved. A single "=" is an
assignment.

Cheers
Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[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 to do it without strings:
sage: eq = var('eq')
sage: eqs = [0== x^i - i for i in range(1,10)]
sage: eqs
[0 == x - 1,
 0 == x^2 - 2,
 0 == x^3 - 3,
 0 == x^4 - 4,
 0 == x^5 - 5,
 0 == x^6 - 6,
 0 == x^7 - 7,
 0 == x^8 - 8,
 0 == x^9 - 9]

But, I doubt that those are the actual equations you want.  you just
need to modify the eqs = ... line to be what you need.

--Mike

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] convert string to sage expression

2008-08-29 Thread [EMAIL PROTECTED]

Hi,
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 way to convert the string eq1 to a sage expression that can
be used
by the sage solver ?


geir

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Infinite sum

2008-08-29 Thread Raouf

Hi,
I am a newbie in sage and i want to compute an infinite sum with
parameter m, like sum(1/(k+m)^3) k=1 to infinity.
Can you please help me?
thanks

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: saving as C code?

2008-08-29 Thread Robert Bradshaw

On Fri, 29 Aug 2008, Martin Albrecht wrote:

>
> On Friday 29 August 2008, Jason Grout wrote:
>> Martin Albrecht wrote:
 For various objects and various software systems (like mathematica,
 magma, maxima, etc.), we have a _mathematica_init_, _magma_init_, etc,
 which convert an expression into syntax for the target system.  A lot of
 these are defined in calculus.py for converting symbolic expressions to
 syntax for other systems.  I don't think we have an "interface" to C
 code; can anyone think of a reason why we shouldn't?  (or do we already
 have one?)
>>>
>>> One difference is that it is pretty clear what Magma can and cannot do +
>>> it can do a lot of mathematics. What would be the capabilities of C? C,
>>> stdlib, pari/NTL/BLAS/libSingular?
>>
>> I'd say that the _c_init_ should just be plain standard C (i.e., it
>> should compile with just gcc).  This means that lots of functionality
>> won't be able to be translated (for example, most stuff over fields or
>> groups), but it would be able to translate generic symbolic expressions,
>> like originally asked.
>
> isn't fast float doing something very similar, i.e. building up stdlib C tress
> for evaluation?

Yes, it is doing a lot of the work for you.

>> We could have _c_NTL_init_ or _c_blas_init_, etc., for variants if
>> people want.  Another thought is to pass options to the systems, like
>> _c_init_('blas','NTL','singular').
>
> That looks like an infinite amount of work compared to very little benefit.
> Anybody interested in writing code for these libraries, can look at our
> sources to see how we link into them. I doubt automatic code generation would
> be of much use here.

I have thought some about automatic code generation from fast_float 
objects using a pluggable language/type. Then anything that can produce a 
fast_float can produce code. Still haven't had time to implement much 
along those lines though.

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Robert Bradshaw

On Fri, 29 Aug 2008, Jason Grout wrote:

>
> Jason Merrill wrote:
>> On Aug 29, 3:07 am, Burcin Erocal <[EMAIL PROTECTED]> wrote:
>>> On Thu, 28 Aug 2008 15:28:03 -0400
>>>
>>>
>>>
>>> Tim Lahey <[EMAIL PROTECTED]> wrote:
 Hi,
 Maple has a really useful feature of inert integrals
 and derivatives. Basically, the integrals and derivatives
 show up in the equations, but aren't evaluated until
 a command to evaluate them is explicitly given. So,
 you can delay the evaluation until after you've processed
 the expression to the point where it can be evaluated.
 This feature comes in very handy during complicated
 derivations because you can see which terms are integrals
 or derivatives and manipulate them along side
 non-integrals/derivatives.
 Is there a way to do this in Sage?
>>> This is not supported in Sage at the moment, but it is definitely
>>> planned. It should be fairly simple to implement this using the new
>>> symbolic function interface from ginac, which allows one to specify
>>> custom simplify/automatic evaluation functions.
>>>
>>> I am not familiar with the maple syntax. Can you give some examples of
>>> how to use these features so I can play with them without having to dig
>>> through documentation?
>>
>> The Mathematica syntax is Hold[Integral[x,{x,0,1}]].  This remains
>> unevaluated until it is wrapped with an Evaluate[].  The nice thing
>> about this syntax is that it works for any kind of expression (not
>> just integrals).
>
> So maybe we could have something like a FormalExpression class which
> does the same thing (has an argument that it doesn't evaluate).

Not sure how one would do this in Python though... (Maybe via preparsing 
somehow, it would still be pretty hard...)

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: failed to download cddlib-094b.p1

2008-08-29 Thread mabshoff



On Aug 29, 7:33 am, Thierry Dumont <[EMAIL PROTECTED]> wrote:
> Trying to install polymake in sage 3.1, I got the message:
>

Hi Thierry,

this is a known issue and I have a fixed spkg-install that should once
and for all resolve the issue. We are tracking this at #3640 and I
need to put up a spkg and get it reviewed since I have been sitting on
this for a while.

Sorry that this is taking so long :(

> **
> * Unable to download cddlib-094b.p1
> * Please seehttp://www.sagemath.org//packagesfor a list of valid
> * packages or check the package name.
> **
> sage: Failed to download package cddlib-094b.p1 fromhttp://www.sagemath.org/
>
> yours
> t.d.

Cheers,

Michael

>  tdumont.vcf
> < 1KViewDownload
>
>  smime.p7s
> 5KViewDownload
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: saving as C code?

2008-08-29 Thread Jason Grout

Martin Albrecht wrote:
> On Friday 29 August 2008, Jason Grout wrote:
>> Martin Albrecht wrote:

> 
>> We could have _c_NTL_init_ or _c_blas_init_, etc., for variants if
>> people want.  Another thought is to pass options to the systems, like
>> _c_init_('blas','NTL','singular').
> 
> That looks like an infinite amount of work compared to very little benefit. 
> Anybody interested in writing code for these libraries, can look at our 
> sources to see how we link into them. I doubt automatic code generation would 
> be of much use here.

I agree. I certainly am not volunteering to do that sort of thing; just 
pointing out that if we really wanted to, we could probably generate 
code that would use various libraries to give C more capabilities.

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: [GAP Forum] GAP console frozen

2008-08-29 Thread William Stein

On Fri, Aug 29, 2008 at 8:53 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> Let me get this straight. Please correct me if I am wrong.
>
> You sarted GAP within Sage (using sage -gap?) and then
> started a long computation, whcih caused you to run out of memory.
> Then GAP and Sage froze, so you rebooted and restarted Sage.
> (Since you rebooted, I guess you are using windows?)
> Dis Sage freeze on restart? Or was the VMware program itself frozen?
> (I don't use windows, so can't help you, but I think this information will
> be helpful to whoever does.)
>

If you are using vmware you may want to greatly increase
the amount of RAM available to the virtual machine.  You
can do that by editing (with notepad) the .vmx file in the virtual
machine folder under windows.

> On Fri, Aug 29, 2008 at 10:31 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> My GAP console seems to be frozen.
>>
>> I received the following error:
>> exceeded the permitted memory ('-o' command line option at
>> B!.heads := gens.heads;
>> called from
>> BasisVectors(B) called from...
>> Entering break read-eval-print loop...
>> you can 'quit' to quit to outer loop, or
>> you can 'return to continue
>> brk>
>>
>> and I typed 'return' to see if perhaps with more time, I would get a result.
>> I was checking if an element was in an ideal.  For those who read my 
>> previous posting about "element in ideal (more specific)", I changed 
>> Integers to Rationals, and was trying "gap>R4 in I;"  This is the command 
>> that led to the error above.
>> After leaving the program running overnight, it seems to be frozen.  I can't 
>> Cntl C to quit, or Cntrl D to exit to the SAGE console, I can't do 
>> anything I closed the program, restarted the computer, and reopened the 
>> program with no change.  Can anyone help?
>> -Becky
>>
>> 
>> Click to find information on your credit score and your credit report.
>> http://thirdpartyoffers.juno.com/TGL2131/fc/Ioyw6iifRxYPCB3t2fuc3AfAOjqmgjQDkKVG6xW0OOA4hyC2qDba57/
>>
>> ___
>> Forum mailing list
>> [EMAIL PROTECTED]
>> http://mail.gap-system.org/mailman/listinfo/forum
>>
>
> >
>



-- 
William Stein
Associate 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: [GAP Forum] GAP console frozen

2008-08-29 Thread David Joyner

Let me get this straight. Please correct me if I am wrong.

You sarted GAP within Sage (using sage -gap?) and then
started a long computation, whcih caused you to run out of memory.
Then GAP and Sage froze, so you rebooted and restarted Sage.
(Since you rebooted, I guess you are using windows?)
Dis Sage freeze on restart? Or was the VMware program itself frozen?
(I don't use windows, so can't help you, but I think this information will
be helpful to whoever does.)

On Fri, Aug 29, 2008 at 10:31 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> My GAP console seems to be frozen.
>
> I received the following error:
> exceeded the permitted memory ('-o' command line option at
> B!.heads := gens.heads;
> called from
> BasisVectors(B) called from...
> Entering break read-eval-print loop...
> you can 'quit' to quit to outer loop, or
> you can 'return to continue
> brk>
>
> and I typed 'return' to see if perhaps with more time, I would get a result.
> I was checking if an element was in an ideal.  For those who read my previous 
> posting about "element in ideal (more specific)", I changed Integers to 
> Rationals, and was trying "gap>R4 in I;"  This is the command that led to the 
> error above.
> After leaving the program running overnight, it seems to be frozen.  I can't 
> Cntl C to quit, or Cntrl D to exit to the SAGE console, I can't do 
> anything I closed the program, restarted the computer, and reopened the 
> program with no change.  Can anyone help?
> -Becky
>
> 
> Click to find information on your credit score and your credit report.
> http://thirdpartyoffers.juno.com/TGL2131/fc/Ioyw6iifRxYPCB3t2fuc3AfAOjqmgjQDkKVG6xW0OOA4hyC2qDba57/
>
> ___
> Forum mailing list
> [EMAIL PROTECTED]
> http://mail.gap-system.org/mailman/listinfo/forum
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: saving as C code?

2008-08-29 Thread Martin Albrecht

On Friday 29 August 2008, Jason Grout wrote:
> Martin Albrecht wrote:
> >> For various objects and various software systems (like mathematica,
> >> magma, maxima, etc.), we have a _mathematica_init_, _magma_init_, etc,
> >> which convert an expression into syntax for the target system.  A lot of
> >> these are defined in calculus.py for converting symbolic expressions to
> >> syntax for other systems.  I don't think we have an "interface" to C
> >> code; can anyone think of a reason why we shouldn't?  (or do we already
> >> have one?)
> >
> > One difference is that it is pretty clear what Magma can and cannot do +
> > it can do a lot of mathematics. What would be the capabilities of C? C,
> > stdlib, pari/NTL/BLAS/libSingular?
>
> I'd say that the _c_init_ should just be plain standard C (i.e., it
> should compile with just gcc).  This means that lots of functionality
> won't be able to be translated (for example, most stuff over fields or
> groups), but it would be able to translate generic symbolic expressions,
> like originally asked.

isn't fast float doing something very similar, i.e. building up stdlib C tress 
for evaluation?

> We could have _c_NTL_init_ or _c_blas_init_, etc., for variants if
> people want.  Another thought is to pass options to the systems, like
> _c_init_('blas','NTL','singular').

That looks like an infinite amount of work compared to very little benefit. 
Anybody interested in writing code for these libraries, can look at our 
sources to see how we link into them. I doubt automatic code generation would 
be of much use here.

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]
-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Jason Grout

Jason Merrill wrote:
> On Aug 29, 3:07 am, Burcin Erocal <[EMAIL PROTECTED]> wrote:
>> On Thu, 28 Aug 2008 15:28:03 -0400
>>
>>
>>
>> Tim Lahey <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>> Maple has a really useful feature of inert integrals
>>> and derivatives. Basically, the integrals and derivatives
>>> show up in the equations, but aren't evaluated until
>>> a command to evaluate them is explicitly given. So,
>>> you can delay the evaluation until after you've processed
>>> the expression to the point where it can be evaluated.
>>> This feature comes in very handy during complicated
>>> derivations because you can see which terms are integrals
>>> or derivatives and manipulate them along side
>>> non-integrals/derivatives.
>>> Is there a way to do this in Sage?
>> This is not supported in Sage at the moment, but it is definitely
>> planned. It should be fairly simple to implement this using the new
>> symbolic function interface from ginac, which allows one to specify
>> custom simplify/automatic evaluation functions.
>>
>> I am not familiar with the maple syntax. Can you give some examples of
>> how to use these features so I can play with them without having to dig
>> through documentation?
> 
> The Mathematica syntax is Hold[Integral[x,{x,0,1}]].  This remains
> unevaluated until it is wrapped with an Evaluate[].  The nice thing
> about this syntax is that it works for any kind of expression (not
> just integrals).

So maybe we could have something like a FormalExpression class which 
does the same thing (has an argument that it doesn't evaluate).

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: saving as C code?

2008-08-29 Thread Jason Grout

Martin Albrecht wrote:
>> For various objects and various software systems (like mathematica,
>> magma, maxima, etc.), we have a _mathematica_init_, _magma_init_, etc,
>> which convert an expression into syntax for the target system.  A lot of
>> these are defined in calculus.py for converting symbolic expressions to
>> syntax for other systems.  I don't think we have an "interface" to C
>> code; can anyone think of a reason why we shouldn't?  (or do we already
>> have one?)
> 
> One difference is that it is pretty clear what Magma can and cannot do + it 
> can do a lot of mathematics. What would be the capabilities of C? C, stdlib, 
> pari/NTL/BLAS/libSingular?


I'd say that the _c_init_ should just be plain standard C (i.e., it 
should compile with just gcc).  This means that lots of functionality 
won't be able to be translated (for example, most stuff over fields or 
groups), but it would be able to translate generic symbolic expressions, 
like originally asked.

We could have _c_NTL_init_ or _c_blas_init_, etc., for variants if 
people want.  Another thought is to pass options to the systems, like 
_c_init_('blas','NTL','singular').

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: solve() fails to produce a solution

2008-08-29 Thread Jason Grout

Jason Grout wrote:
> William Stein wrote:
>> On Thu, Aug 28, 2008 at 11:06 PM, Robert Dodier <[EMAIL PROTECTED]> wrote:
>>> On 8/28/08, William Stein <[EMAIL PROTECTED]> wrote:
>>>
  Sage uses Maxima's solve command, and Maxima's solve
  command is pretty wimpy, and we (Sage developers) intend
  to write our own new solve command that can deal with
  more general equations.
>>> Go nuts, man. Hope you can write it in Python since that will
>>> make it easier to port to Lisp.
>>>
>> We might start with Sympy's solve command, which is in Python,
>> and which also can't solve the above equations:
>>
>> sage: from sympy import *
>> sage: x,y = var('x,y')
>> sage: sympy.solve([x==0, 1-exp(y)==0],[x,y])
>> {}
>> sage: solve([y*sin(x)==0, cos(x)==0],x,y)
>> {}
>>
> 
> For reference, it seems that axiom can't solve these either (at least 
> with my naive attempts):
> 
> (9) -> solve([x=0,1-exp(y)=0],[x,y])
> (9) ->
> (9)  [[]]
>Type: List List Equation Expression 
> Integer
> (10) -> solve([y*sin(x)=0,cos(x)=0],[x,y])
> (10) ->
> (10)  [[]]
>Type: List List Equation Expression 
> Integer
> 
> 
> while mathematica gives solutions:
> 
> In[1]:= Solve[{x == 0, 1 - Exp[y] == 0}, {x, y}]
> 
> Solve::ifun: Inverse functions are being used by Solve, so some 
> solutions may
>   not be found; use Reduce for complete solution information.
> 
> Out[1]= {{x -> 0, y -> 0}}
> 
> In[2]:= Solve[{y*Sin[x] == 0, Cos[x] == 0}, {x, y}]
> 
> Solve::ifun: Inverse functions are being used by Solve, so some 
> solutions may
>   not be found; use Reduce for complete solution information.
> 
> -Pi Pi
> Out[2]= {{y -> 0, x -> ---}, {y -> 0, x -> --}}
>  2  2


In fact, Mathematica can give general solutions:

In[3]:= Reduce[{x == 0, 1 - Exp[y] == 0}, {x, y}]

Out[3]= C[1] \[Element] Integers && x == 0 && y == (2 I) Pi C[1]

In[4]:= Reduce[{y*Sin[x] == 0, Cos[x] == 0}, {x, y}]

Out[4]= C[1] \[Element] Integers &&

-Pi Pi
 >(x == --- + 2 Pi C[1] || x == -- + 2 Pi C[1]) && y == 0
 2  2



(translation: the first is x==0 and y==(2*I)*C*Pi, where C is an 
integer, etc.)

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: solve() fails to produce a solution

2008-08-29 Thread Jason Grout

William Stein wrote:
> On Thu, Aug 28, 2008 at 11:06 PM, Robert Dodier <[EMAIL PROTECTED]> wrote:
>> On 8/28/08, William Stein <[EMAIL PROTECTED]> wrote:
>>
>>>  Sage uses Maxima's solve command, and Maxima's solve
>>>  command is pretty wimpy, and we (Sage developers) intend
>>>  to write our own new solve command that can deal with
>>>  more general equations.
>> Go nuts, man. Hope you can write it in Python since that will
>> make it easier to port to Lisp.
>>
> 
> We might start with Sympy's solve command, which is in Python,
> and which also can't solve the above equations:
> 
> sage: from sympy import *
> sage: x,y = var('x,y')
> sage: sympy.solve([x==0, 1-exp(y)==0],[x,y])
> {}
> sage: solve([y*sin(x)==0, cos(x)==0],x,y)
> {}
>

For reference, it seems that axiom can't solve these either (at least 
with my naive attempts):

(9) -> solve([x=0,1-exp(y)=0],[x,y])
(9) ->
(9)  [[]]
   Type: List List Equation Expression 
Integer
(10) -> solve([y*sin(x)=0,cos(x)=0],[x,y])
(10) ->
(10)  [[]]
   Type: List List Equation Expression 
Integer


while mathematica gives solutions:

In[1]:= Solve[{x == 0, 1 - Exp[y] == 0}, {x, y}]

Solve::ifun: Inverse functions are being used by Solve, so some 
solutions may
  not be found; use Reduce for complete solution information.

Out[1]= {{x -> 0, y -> 0}}

In[2]:= Solve[{y*Sin[x] == 0, Cos[x] == 0}, {x, y}]

Solve::ifun: Inverse functions are being used by Solve, so some 
solutions may
  not be found; use Reduce for complete solution information.

-Pi Pi
Out[2]= {{y -> 0, x -> ---}, {y -> 0, x -> --}}
 2  2


Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] failed to download cddlib-094b.p1

2008-08-29 Thread Thierry Dumont

Trying to install polymake in sage 3.1, I got the message:


**
* Unable to download cddlib-094b.p1
* Please see http://www.sagemath.org//packages for a list of valid
* packages or check the package name.
**
sage: Failed to download package cddlib-094b.p1 from
http://www.sagemath.org/

yours
t.d.
begin:vcard
fn:Thierry Dumont
n:Dumont;Thierry
org;quoted-printable:CNRS - Universit=C3=A9 Lyon 1. / Villeurbanne France.;Institut Camille Jordan
adr:;;43 Bd du 11 Novembre;Villeurbanne Cedex;F;69621;France
email;internet:[EMAIL PROTECTED]
title;quoted-printable:Ing=C3=A9nieur de Recherche/Research Ingeneer
tel;work:(33) 4 72 44 85 23
x-mozilla-html:FALSE
url:http://math.univ-lyon1.fr/~tdumont
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature


[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Tim Lahey


On Aug 29, 2008, at 8:17 AM, David Joyner wrote:


I like this! (I assume you meant integral, not Integral?)
But could you implement it in such a way that

sage: A = integral(x,x,0,1, evaluate=False)
sage: eval(A)
1/2
sage: latex(A)
\int_0^1 x\, dx




+1

I like this approach and is relatively consistent with Maple's
because it still allows you to evaluate the integral in a
straightforward manner. It also helps indicate to the
user that "evaluate" is just a property of the integral and
makes it easy to see that eval will change that state.

Whether this is done for more than differentiation and
integration, I'm not that concerned about, but it can
be implemented in a similar manner if we have a state
variable.

Cheers,

Tim.

---
Tim Lahey
PhD Candidate, Systems Design Engineering
University of Waterloo



smime.p7s
Description: S/MIME cryptographic signature


[sage-support] Re: Hall-Senior number vs. Small Groups library

2008-08-29 Thread Simon King

Hi David!

On Aug 29, 2:11 pm, "David Joyner" <[EMAIL PROTECTED]> wrote:
> I doubt it - I've never even heard of the Hall-Senior number.

See:
 Hall, Marshall, Jr.; Senior, James K.
 The groups of order 2n (n ≤ 6).
 The Macmillan Co., New York; Collier-Macmillan, Ltd., London 1964 225
pp.

> How hard would it be to write one?

Meanwhile i realize how stupid my question is. I didn't realize that
they classified the 2-groups only up to order 64 -- i thought that the
Hall-Senior number were also defined for larger groups.

Sorry for bothering you.

Cheers
  Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Find_root bug

2008-08-29 Thread kcrisman

> This is actually a problem with how the symbolic functions/expressions
> are handled. The find_root function cannot recognize that 1/z is a
> function. This works:
>
> sage: z = 1/tan
> sage: f = lambda x: z(x)
> sage: find_root(f,1, 2)
> 1.5707963267948968
>
> and this:
>
> sage: find_root(z(x),1, 2)
> 1.5707963267948968
>
> I am working on making arithmetic with function objects more intuitive,
> and free of these kinds of problems as a part of the effort to use
> ginac as a basis for symbolics. This might result in some changes to
> the user interface for such things, but hopefully there will be less
> problems of this kind.
>

Thanks for the workaround idea.  Actually, I was just reporting it as
a ticket, which hopefully will be resolved (as you say) with ginac
conversion.

I am very excited about more robust symbolic behavior, because
pedagogically one likes to reach students where they are at - and most
freshmen nonmajors are definitely only at the math-as-symbolic-
manipulation stage, yet should be able to use Sage as intuitively as
possible.  Thanks for your (and others'!) work on this!

- kcrisman
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Jason Merrill

On Aug 29, 3:07 am, Burcin Erocal <[EMAIL PROTECTED]> wrote:
> On Thu, 28 Aug 2008 15:28:03 -0400
>
>
>
> Tim Lahey <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> > Maple has a really useful feature of inert integrals
> > and derivatives. Basically, the integrals and derivatives
> > show up in the equations, but aren't evaluated until
> > a command to evaluate them is explicitly given. So,
> > you can delay the evaluation until after you've processed
> > the expression to the point where it can be evaluated.
>
> > This feature comes in very handy during complicated
> > derivations because you can see which terms are integrals
> > or derivatives and manipulate them along side
> > non-integrals/derivatives.
>
> > Is there a way to do this in Sage?
>
> This is not supported in Sage at the moment, but it is definitely
> planned. It should be fairly simple to implement this using the new
> symbolic function interface from ginac, which allows one to specify
> custom simplify/automatic evaluation functions.
>
> I am not familiar with the maple syntax. Can you give some examples of
> how to use these features so I can play with them without having to dig
> through documentation?

The Mathematica syntax is Hold[Integral[x,{x,0,1}]].  This remains
unevaluated until it is wrapped with an Evaluate[].  The nice thing
about this syntax is that it works for any kind of expression (not
just integrals).

JM
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread David Joyner

On Fri, Aug 29, 2008 at 8:01 AM, Robert Bradshaw
<[EMAIL PROTECTED]> wrote:
>
...

> I like the concept, though I'm also -1 on the capital/lowercase
> syntax. Perhaps integral could take an extra argument, so one would have
>
> sage: integral(x,x,0,1)
> 1/2
> sage: Integral(x,x,0,1, evaluate=False)
> \int_0^1 x\, dx


I like this! (I assume you meant integral, not Integral?)
But could you implement it in such a way that

sage: A = integral(x,x,0,1, evaluate=False)
sage: eval(A)
1/2
sage: latex(A)
\int_0^1 x\, dx

works?


>
> Or maybe a new function formal_integral?
>
> - Robert
>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Hall-Senior number vs. Small Groups library

2008-08-29 Thread David Joyner

On Fri, Aug 29, 2008 at 7:56 AM, Simon King <[EMAIL PROTECTED]> wrote:
>
> Dear all,
>
> finite 2-groups of appropriate size can be identified either by their
> number in the Small Groups library or by their Hall-Senior number.
>
> The Small Groups library is an optional part of Sage (via gap). But is
> there also some function available in Sage that translates between
> Hall-Senior and Small Groups?


I doubt it - I've never even heard of the Hall-Senior number.
How hard would it be to write one?


>
> Cheers
>  Simon
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Robert Bradshaw

On Aug 29, 2008, at 4:53 AM, Tim Lahey wrote:

>
> On Aug 29, 2008, at 6:24 AM, William Stein wrote:
>
>>
>> On Fri, Aug 29, 2008 at 2:46 AM, David Joyner <[EMAIL PROTECTED]>  
>> wrote:
>>>
>>> On Fri, Aug 29, 2008 at 3:07 AM, Burcin Erocal  
>>> <[EMAIL PROTECTED]> wrote:

 This is not supported in Sage at the moment, but it is definitely
 planned. It should be fairly simple to implement this using the new
 symbolic function interface from ginac, which allows one to specify
 custom simplify/automatic evaluation functions.

 I am not familiar with the maple syntax. Can you give some  
 examples of
 how to use these features so I can play with them without having  
 to dig
 through documentation?
>>>
>>> I agree this would be a very useful feature. Basically, something  
>>> like
>>>
>>> (1)
>>> sage: integral(x,x,0,1)
>>> 1/2
>>> sage: Integral(x,x,0,1)
>>> \int_0^1 x\, dx
>>>
>>> (not the upper case I), or maybe
>>
>> I'm not enthuisiastic about using
>> Foo and foo to denote different commands.  If we have
>> two cases of the exact same word in Sage, then they should
>> be aliased.  Isn't (2) below identical to (1) above?
>> Or did you not mean to distinguish case above?
>>
>
> It's what Maple does. In Maple, Int() is used to indicate an
> inert integral, while int() is used to indicate an integral which
> is evaluated at that time.

I like the concept, though I'm also -1 on the capital/lowercase  
syntax. Perhaps integral could take an extra argument, so one would have

sage: integral(x,x,0,1)
1/2
sage: Integral(x,x,0,1, evaluate=False)
\int_0^1 x\, dx

Or maybe a new function formal_integral?

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Hall-Senior number vs. Small Groups library

2008-08-29 Thread Simon King

Dear all,

finite 2-groups of appropriate size can be identified either by their
number in the Small Groups library or by their Hall-Senior number.

The Small Groups library is an optional part of Sage (via gap). But is
there also some function available in Sage that translates between
Hall-Senior and Small Groups?

Cheers
  Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Tim Lahey


On Aug 29, 2008, at 6:24 AM, William Stein wrote:



On Fri, Aug 29, 2008 at 2:46 AM, David Joyner <[EMAIL PROTECTED]>  
wrote:


On Fri, Aug 29, 2008 at 3:07 AM, Burcin Erocal <[EMAIL PROTECTED]>  
wrote:


This is not supported in Sage at the moment, but it is definitely
planned. It should be fairly simple to implement this using the new
symbolic function interface from ginac, which allows one to specify
custom simplify/automatic evaluation functions.

I am not familiar with the maple syntax. Can you give some  
examples of
how to use these features so I can play with them without having  
to dig

through documentation?


I agree this would be a very useful feature. Basically, something  
like


(1)
sage: integral(x,x,0,1)
1/2
sage: Integral(x,x,0,1)
\int_0^1 x\, dx

(not the upper case I), or maybe


I'm not enthuisiastic about using
Foo and foo to denote different commands.  If we have
two cases of the exact same word in Sage, then they should
be aliased.  Isn't (2) below identical to (1) above?
Or did you not mean to distinguish case above?



It's what Maple does. In Maple, Int() is used to indicate an
inert integral, while int() is used to indicate an integral which
is evaluated at that time.



(2)
sage: A = Integral(x,x,0,1)
sage. latex(A)
\int_0^1 x\, dx
sage: A
Integral(x,x,0,1)



I don't really care which syntax is used, as long as there is a
consistent way of doing this.

Cheers,

Tim.

---
Tim Lahey
PhD Candidate, Systems Design Engineering
University of Waterloo



smime.p7s
Description: S/MIME cryptographic signature


[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread David Joyner

On Fri, Aug 29, 2008 at 6:24 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Fri, Aug 29, 2008 at 2:46 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>>
>> On Fri, Aug 29, 2008 at 3:07 AM, Burcin Erocal <[EMAIL PROTECTED]> wrote:
>>>
>>> On Thu, 28 Aug 2008 15:28:03 -0400
>>> Tim Lahey <[EMAIL PROTECTED]> wrote:
>>>
 Hi,

 Maple has a really useful feature of inert integrals
 and derivatives. Basically, the integrals and derivatives
 show up in the equations, but aren't evaluated until
 a command to evaluate them is explicitly given. So,
 you can delay the evaluation until after you've processed
 the expression to the point where it can be evaluated.

 This feature comes in very handy during complicated
 derivations because you can see which terms are integrals
 or derivatives and manipulate them along side
 non-integrals/derivatives.

 Is there a way to do this in Sage?
>>>
>>> This is not supported in Sage at the moment, but it is definitely
>>> planned. It should be fairly simple to implement this using the new
>>> symbolic function interface from ginac, which allows one to specify
>>> custom simplify/automatic evaluation functions.
>>>
>>> I am not familiar with the maple syntax. Can you give some examples of
>>> how to use these features so I can play with them without having to dig
>>> through documentation?
>>
>> I agree this would be a very useful feature. Basically, something like
>>
>> (1)
>> sage: integral(x,x,0,1)
>> 1/2
>> sage: Integral(x,x,0,1)
>> \int_0^1 x\, dx
>>
>> (not the upper case I), or maybe
>
> I'm not enthuisiastic about using
> Foo and foo to denote different commands.  If we have

Okay. I just tried to answer Burcin's question of what Maple does,
using Sage as an analogy.

> two cases of the exact same word in Sage, then they should
> be aliased.  Isn't (2) below identical to (1) above?
> Or did you not mean to distinguish case above?


I think you are right. I wasn't thinking that at the time but
now I can't see a way to implement (1) and (2) differently.


>
>>
>> (2)
>> sage: A = Integral(x,x,0,1)
>> sage. latex(A)
>> \int_0^1 x\, dx
>> sage: A
>> Integral(x,x,0,1)
>>
>>>
>>>
>>> Thanks.
>>>
>>> Burcin
>>>
>>> >
>>>
>>
>> >
>>
>
>
>
> --
> William Stein
> Associate 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: using latex packages

2008-08-29 Thread Maike

Hi William,

That sounds great to me. As long as it'll allow me to load the ngerman
package in the notebook version of Sage, that'll do. Thanks!

Maike

P.S. And thanks Stan for the hint! I didn't know sagetex. As I'm using
the notebook to combine latex typesetting with the interact
functionality of Sage, it's probably not the best idea. But it might
be helpful for future projects!
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: saving as C code?

2008-08-29 Thread Martin Albrecht

> For various objects and various software systems (like mathematica,
> magma, maxima, etc.), we have a _mathematica_init_, _magma_init_, etc,
> which convert an expression into syntax for the target system.  A lot of
> these are defined in calculus.py for converting symbolic expressions to
> syntax for other systems.  I don't think we have an "interface" to C
> code; can anyone think of a reason why we shouldn't?  (or do we already
> have one?)

One difference is that it is pretty clear what Magma can and cannot do + it 
can do a lot of mathematics. What would be the capabilities of C? C, stdlib, 
pari/NTL/BLAS/libSingular?

Cheers,
Martin


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread William Stein

On Fri, Aug 29, 2008 at 2:46 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> On Fri, Aug 29, 2008 at 3:07 AM, Burcin Erocal <[EMAIL PROTECTED]> wrote:
>>
>> On Thu, 28 Aug 2008 15:28:03 -0400
>> Tim Lahey <[EMAIL PROTECTED]> wrote:
>>
>>> Hi,
>>>
>>> Maple has a really useful feature of inert integrals
>>> and derivatives. Basically, the integrals and derivatives
>>> show up in the equations, but aren't evaluated until
>>> a command to evaluate them is explicitly given. So,
>>> you can delay the evaluation until after you've processed
>>> the expression to the point where it can be evaluated.
>>>
>>> This feature comes in very handy during complicated
>>> derivations because you can see which terms are integrals
>>> or derivatives and manipulate them along side
>>> non-integrals/derivatives.
>>>
>>> Is there a way to do this in Sage?
>>
>> This is not supported in Sage at the moment, but it is definitely
>> planned. It should be fairly simple to implement this using the new
>> symbolic function interface from ginac, which allows one to specify
>> custom simplify/automatic evaluation functions.
>>
>> I am not familiar with the maple syntax. Can you give some examples of
>> how to use these features so I can play with them without having to dig
>> through documentation?
>
> I agree this would be a very useful feature. Basically, something like
>
> (1)
> sage: integral(x,x,0,1)
> 1/2
> sage: Integral(x,x,0,1)
> \int_0^1 x\, dx
>
> (not the upper case I), or maybe

I'm not enthuisiastic about using
Foo and foo to denote different commands.  If we have
two cases of the exact same word in Sage, then they should
be aliased.  Isn't (2) below identical to (1) above?
Or did you not mean to distinguish case above?

>
> (2)
> sage: A = Integral(x,x,0,1)
> sage. latex(A)
> \int_0^1 x\, dx
> sage: A
> Integral(x,x,0,1)
>
>>
>>
>> Thanks.
>>
>> Burcin
>>
>> >
>>
>
> >
>



-- 
William Stein
Associate 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: using latex packages

2008-08-29 Thread William Stein

On Fri, Aug 29, 2008 at 1:22 AM, Maike <[EMAIL PROTECTED]> wrote:
>
> Hello again,
>
> is there any way to use latex packages within sage? I'd like to write
> a german text, and that will be a pain if
>
> %latex
> \usepackage{ngerman}
>
> doen't work. Maybe I first have to install the package somewhere??

There is no current supported way to do the above.

It shouldn't be hard for somebody to add though.  How complicated
of a pre-amble do you want?  Would something like the following
be acceptable to you?


sage: latex.set_preamble('\\usepackage{ngerman}  [etc]')

then henceforth %latex would always include
the \usepackage{ngerman} code before typesetting
a cell.  The above would be extremely easy to implement.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread David Joyner

On Fri, Aug 29, 2008 at 3:07 AM, Burcin Erocal <[EMAIL PROTECTED]> wrote:
>
> On Thu, 28 Aug 2008 15:28:03 -0400
> Tim Lahey <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> Maple has a really useful feature of inert integrals
>> and derivatives. Basically, the integrals and derivatives
>> show up in the equations, but aren't evaluated until
>> a command to evaluate them is explicitly given. So,
>> you can delay the evaluation until after you've processed
>> the expression to the point where it can be evaluated.
>>
>> This feature comes in very handy during complicated
>> derivations because you can see which terms are integrals
>> or derivatives and manipulate them along side
>> non-integrals/derivatives.
>>
>> Is there a way to do this in Sage?
>
> This is not supported in Sage at the moment, but it is definitely
> planned. It should be fairly simple to implement this using the new
> symbolic function interface from ginac, which allows one to specify
> custom simplify/automatic evaluation functions.
>
> I am not familiar with the maple syntax. Can you give some examples of
> how to use these features so I can play with them without having to dig
> through documentation?

I agree this would be a very useful feature. Basically, something like

(1)
sage: integral(x,x,0,1)
1/2
sage: Integral(x,x,0,1)
\int_0^1 x\, dx

(not the upper case I), or maybe

(2)
sage: A = Integral(x,x,0,1)
sage. latex(A)
\int_0^1 x\, dx
sage: A
Integral(x,x,0,1)

>
>
> Thanks.
>
> Burcin
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: using latex packages

2008-08-29 Thread Stan Schymanski

Hi Maike,

Have you heard of sagetex? This allows sage computations as part of the 
compilation of a latex file. From my experience, this is not very good 
for interactive work because all the code within the latex file is 
compiled every time you run sage over your document, but it's great for 
getting a nicely typeset document that does all the sage calculations 
and plots you want.

Check out: http://www.ctan.org/tex-archive/macros/latex/contrib/sagetex/

I believe that this would allow you to use any latex functionality you like.

Stan

Maike wrote:
> Hello again,
>
> is there any way to use latex packages within sage? I'd like to write
> a german text, and that will be a pain if
>
> %latex
> \usepackage{ngerman}
>
> doen't work. Maybe I first have to install the package somewhere??
>
>   
 



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] using latex packages

2008-08-29 Thread Maike

Hello again,

is there any way to use latex packages within sage? I'd like to write
a german text, and that will be a pain if

%latex
\usepackage{ngerman}

doen't work. Maybe I first have to install the package somewhere??

Maike
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Find_root bug

2008-08-29 Thread Burcin Erocal

On Thu, 28 Aug 2008 13:36:53 -0700 (PDT)
kcrisman <[EMAIL PROTECTED]> wrote:

> 
> The reciprocal of tangent is not a constant function, but Sage says
> otherwise.  This is now http://trac.sagemath.org/sage_trac/ticket/3980
> .
> 
> (Incidentally, using z(x)=tan(x) also doesn't work, as it yields a
> NotImplementedError (whose message could be better) for 1/z;
> presumably the bug below would occur even if it were implemented,
> though.)
> 
> - kcrisman
> 
> sage: z=tan
> sage: z
> tan
> sage: 1/z
> 1/tan
> sage: find_root(1/z,1,2)
> ---
> RuntimeError  Traceback (most recent call
> last)

> RuntimeError: no zero in the interval, since constant expression is
> not 0.

This is actually a problem with how the symbolic functions/expressions
are handled. The find_root function cannot recognize that 1/z is a
function. This works:

sage: z = 1/tan
sage: f = lambda x: z(x)
sage: find_root(f,1, 2)
1.5707963267948968

and this:

sage: find_root(z(x),1, 2)
1.5707963267948968


I am working on making arithmetic with function objects more intuitive,
and free of these kinds of problems as a part of the effort to use
ginac as a basis for symbolics. This might result in some changes to
the user interface for such things, but hopefully there will be less
problems of this kind.

Cheers,

Burcin

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Burcin Erocal

On Thu, 28 Aug 2008 15:28:03 -0400
Tim Lahey <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> Maple has a really useful feature of inert integrals
> and derivatives. Basically, the integrals and derivatives
> show up in the equations, but aren't evaluated until
> a command to evaluate them is explicitly given. So,
> you can delay the evaluation until after you've processed
> the expression to the point where it can be evaluated.
> 
> This feature comes in very handy during complicated
> derivations because you can see which terms are integrals
> or derivatives and manipulate them along side
> non-integrals/derivatives.
> 
> Is there a way to do this in Sage?

This is not supported in Sage at the moment, but it is definitely
planned. It should be fairly simple to implement this using the new
symbolic function interface from ginac, which allows one to specify
custom simplify/automatic evaluation functions.

I am not familiar with the maple syntax. Can you give some examples of
how to use these features so I can play with them without having to dig
through documentation?


Thanks.

Burcin

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---