[Date Index]
[Thread Index]
[Author Index]
Re: NSolve unable to find all possible roots
*To*: mathgroup at smc.vnet.net
*Subject*: [mg115595] Re: NSolve unable to find all possible roots
*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>
*Date*: Sun, 16 Jan 2011 05:50:55 -0500 (EST)
On 15 Jan 2011, at 10:45, Luiz Melo wrote:
> Dear mathgroup,
> The equation below has three possible roots, namely: 0., 1.99, -1.99.
>
> eq = x*(Sqrt[-13.319 - x^2] + 2.41*Sqrt[1.004 - x^2])
>
> If we try NSolve[eq == 0, x], we get {{kx-> 0.}} only.
>
> How to instruct NSolve to search for the other two roots of the above equation?
>
> Thank you
> Luiz Melo
>
You have some unconventional ideas about the meaning of "root" in mathematics. For example, 1.99 is not normally regarded as a "root" since:
eq = x*(Sqrt[-13.319 - x^2] + 2.41*Sqrt[1.004 - x^2]);
N[eq /. x -> 1.99]
0. + 16.51780004580277*I
which is not-zero. However, if you wish to regard what is known as "parasite solutions" as roots, you can get them too:
Solve[eq == 0, x, VerifySolutions -> False] // N
{{x->-1.99573},{x->0.},{x->1.99573}}
You should be aware that most people will not regard your "solutions" as correct just as it is the usual convention that
Sqrt[4] is 2 and not -2.
Andrzej Kozlowski
Prev by Date:
**Re: FindInstance for sum of primes**
Next by Date:
**Re: How to force numeric output**
Previous by thread:
**NSolve unable to find all possible roots**
Next by thread:
**Re: NSolve unable to find all possible roots**
| |