sage: maxima.interact()
--> Switching to Maxima <--
maxima: declare(x,real,t,real,m,real,s,real);
done
maxima: assume(s>0);
[s>0]
maxima: define(foo(x,m,s),subst((x-m)/s,x,diff(1/(1+%e^-x),x)));
foo(x,m,s):=%e^-((x-m)/s)/(%e^-((x-m)/s)+1)^2
maxima: integrate(foo(x,m,s),x,minf,inf);
s
maxima: integrate(foo(x,m,s)/s,x,minf,inf);
1
maxima: integrate(x*foo(x,m,s)/s,x,minf,inf);
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/charpent/sage-5.10/local/lib/python2.7/site-packages/IPython/core/prefilter.pyc in prefilter_lines(self, lines, continue_prompt)
358 for lnum, line in enumerate(llines) ])
359 else:
--> 360 out = self.prefilter_line(llines[0], continue_prompt)
361
362 return out
/home/charpent/sage-5.10/local/lib/python2.7/site-packages/IPython/core/prefilter.pyc in prefilter_line(self, line, continue_prompt)
314 # At this point, we invoke our transformers.
315 if not continue_prompt or (continue_prompt and self.multi_line_specials):
--> 316 line = self.transform_line(line, continue_prompt)
317
318 # Now we compute line_info for the checkers and handlers
/home/charpent/sage-5.10/local/lib/python2.7/site-packages/IPython/core/prefilter.pyc in transform_line(self, line, continue_prompt)
288 for transformer in self.transformers:
289 if transformer.enabled:
--> 290 line = transformer.transform(line, continue_prompt)
291 return line
292
/home/charpent/sage-5.10/local/lib/python2.7/site-packages/sage/misc/interpreter.pyc in transform(self, line, continue_prompt)
544 line = 'InputForm[%s]'%line
545
--> 546 t = self.shell.interface.eval(line)
547
548 #Once we've evaluated the lines, we can clear the queue
/home/charpent/sage-5.10/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
1206 elif split_lines:
1207 return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1208 for L in code.split('\n') if L != ''])
1209 else:
1210 return self._eval_line(code, allow_use_file=allow_use_file, **kwds)
/home/charpent/sage-5.10/local/lib/python2.7/site-packages/sage/interfaces/maxima.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, reformat, error_check, restart_if_needed)
791 return out
792
--> 793 self._expect_expr()
794 assert len(self._before())==0, 'Maxima expect interface is confused!'
795
/home/charpent/sage-5.10/local/lib/python2.7/site-packages/sage/interfaces/maxima.pyc in _expect_expr(self, expr, timeout)
695 self._sendline(";")
696 self._expect_expr()
--> 697 raise ValueError, msg
698 except KeyboardInterrupt, msg:
699 #print self._expect.before
ValueError: Computation failed since Maxima requested additional constraints (try the command "maxima.assume('/s>0')" before integral or limit evaluation, for example):
Is 1/s an integer?
maxima: ;;; Here, I type Ctrl-D
--> Exiting back to Sage <--