Group Abstract Group Abstract

Message Boards Message Boards

Getting access to all the roots by Solve

How do I get access to all the roots from Solve?

The attached notebook has a simple example.

i'm trying to Solve for s when this equation equals d:

(Sqrt[2] N s^2)/Sqrt[N (3 + N) s^2 \[Sigma]^2 + 2 (1 + N) \[Sigma]^4]

Solve give me a Root object, but the (only) root it returns is a negative one. But perhaps I'm not facile enough with Roots. :-(

ToRadicals can write the expression, which is what I want, but it seems to have chosen two different negative results.

I can pick the parts by hand, but I'd much prefer to do it all programmatically. How do I get the root I want?

What am I missing?

Thanks
Malcolm

POSTED BY: Malcolm Slaney
3 Replies

It can be worse than negative, it can be complex:

CorrelationThresholdExp /. {\[Sigma] -> 1, N -> 1, d -> 1}

It seems that Solve cannot deal with all the symbolic parameters. With numerical parameters the solution is positive:

Solve[s > 0 && 
   CorrelationDPrime[s, \[Sigma], N] == d /. {\[Sigma] -> 1, N -> 1, 
   d -> 1}, s]
POSTED BY: Gianluca Gorni

I would remove the $Assumptions, so that all four algebraic solutions are displayed.

POSTED BY: Gianluca Gorni

The question remains. Yes, some of the roots will be complex, from both roots. How do I get ToRadicals (or Roots) to all of them to me so I can pick the right one? I think Roots is trying to return the positive one (number 2), but it is failing here.

POSTED BY: Malcolm Slaney
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard