I enter this line at the Sage prompt:

val, err = numerical_integral(sqrt(cos(x)^2 + 1), 0, 2*pi)

and I get an error, which is, in its entirety:


Traceback (click to the left for traceback)
...
        the only way at present).

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/notebook/sage_notebook/worksheets/admin/8/code/227.py",
line 6, in <module>
    print _support_.syseval(maple, ur'''val, err = numerical_integral
(sqrt(cos(x)^2 + 1), 0, 2*pi)''', '/home/notebook/sage_notebook/
worksheets/admin/8/cells/93')
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/server/
support.py", line 370, in syseval
    return system.eval(cmd, sage_globals, locals = sage_globals)
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/
interfaces/expect.py", line 980, in eval
    return '\n'.join([self._eval_line(L, **kwds) for L in code.split
('\n') if L != ''])
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/
interfaces/maple.py", line 547, in _eval_line
    wait_for_prompt=wait_for_prompt).replace('\\\n','').strip()
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/
interfaces/expect.py", line 631, in _eval_line
    return self._eval_line_using_file(line)
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/
interfaces/expect.py", line 618, in _eval_line_using_file
    s = self._eval_line(self._read_in_file_command(tmp_to_use),
allow_use_file=False)
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/
interfaces/maple.py", line 547, in _eval_line
    wait_for_prompt=wait_for_prompt).replace('\\\n','').strip()
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/
interfaces/expect.py", line 634, in _eval_line
    self._start()
  File "/usr/local/sage/local/lib/python2.6/site-packages/sage/
interfaces/expect.py", line 456, in _start
    self.__name, cmd, self._install_hints())
RuntimeError: Unable to start maple because the command 'maple -t'
failed.


In order to use the Maple interface you need to have Maple installed
and have a script in your PATH called "maple" that runs the
command-line version of Maple.  Alternatively, you could use a remote
connection to a server running Maple; for hints, type
    print maple._install_hints_ssh()

  (1) You might have to buy Maple (http://webstore.maplesoft.com/).

  (2) * LINUX: The maple script comes standard with your Maple
install.

      * APPLE OS X:
          (a) create a file called maple (in your PATH), with the
following contents:
             #!/bin/sh
             /Library/Frameworks/Maple.framework/Versions/Current/bin/
maple $@
          (b) Save the file.
          (c) Make the file executable.
                chmod +x maple

      * WINDOWS:
        You must install Maple-for-Linux into the VMware machine
(sorry, that's
        the only way at present).

swulf

On Sep 5, 8:15 pm, William Stein <wst...@gmail.com> wrote:
> On Sat, Sep 5, 2009 at 8:11 PM, swulf<summitw...@gmail.com> wrote:
>
> > Perhaps I spoke too soon... the numerical_integral command does not
> > seem to work on my installation either - once again it appears to
> > depend upon Maple.
>
> Maple?  The numerical_integral command certainly does not use Maple.
> It just uses the GSL C library.
>
> And when you say "does not work", what happens?
>
> William
>
>
>
>
>
> > swulf
>
> > On Sep 5, 11:48 am, swulf <summitw...@gmail.com> wrote:
> >> Hello,
>
> >> I'm new to Sage and this group.
>
> >> I have been doing some simple experimentation with integration in
> >> order to get up to speed. One thing I attempted was to try and
> >> calculate an integral, attempting to reproduce the problem described
> >> on this page:
>
> >>http://mathforum.org/library/drmath/view/52038.html
>
> >> Here is how I gave the problem to Sage (V4.1.1 under Windows):
>
> >> f=sin(x)
> >> g=f.diff(x)
> >> h=(sqrt(g^2+1))
> >> j=integral(h,x,0,2*pi)
> >> j
>
> >> Here is the response from Sage:
>
> >> integrate(sqrt(cos(x)^2 + 1), x, 0, 2*pi)
>
> >> This looks like Sage can't perform the integration, and it seems the
> >> sqrt is the problem, although it doesn't flag any sort of error. In
> >> the web page I give above, the problem is solved with MAPLE... so I am
> >> not sure why Sage has a problem with it?
>
> >> I suspect I am missing something or doing something stupid. Can anyone
> >> enlighten me please?
>
> >> Thanks,
>
> >> swulf
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to