Bug in fsolve()?
|
09-09-2015, 03:42 PM
Post: #3
|
|||
|
|||
RE: Bug in fsolve()?
Hello,
*Note that what I'm going to write is not perfect or exact - I've tried to simplify for easier understanding.* This is not a bug, but rather a limit on mathematics and numerical algorithms in general. If you could create an algorithm that could absolutely find roots or points of intersections between multiple functions *exactly* and ensure that every single one was found without exception - you'd probably win a Nobel prize. The issue is that as a human we can easily look at something and say "I see 10 solutions when I plot this or think about it critically". For a computer though, that is exceptionally difficult in a generic way. While there are certain cases for which there *is* a way to ensure you capture every solution or root, there is in essence an infinite number of other possibilities for which it is not possible. What is happening with the fsolve command is: 1. It looks at your input and determines if it does know a mathematical algorithm that can exactly find every root/solution. 2. If it is not one of those, it looks at the range you've specified and tries to determine how to subdivide to begin looking for results. 3. Using those subdivisions, it tries to find the roots closest to the input. I think you can spot a problem now which explains why you see different results. When you've specified a range that is well outside the location where the results lie, a large number of the "intervals" it is using as guesses fall outside that location. It ends up not being able to find those. The computer which cannot *think* just blindly follows the directions and must have stopping points else it would attempt to run infinitely. Why not just make more guesses though? Well, that would be one solution. The problem is that numbers and math is infinitely dense. No matter how many more "starting points" you used, I would be able to create another example for which the result was not found. It becomes a balance of time/power in how long you should continue looking. The solution is smarter algorithms...unfortunately one that will function perfectly for all situations hasn't been created yet. Other calculators will handle this in a different way. For example, they might pop up a warning that says "Hey, more solutions might exist". Or they might only give you 1 result. Basically, you can't assume that *ANY* math software is magic bullet that will always give you the result perfectly. Human brains are amazing things and we need to make sure to keep ours turned on and thinking! :-) TW Although I work for HP, the views and opinions I post here are my own. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Bug in fsolve()? - MrMcChicken - 09-09-2015, 09:28 AM
RE: Bug in fsolve()? - Helge Gabert - 09-09-2015, 03:32 PM
RE: Bug in fsolve()? - Tim Wessman - 09-09-2015 03:42 PM
RE: Bug in fsolve()? - MrMcChicken - 09-10-2015, 07:12 PM
|
User(s) browsing this thread: 1 Guest(s)