Timeline for Roots given by Solve are not satisfied by the equation
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 12, 2021 at 0:50 | comment | added | Daniel Lichtblau | One way I assess residuals is to go to scale-free coordinates. (1) Rescale equations so that max coefficient is 1 (or norm of coeffs is 1, take your pick). (2) Homogenize the equations, (3) Homogenize the results. (4) Rescale results so max coordinate is 1 (or norm...). (5) Now assess residuals. This approach helps to avoid issues with scaling of the equations and also with relative size of solutions. So "large" solutions will be less likely to give outsized residuals. | |
Jan 11, 2021 at 18:00 | comment | added | Michael E2 | When I first looked at the question, I was going to remark about using an exact solver with approximate input, but @Marco beat me to it. Then I realized it wasn't an issue here, and that "a loss of numerical precision" did not explain what seemed to be wrong. | |
Jan 11, 2021 at 17:58 | history | edited | Michael E2 | CC BY-SA 4.0 |
Fixed code
|
Jan 11, 2021 at 17:58 | comment | added | Michael E2 |
@DanielLichtblau Yes, I do that all the time and on many answers on the site. My main objective is to dispel the impression that Solve or NSolve is faulty, by giving a reason why 10^11 can be considered a small error in $y$ in this case. Another source of error I omitted is that the error in $y$ is $dy \approx f'(x)\,dx$ (e.g. eqn'[l]*l*$MachineEpsilon /. sol // Abs ), which gives similar bounds. Maybe a third thing, which I should have emphasized, is that round-off error in the coefficients leads to a large $y$ residual. Questions on root-finding on this site often ignore these factors.
|
|
Jan 11, 2021 at 17:01 | vote | accept | Gaurav Maurya | ||
Jan 11, 2021 at 17:48 | |||||
Jan 10, 2021 at 0:04 | comment | added | Daniel Lichtblau | To address your last remark, often it is not needed. Although it can be useful for assessing whether a lower-precision result is or is not plausible (as you and @MarcoB have in effect shown). | |
Jan 9, 2021 at 19:50 | history | edited | MarcoB | CC BY-SA 4.0 |
Added missing braces to TeX expression, emphasized last paragraph
|
Jan 9, 2021 at 19:26 | history | answered | Michael E2 | CC BY-SA 4.0 |