On Nov 26, 2007 2:54 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
> > I just received permission from my University to spend $1000 to have
> > the SAGE project fix the following bug:
> >
> > http://trac.sagemath.org/sage_trac/ticket/1235
> >
>
> Could you please clarify, what exact functionality in solve you expect
> in order for 1235 to be solved?
>
> Should it just run the iterative numerical solver if it cannot find
> the solution analytically?

I don't know.  However, Ted, what do you think of the following, i.e.,
it is a way in Sage to solve your problem which is probably pretty
clean and flexible, and could certainly made a little more student
friendly?

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: from scipy.optimize import brentq
sage: # Given two points x, y such that a(x) and a(y) have different sign, this
sage: # brentq uses "inverse quadratic extrapolation" to find a root of a in the
sage: # interval [x,y].  It has lots of extra tolerance and other options.
sage: brentq(a, 0, 0.002)
0.00041105140493493411
sage: show(plot(a,0,.002),xmin=0, xmax=.002)

I.e., what we provide an numerical_root method so that
     a.numerical_root(x,y)
would fine a numerical root of a in the interval [x,y], if it exists?
It could be built on brentq.  The main thing we would have to add
is some sort of analysis to find x', y' in the interval so that a(x')
has different sign from a(y'), i.e., decide if there is a sign switch,
which could be doable for many analytically defined functions at least.


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