[sage-support] Problem with derivative of a constant function

2008-11-21 Thread dean moore
Haven't posted anything to this list in a long time.  Posting to both lists
-- unsure of proper bin.

Searched  googled, couldn't find this previously reported or solved --
sorry if I'm spamming.

Running SAGE Version 3.1.2 on Ubuntu Linux in notebook, though about same
happened
command line.

*Scenario one:*

*  f = x**2   # Quadratic function
  g = f.derivative()
  print g
  print g(3)*

get*
*

* 2 x

  6*

Good  wonderful.

*Scenario two:*

 * f = x  # Constant function
  g = f.derivative()
  print g
  print g(3)*

get

* 1
 Traceback (click to the left for traceback)
 ...
 ValueError: the number of arguments must be less than or equal to 0*

* 1
 Traceback (most recent call last):
   File stdin, line 1, in module
   File /home/dino/.sage/sage_notebook/worksheets/admin/3/code/15.py,
line 9, in module
 print g(Integer(3))
   File 
/home/dino/Desktop/sage-3.1.2-debian-x86_64-intel-x86_64-Linux/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/,
line 1, in module

   File 
/home/dino/Desktop/sage-3.1.2-debian-x86_64-intel-x86_64-Linux/local/lib/python2.5/site-packages/sage/calculus/calculus.py,
line 1671, in __call__
 raise ValueError, the number of arguments must be less than or
equal to %s%len(self.variables())
 ValueError: the number of arguments must be less than or equal to 0*

 Why does SAGE dislike calling a constant function a function?

Dean

--~--~-~--~~~---~--~~
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: Sage search engine?

2008-04-07 Thread dean moore
I have used the following as a fudge:

http://www.google.com/search?hl=enlr=as_qdr=allq=+site%3Ahttp%3A%2F%2Fsagemath.orgbtnG=Search

Dean

---

On Mon, Apr 7, 2008 at 5:28 PM, Michael [EMAIL PROTECTED] wrote:


 The search engine at the bottom of
 http://www.sagemath.org/documentation.html
 has stopped working for me in IE, Firefox, and Opera.

 When I type something into the search box, the results appear but only
 in the tiny little window at the bottom of the page so I cannot see
 the results unless I scroll through the little window (by using the
 arrow keys or by tabbing).  If I click on the Sage Search Engine link,
 then I get a full page and can see the results after typing a query.

 I believe that the box at the bottom of the page used to work (thus
 saving me a click).

 Was this change intended?
 


--~--~-~--~~~---~--~~
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: Inter-disciplinary applications of Sage (biopython, etc.)

2008-03-29 Thread dean moore
For what we looking?  As to explaining, What is this sage thing good for?,
an organization of the
somewhat-messy published documents https://www.sagenb.org/pub/ might be
nice.  There's some great stuff in there!  Get
something for Jason's colloquium talk in a week?

A link on the main page http://sagemath.org/ to Here are some uses of
sage might make sense.  Some has been done
with Screen Shots http://sagemath.org/screen_shots., but one has to
navigate two pages  The art page http://www.sagemath.org:9001/art is nice,
but I don't see source
code.

No one else is volunteering, so give me whatever necessary authority  some
direction, and
I'll do it.

I see something like (I'm alphabetizing, and probably missing a lot):

  Biology (Marshall's note)
   Breakdown as needed

  Chemistry
Subdivisions as needed

  Economics (Michael's note)
Break up as needed

  Mathematics
 calculus
 DE's
 Linear algebra - more abstract stuff, et cetera, subdivisions.

  Physics
 Subfields as needed.

  Pretty pictures and math art via sage (of great importance to the
mathematics duffers, probably none of
  whom read this
list)
Other subfields as necessary.

  Sage Functionality and good examples of how to code in sage  solve sticky
problems
 More breakdown

And so forth.  I see lots of cool stuff on the course web-page at this
linkhttp://wiki.wstein.org/2008/480a/schedule
.

Better organized, someone could send out notes, We have plenty of examples
of the MVT, but need
more in this abstract subfield of Group Theory.

When most want to know about a software package, s/he asks, How does it
make MY life a better place?
What can it do?  Pictures?  What are it's limitations? I don't want to spend
a month learning it.  Why should I
be interested in this open-source 'free' stuff?  What's the catch?

If no use is immediately obvious, Say, this Mathematica thing has some
pretty nice documentation ...

Just my verbose $0.02.  No one else was responding.  I think sage has great
potential, but everyone is so busy
developing, no-one has time to market.  Talk to our friends at Apple about
that one.

Dean

---

On Sat, Mar 29, 2008 at 10:37 AM, William Stein [EMAIL PROTECTED] wrote:

 Hi,

 This quarter I'm going to use Sage to teach an  interdisciplinary
 course called  Algebraic, Scientiļ¬c, and Statistical Computing, an
 Open Source Approach Using Sage this quarter.   The course webpage is
 here: http://wiki.wstein.org/2008/480a

 For me the theme of this course is basically this: now that Sage is
 here, what
 does it do?  What can we do with it?   How can its very broad capabilities
 be
 easily explained to people?

 Somehow we've built up a massive amount of functionality during the
 last two years, and it's time to step back for a moment and figure out
 what
 the heck one can do with sage-2.11.tar.gz.   And, given what Sage has
 become, this is very much an interdisciplinary question.

 On Sat, Mar 29, 2008 at 4:32 AM, Marshall Hampton [EMAIL PROTECTED]
 wrote:
 
   I use Sage as the primary platform for an interdisciplinary course on
   bioinformatics.  The students are a mix of math, biology, and
   chemistry graduate students (and a small number of undergraduates).  I
   use (and largely maintain) the biopython spkg for sage.  For more
   detail than you want, you can look at the course homepage:
 
   
  http://www.d.umn.edu/~mhampton/m5233s8.htmlhttp://www.d.umn.edu/%7Emhampton/m5233s8.html
 
   Cheers,
   Marshall Hampton
 
 
 
   On Mar 28, 5:34 pm, Jason Grout [EMAIL PROTECTED] wrote:
Hi all,
   
I'm giving a colloquium talk on Sage in a week to a broad audience of
science-related faculty at a liberal arts college.  I'd like to point
out some applications of Sage in things other than math, like using
 the
biopython project, possibly R, etc.  Does anyone have some good
 material
using Sage in science-related interdisciplinary research?
   
If there are lots of responses, I'll make a wiki page with the info.
   
Thanks,
   
Jason
   
 



 --
 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] Published worksheets, Internal Server Error

2008-03-26 Thread dean moore
The published worksheets https://www.sagenb.org/pub/ have given an
Internal Server Error for some time now.

Dean

--~--~-~--~~~---~--~~
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] Spline question

2008-03-04 Thread dean moore
Playing with splines for other reasons, I found what I beat down to the
following snippet (see attached)

*v = []  # Will hold points
step  = 0.5 # Fineness of my approximation
for x in srange(0, 2*pi, step): # Fill parameter *v* with points
   v.append((cos(x), sin(x)))   # on the unit circle.

show(points(v, rgbcolor=(1,0,0), pointsize=20) +
 plot(spline(v), rgbcolor=(0,0,1)))*

Aha!, I thought, I'm being clueless.  No one splines a parametric curve.
 But curious, I did some
googleing.

At  http://www.tau.ac.il/~kineret/amit/scipy_tutorial/  there is a nice
example at Figure 3, as there is at
 http://www.tau.ac.il/~kineret/amit/scipy_tutorial/  at Curve fitting and
fairing using conic splines.

Glanced at a couple SAGE pages, 
http://www.sagemath.org/doc/html/ref/module-sage.plot.plot.html  

http://www.sagemath.org/doc/html/ref/module-sage.plot.plot3d.list-plot3d.html,
but nothing seemed
helpful.

Thanks for any ideas.

Dean

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

inline: spline_attempt.png

[sage-support] Re: Animation speed question

2008-03-04 Thread dean moore
When I used *step = 0.095*, I have 64 frames, close enough to the wikipedia
image's
of 66.

But resultant animation is choppy, where wikipedia's is fairly smooth.

I tinkered with a spline to smooth out a different curve, but it ran
fantastically slow,  -- something
about too many points? -- so gave up on it for this image.

Thanks anyway.  Will occasionally return to this -- the problem interests
me.

Dean

---

On Sun, Mar 2, 2008 at 1:15 PM, Carl Witty [EMAIL PROTECTED] wrote:


 On Mar 1, 1:09 pm, dean moore [EMAIL PROTECTED] wrote:
  When I wrote the code living at https://www.sagenb.org/home/pub/1687/
 I
  was inspired by the
  wikipedia image (made via MuPAD) on the page at 
 http://en.wikipedia.org/wiki/Hypotrochoid
  (permalink 
 http://en.wikipedia.org/wiki/Image:HypotrochoidOutThreeFifths.gif).

 It looks like both images animate at about 10 frames per second in my
 Firefox; your image has 240 frames, and the Wikipedia image has 66, so
 the Wikipedia animation completes in about 1/4 the time.

 I don't know why setting delay=1 doesn't seem to be honored.  I
 tried delay=100 and that worked.  (I'm guessing it's a deliberate
 design decision in Firefox, to prevent people from making fast,
 flickery animated GIFs; but it also might be a bug in Sage, or a bug
 in ImageMagick or Firefox.)

 But anyway, the solution is to use fewer frames.

 Carl

 


--~--~-~--~~~---~--~~
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: Question on published worksheets

2008-02-21 Thread dean moore
As to the other stuff, I did, not now important.  I made a few improvements
to fix the
wiggling graph problem, clicked on publish to re-publish, and ...

Under published documents there are now two files named 
animated_derivative_line https://www.sagenb.org/home/pub/1697.

I thought, Maybe a computer thing; give it a few minutes to update.
Signed out of SAGE.
At least ten minutes.

Still two copies.  I recall that in my futzing I deleted the original, 
copied the code under
the same name.

Thanks for any guidance  sorry for the hassle.

Dean

On Wed, Feb 20, 2008 at 10:41 PM, William Stein [EMAIL PROTECTED] wrote:


 On Wed, Feb 20, 2008 at 8:17 PM, dean moore [EMAIL PROTECTED]
 wrote:
  I recently posted on the wiggling graph problem, and do appreciate the
  speed at which it was pounced on.
 
  This was motivated by the published 
 https://www.sagenb.org/home/pub/1691/
  .  After doing a work-around
   to the wiggling graph problem, I wanted to re-upload my new 
 improved
  file.  But the Edit facility's link
  was  https://www.sagenb.org/home/pub/1691/edit_published_page , which
  re-directed to one of my pages,
https://www.sagenb.org/home/dino/12/ , which looked truly bizarre --
 at
  least to me.

 Why?  Can you be clearer?

  To me it makes sense that I can't edit (and possibly vandalize) someone
  else's page, but shouldn't we be
   able to edit  improve our own?

 You cannot edit or vandalize anybody else's pages.  You can only edit
 *copies*
 of them.   You can edit your own then republish it by clicking publish
 again.

   Oh, I know, Write it right in the first
  place.  But the software world changes
  faster than the mythical Proteus.
 
  Just wondering.
 

 Clicking Edit a copy lets you edit a copy.

 If you edit the original that you published then click publish it will
 update the one that you originally published.

 If things don't work like that it's a serious bug.

 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: Animation wiggling question

2008-02-20 Thread dean moore
Thanks for the response!  I used some slightly different code; in case
anyone else deals
with the wiggling graph problem before the next SAGE is out, one snippet
that worked
for me follows:

*def f(x):
return x*sin(x^2)
v = []

# Define graph outside loop to avoid wiggling graph problem:

graph = plot(f, [-1, 3], thickness = 1, rgbcolor = (0,0,1))

# Now animate this graph:

for i in srange(10):
   v.append(graph)

curve = animate(v)
curve.show()*

---

The graph was immobile.

Dean

---

On Wed, Feb 20, 2008 at 3:41 PM, Jonathan Bober [EMAIL PROTECTED] wrote:


 The documentation for plot() says:

The actual sample points are slightly randomized, so the above
plots may look slightly different each time you draw them.

 I assume that this an easy way to get the behavior:

Note that this function does NOT simply sample equally spaced
points between xmin and xmax.  Instead it computes equally spaced
points and add small perturbations to them.  This reduces the
possibility of, e.g., sampling sin only at multiples of 2pi,
which would yield a very misleading graph.

 So, perhaps this is a feature. But it seems to me that the endpoints,
 at least, should be always included (if possible) when graphing a
 function, so maybe this is a bug. (Although it is nice to not include
 the endpoints when plotting something like sin(1/x).)

 But anyway, I think that you should be able to instead do:

 f = x*sin(x^2)
 v = []
 graph = plot(f, [-1, 3], thickness = 1, rgbcolor = (1, 0 ,0))
 for i in srange(50):
 v.append(graph)
curve = animate(v)
curve.show()

 On Wed, 2008-02-20 at 16:01 -0600, Jason Grout wrote:
  dean moore wrote:
   I ran the code now living at  https://www.sagenb.org/home/pub/1691/,
   but the function's graph
   wiggles, most notably by the right endpoint.  Tested, both Firefox 
   Internet Explorer.  Same thing.
   Read through 
   http://www.sagemath.org/doc/html/ref/module-sage.plot.plot.html , but
   found nothing.
  
   I am animating a graph, so it appears in all frames.
  
   I fiddled a good deal, but was left wondering, Is it weirdness with
   SAGE, or my bad coding?  I beat
   the problem to a snippet:
  
   /f = x*sin(x^2)
   v = []
   for i in srange(50):
  graph = plot(f, [-1, 3], thickness = 1, rgbcolor = (1, 0 ,0),
   plot_points = 1000)
  v.append(graph)
   curve = animate(v)/
   /curve.show()
  
 
  Wow, this is a great animation.  Sorry the plotting is so distracting at
  the ends!
 
  To narrow down the issue, I executed the following after the code you
 gave:
 
  sage: endpoints = [v[i][0].xdata[-1] for i in srange(50)]
  sage: max(endpoints) - min(endpoints)
  0.0039542538407206784
 
  This computes the endpoints for the x-values that are sampled to plot
  the graph.  That's quite a spread for having the exact same inputs,
  which explains the noticable wiggling.
 
  So now the question is: why in the world do we have such different
  endpoints?
 
  I might point out that the wiggling is not just at the endpoints of the
  graph.  The wiggling is throughout the graph; it's just really
  noticeable at the endpoints.
 
  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] Question on published worksheets

2008-02-20 Thread dean moore
I recently posted on the wiggling graph problem, and do appreciate the
speed at which it was pounced on.

This was motivated by the published 
https://www.sagenb.org/home/pub/1691/.  After doing a work-around
to the wiggling graph problem, I wanted to re-upload my new  improved
file.  But the Edit facility's link
was  https://www.sagenb.org/home/pub/1691/edit_published_page , which
re-directed to one of my pages,
 https://www.sagenb.org/home/dino/12/ , which looked truly bizarre -- at
least to me.

To me it makes sense that I can't edit (and possibly vandalize) someone
else's page, but shouldn't we be
able to edit  improve our own?  Oh, I know, Write it right in the first
place.  But the software world changes
faster than the mythical Proteus.

Just wondering.

Dean

--~--~-~--~~~---~--~~
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] More Extreme Newbie Development Questions

2008-02-17 Thread dean moore
Took me awhile to respond.  Distractions.

Last generated a few responses, replying to all under a new subject line
(last thread was getting clogged), in no particular order,

 David Joyner:

 Thanks for the cool gif!
 It would be great f you could post it to
 http://wiki.sagemath.org/pics
 (or it you tell me what to post, I will for you).

Futzed around, logged in, but couldn't figure it how to post it.  Attached.
It's easy to
modify the original source code at  https://www.sagenb.org/home/pub/1687/ 
 juggle
constant to make various relations.  Thanks if you can post this, or tell me
how!

 mabshoff:

 We want to channel traffic into two mailing lists: sage-support for
 everything that isn't an developer issue and sage-devel for developers
 issue. Many issues on sage-newbie didn't get the attention they needed
 because too few people were reading it. Your chances to get replies
 are much better on sage-support.

I thought sage newbie no longer existed.  Do correct me  all else if I
am confused.

 Jason Grout:

 This is great stuff!  I think it's a perfect place to post it.

 We really ought to set up a library of wonderfully documented examples
 of how to use Sage, something like the Maple application center or the
 Mathematica Demonstrations project.  The current list of notebooks

Thanks.  Glancing at the published notebooks, many are quickie solutions
(and not documented at all -- no top documentation saying This program
differentiates polynomials; we use this logic ... shuts off my brain) to
narrowly-focussed problems not of much interest to, say a high school /
college
student wanting to know, What's this SAGE thing about?  What's in it for
*me*?

Might be good to have separate sets of examples for varied grade levels.
Most
college kids are concerned about learning differentiation  integration,
solving
DE's, systems, engineering/science problems, -- not learning what a parabola
is
(though I've taught a few ...).

Just an idea.

 Dean, you mentioned the frustration of trying to learn a new system.
 Was there anything that we could have done to make it easier (sorry
 about the unanswered posts to sage-newbie; we all kind of dropped the
 ball with keeping up with so many different mailing lists).

There's always that learning curve, shaking a fist at the computer, then the
Aha!
moments.  Wish I had a good answer.  Lots of good WELL-DOCUMENTED examples?
Then I can browse published worksheets, Oh, this person did this thing at
least
related to what I'm looking at?

And maybe a place to post those *** well-documented examples *** for review,
Here's a nifty workbook I did that illustrates the manifold uses of
spendiferous
functions, or maybe more importantly, This worksheet illustrates how to
use
SAGE to do this not-easy-to-code thing? (whatever), and someone reviews it,
Yes, darn it, that is solid; let's post it for all under a name that makes
sense (another problem with the published worksheets).

Elsewhere observed,

 ... it is not organized or searchable (I don't think) ...

This needs work.  Having played with SAGE a bit, I see it trying to go from
being a garage band to Led Zeppelin (well, that's overstating a bit), and
sometimes the old ideas need revamped.

 Dean, I guess I should add that just last year, I was a newbie sage user
 as well.  I felt how much people welcomed newcomers and cared about
 helping people get up to speed ...

You guys / gals / whoever were pretty cool.  When questions went unanswered
I
kind of figured, Oh, we all live busy lives.  I had the impression that
others wanted quickie answers -- those happen, but don't count on them
often.  Can't one set a welcome message to all new users of a group to
make policies clear?

Would love to do some development of whatever, examples, documentation,
wherever, a
worthwhile  contribution, and doubtless I'm not alone.  Some things could
perhaps be
more clear, We need more good functionality in this small subset of
calculus, The
spendiferous functions code is poorly documented, full of magic numbers 
obscure
logic  needs cleaned up (whatever).

Dean

--~--~-~--~~~---~--~~
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: animation question

2008-02-14 Thread dean moore
Apparently I had the square brackets placed wrong.  My mistake.  The code

*arm= animate(line([(0,0),(cos(i), sin(i))],
rgbcolor=(1,0,1))
for i in srange(0, 2*pi, 0.3))
arm.show()*

seems to work.

Thanks ... mea culpa for not finding the obvious substitution. Was barking
up the wrong tree.

Dean

---

On Thu, Feb 14, 2008 at 1:46 PM, William Stein [EMAIL PROTECTED] wrote:

  please post what you think the obvious substitution is.



  On 2/14/08, dino [EMAIL PROTECTED] wrote:
  
   I posted this to the sage-newbie list, but it never generated a
   response.  I understand this list has
   more people in the know.
  
   We have the following snippet:
  
   arm= animate([arrow((0,0),(cos(i), sin(i)),
rgbcolor=(1,0,1))
for i in srange(0, 2*pi, 0.3)])
   arm.show()
  
   It generates a rotating arrow.  I wish to generate an animated line,
   but the obvious substitution fails, generating a graph but no line.
   Fiddling with the code in other ways also fails.
  
   Ideas?  Thanks!
  
   Dean
  
   
  


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