Beware of NSolve - nastier example
- To: mathgroup at smc.vnet.net
- Subject: [mg50207] Beware of NSolve - nastier example
- From: carlos at colorado.edu (Carlos Felippa)
- Date: Fri, 20 Aug 2004 04:58:03 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
This is a nasty one: f=5/432-11/(27*Sqrt[70]*Sqrt[19-1890*x])+x/(2*Sqrt[38/35-(108+1/10000000)*x]); Print[N[Solve[f==0,x]]]; (* OK, 3 roots #2,4,5 of a sextic poly *) Print[NSolve[f,x,16]]; (* 6 roots, 3 wrong *) Print[NSolve[f,x,21]]; (* 4 roots, 2 correct, 1 double wrong, 1 single wrong *) Print[NSolve[f,x,24]]; (* 3 roots, 1 wrong *) Print[NSolve[f,x,28]]; (* 3 roots, 1 wrong *) Print[NSolve[f,x,32]]; (* 2 correct roots, missed 1 *) Print[NSolve[f,x,64]]; (* 2 correct roots, missed 1 *) Print[NSolve[f,x,128]]; (* 3 correct roots *) All 3 roots are single and well conditioned, no problem getting them in single precision with NR. Note: please reply to this newsgroup; DONT send mail to me directly (there is a white list, if not in list your msg >null)
- Follow-Ups:
- Re: Beware of NSolve - nastier example
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: Beware of NSolve - nastier example
- From: DrBob <drbob@bigfoot.com>
- Re: Beware of NSolve - nastier example