[sage-support] Re: Find_root not finding a root

2018-03-23 Thread Marcin Kostur
Dear Saad, It happens that I want to find more than one root numerically, then I use brute force as in code below. It is not possible to have any general heuristics for arbitrary function about where its roots are, so if one knows more about the function in some special case then the interval

[sage-support] Re: Find_root not finding a root

2018-03-16 Thread Dima Pasechnik
This makes sense. It most probably has a pre-set minimal interval length, so it stops splitting at certain moment. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email

[sage-support] Re: Find_root not finding a root

2018-03-15 Thread saad khalid
OK, that was too easy, as there was an exact symbolic solution. Is this a solution Sage could have given symbolically as well? Here are the results for sin(1/x)==x on [-1,1] : It apparently computed many solutions and originally asked me whether I wanted to show all the found solutions or

[sage-support] Re: Find_root not finding a root

2018-03-15 Thread Dima Pasechnik
On Thursday, March 15, 2018 at 10:23:44 PM UTC, saad khalid wrote: > > I have to apologize, I gave a slightly incorrect Mathematica code earlier, > the actual code was: > > Solve[ Exp[-2*a*x]-1+4*a*x==0,x]//N > > The earlier code gave the wrong answer. Anyways: > > it could be a different

[sage-support] Re: Find_root not finding a root

2018-03-15 Thread Robert Dodier
On 2018-03-15, Dima Pasechnik wrote: > it could be a different function, which potentially would run much longer, > by repetitive splitting of the interval > (I guess that's what Mathematica is doing) I have toyed with the idea of repurposing whatever adaptive splitting

Re: [sage-support] Re: Find_root not finding a root

2018-03-15 Thread Dima Pasechnik
On Thursday, March 15, 2018 at 2:25:00 AM UTC, saad khalid wrote: > > That is a good point, however I feel an even better solution in that case > would be giving some of the roots and then giving some indication that > there are an infinite number of roots. Disregarding the case where there >

Re: [sage-support] Re: Find_root not finding a root

2018-03-14 Thread saad khalid
That is a good point, however I feel an even better solution in that case would be giving some of the roots and then giving some indication that there are an infinite number of roots. Disregarding the case where there are infinitely many roots, I don't see why it wouldn't be preferable to have

Re: [sage-support] Re: Find_root not finding a root

2018-03-05 Thread Vincent Delecroix
On 05/03/2018 20:01, saad khalid wrote: Hello, and thank you for your response. While I agree that the behaviour of the function certainly complies with the specifications listed in its description, I think everyone would agree that it would be better if it did give all of the roots in a given

[sage-support] Re: Find_root not finding a root

2018-03-05 Thread saad khalid
Hello, and thank you for your response. While I agree that the behaviour of the function certainly complies with the specifications listed in its description, I think everyone would agree that it would be better if it did give all of the roots in a given interval. Would you happen to know

[sage-support] Re: Find_root not finding a root

2018-03-01 Thread Simon King
Hi Khalid, On 2018-03-02, saad khalid wrote: > I'm running this code: > find_root(e^(-2*x*1)-(1 - 4*x),-2,2) > > It returns > > 2.4011774461136836e-13 > > which is approximately 0. However, there should be another root around x = > -0.628. Why isn't it finding this root? >