On Nov 20, 2007 12:28 PM, Ted Kosan <[EMAIL PROTECTED]> wrote:
> Does anyone have any thoughts on why the solve() function this program
> returns an empty list?:
>
> sage: var('t')
> sage: a = .004*(8*e^(-(300*t)) - 8*e^(-(1200*t)))*(720000*e^(-(300*t))
> - 11520000*e^(-(1200*t))) +.004*(9600*e^(-(1200*t)) -
> 2400*e^(-(300*t)))^2
> sage: print a(t=.000411)
> sage: show(plot(a,0,.002),xmin=0, xmax=.002)
> sage: solve(a==0,t)

Maxima stupidly decides there is no solution.  This is clearly a bug.  This
is the sort of bug in Sage that is very difficult for us to fix since
it's really
a bug in Maxima, and it's entirely possible that maxima developers would
not even call it a bug.  But clearly it is, since it's a
mathematically incorrect result.
Alternatively, maybe there is more to using solve than I understand, and
a maxima expert could explain how to use the maxima solve function in
a more robust manner  ?!

Here's what happens when you try this in Maxima directly:

sage: !maxima
Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp CLISP 2.41 (2006-10-13)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) 
solve(0.004*(8*%e^-(300*t)-8*%e^-(1200*t))*(720000*%e^-(300*t)-11520000*%e^-(1200*t))+0.004*(9600*%e^-(1200*t)-2400*%e^-(300*t))^2=0,
t)
;
`rat' replaced 0.004 by 1/250 = 0.004
`rat' replaced 0.004 by 1/250 = 0.004
(%o1)                                 []


I strongly encourage you to report this to the maxima list, if you
agree that it is
a bug in Maxima.

I think in the long-run Sage will have to completely implement its own solve
function, which is better than Maxima's.  Thoughts from Ondrej-sympy would be
appreciated here.

> And why the solve() function in this program hangs?:
>
> sage: var('t')
> sage: v = 0.004*(9600*e^(-(1200*t)) - 2400*e^(-(300*t)))
> sage: show(plot(v,0,.002),xmin=0,xmax = .002)
> sage: solve(v == 0,t)

Here maxima also gives the wrong answer:

sage: maxima(v == 0)
0.004*(9600*%e^-(1200*t)-2400*%e^-(300*t))=0
sage: maxima(v == 0).solve(t)
[]

Just to emphasize that in my opinion this is *definitely* a bug,
I've entered this into the tracker:
  http://trac.sagemath.org/sage_trac/ticket/1235

But this might be pretty hard to fix soon.   Making sure we
are well aware of it, though, is critically important if we
are to push Sage to be truly professional level in
non-algebraic areas...

 -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to