I have something like
FindRoot[f[x], {x, a}]
Now I want FindRoot to constrain the solutions to 0 < x < 1. How can I obtain this?
|
I have something like
Now I want |
||||
|
I would call these constraints, not assumptions. From the docs,
Keep in mind that Here's a concrete example where there are several roots, but the search stops as soon as the method reached the edge of the search region:
If you need to find all roots inside an interval, I'd recommend using |
|||||||||||
|
|
Something like that works, more advanced answers should come from others.
Gives:
|
|||
|
|
|
This is one of the simpler ways to do it:
Specifying conditions within |
|||||||||
|
Selectthe solutions given byFindRoot. – Öskå Mar 13 at 14:44Cases[FindRoot[...],Rule[_,_>0]..&&Rule[_,_<1]..(I'm not sure whether thepatternis the best to filter solutions). – Sosi Mar 13 at 14:50