Ticket #1235 (closed defect: fixed)
[with patch, positive review] bug solving equations using maxima
| Reported by: | was | Owned by: | was |
|---|---|---|---|
| Priority: | blocker | Milestone: | sage-2.9 |
| Component: | calculus | Keywords: | |
| Cc: | Author(s): | ||
| Report Upstream: | Reviewer(s): | ||
| Merged in: | Work issues: |
Description
On Nov 20, 2007 12:28 PM, Ted Kosan <ted.kosan@gmail.com> 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.
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:
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

