Re: Solve Limitations

• To: mathgroup at smc.vnet.net
• Subject: [mg62993] Re: [mg62963] Solve Limitations
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Sat, 10 Dec 2005 06:03:03 -0500 (EST)
• References: <200512091010.FAA05489@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Marcelo Mayall wrote:
> Let's suppose that we are interested in the roots analytic expression of
> the following function:
> In[1] :=  f = a x + b x^(3/2) + c;
> The function Solve could be used:
> In[2] :=  sol = Solve[f==0, x];
> Defining the values of the constants a, b, c would return the following numeric values:
> In[3] :=  froots = Solve[f==0, x]/. {a->1, b->1, c->1} //N
> Out[3] =  {{x-> 2.1479}, {x-> -0.57395 + 0.368989 I}, {x-> -0.57395 - 0.368989 I}}
> However, f is not null for those values and therefore, these are not the roots of f:
> In[4] :=  f/. froots/. {a-> 1, b-> 1, c-> 1} //Chop
> Out[4] =  {6.2958, 0, 0}
> At first, it seems that the function Solve doesn't take appropriately in
> consideration the term in square root.
> Some idea to obtain the correct analytic solution of f ??? Or, in fact, this a limitation of the function Solve???
>
> Thanks,
> Marcelo Mayall
>

In this case Solve in effect reformulates as a cubic polynomial (in
Sqrt[x]). It then solves and returns all solutions it cannot remove as
obvious parasites. Typical for examples with parameters is that all
solutions are returned. This is reflected in the fact that different
solutions may be parasites for different sets of parameter values.

f = a*x + b*x^(3/2) + c;
sol = Solve[f==0, x];

For the substitution you indicate the first solution is a parasite.

In[73]:= Chop[N[f /. sol /. {a->1, b->1, c->1}]]
Out[73]= {6.2958, 0, 0}

Here is the next one I tried. Now the second and third are parasites.

In[74]:= Chop[N[f /. sol /. {a->3, b->-1, c->1}]]
Out[74]= {0, 0.0992133 + 0.35204 I, 0.0992133 - 0.35204 I}

Here is a case where all three solutions are valid.

In[77]:= Chop[N[f /. sol /. {a->3, b->2*I,c->1}]]
Out[77]= {0, 0, 0}

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Using The Random Function to predict Things
• Next by Date: Re: Using The Random Function to predict Things
• Previous by thread: Re: Solve Limitations
• Next by thread: Re: Solve Limitations