MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: R: Problem with circles in complex plane

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61133] Re: R: [mg61095] Problem with circles in complex plane
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Tue, 11 Oct 2005 03:20:34 -0400 (EDT)
  • References: <DFBFB541-1F25-4B4C-8967-7E467DBB59B4@mimuw.edu.pl>
  • Sender: owner-wri-mathgroup at wolfram.com

I notice that there is an even simpler way:


Solve[(ComplexExpand[(Re[CF] - Re[Cg])^2 +
        (Im[CF] - Im[Cg])^2, {P, G}] - (RF + Rg)^2 /.
     rul) == 0, g]

  Potential solution  
-0.377592629328396048282835483011872267671725623879`32.97373448684384 
(possibly discarded by verifier) should be checked by
hand. May require use of limits.


{{g -> 0.9136201753885568}}


This makes fewer assumptions than my earlier message but produces a  
curious message that I have never seen before.



On 10 Oct 2005, at 22:09, Andrzej Kozlowski wrote:

>
> On 10 Oct 2005, at 19:05, Daniele Lupo wrote:
>
>
>
>>>
>>>
>>>
>>
>> The fact is that I must to find a symbolic solution: for every P,  
>> Q, G that
>> satisfy myu conditions (absolute value, real number and so on), I  
>> want to
>> find the g value that define the tangent circle.
>>
>> I hope that's more clear...
>>
>>
>
> What is not clear is how you managed to get a symbolic formula, if  
> you did. I have not tried it very hard, but on quick glance I do  
> not think there is any way to do so "reliably". Solve will only  
> give you reliable general solutions for algebraic equations:  
> basically polynomial and rational functions. It can also solve  
> equations with radicals but this is much harder and time consuming  
> and may produce extraneous solutions. Now, the equation that you  
> get if you apply Solve without any massaging is transcendental (it  
> involves the function Abs) and when Mathematica solves such  
> equations it can fail to find all solutions. This is normal. So if  
> you want to get all solutions you need to convert the equation to a  
> basically algebraic form. This can be done, if you make some  
> assumptions. I will assume that we know that there exists an real  
> solution between 0 and 1. Once we do that we can proceed as follows.
>
> We start with your definitions:
>
> In[1]:=
> CF = G/(Q + 1);
>
> In[2]:=
> RF = Sqrt[Q^2 + (1 - Abs[G]^2)*Q]/(Q + 1);
>
> In[3]:=
> Cg = (g*Conjugate[P])/(1 - Abs[P]^2*(1 - g));
>
> In[4]:=
> Rg = (Sqrt[1 - g]*(1 - Abs[P]^2))/(1 - Abs[P]^2*(1 - g));
>
> In[5]:=
> rul = {G -> -0.4608904699810983 + 0.11491290040984217*I, Q -> 0.3,
>    P -> -0.8363463602974097 + 0.16256926406081632*I}
>
> Out[5]=
> {G -> -0.4608904699810983 + 0.11491290040984217*I, Q -> 0.3,
>   P -> -0.8363463602974097 + 0.16256926406081632*I}
>
>
> Now, I am assuming that g is a solution of the equation
>
> Abs[CF - Cg]^2 - (RF + Rg)^2==0 (I am trying to minimize the number  
> of square roots)
>
> and moreover than it is a real solution and that it lies between 0  
> and 1. This makes it possible to transform the equation as follows:
>
>
> eq = Simplify[ComplexExpand[Abs[CF - Cg]^2 - (RF + Rg)^2,
>      {P, G}, TargetFunctions -> {Re, Im}], 0 < g < 1] /.
>    rul
>
>
> ((0.16256926406081632*g)/(0.7259040000000001*(g - 1) +
>       1) + 0.08839453877680166)^2 +
>   ((0.8363463602974097*g)/(0.7259040000000001*(g - 1) +
>       1) - 0.35453113075469095)^2 +
>   (0.07512861721599995*(g - 1))/
>    (0.7259040000000001*(g - 1) + 1)^2 -
>   (0.2394020778504835*((g - 1)^2)^(1/4))/
>    (0.7259040000000001*(g - 1) + 1) - 0.19071745562130174
>
>
> As you can see this is  now an algebraic equation. We can now use  
> NSolve:
>
> In[7]:=
> NSolve[eq == 0, g]
>
> Out[7]=
> {{g -> 0.9136201753885588}}
>
>
>
>>  but, as I said, but I think that a symbolic solution
>> must exist. In this case, I don't understand why with FindRoot I  
>> find the
>> solution (considering numeric approximation), while with Solve,  
>> that's
>> symbolic method, I obtain wrong values, because Solve gives me  
>> solutions.
>> Maybe I think that Solve gives a wrong result in this case? A  
>> Solve bug? I
>> don't want to think this.
>>
>>
>
> Solve does not find all solutions because it can't reliably solve  
> transcendental equations. It gives you some solutions, which may be  
> actually extraneous.
>
>
>
>> equations cannot be solved, I use FindRoot but, if Solve gives me  
>> solutions,
>> I don't understand why these don't match my problem. If solution is
>> symbolic, why I don't obtain the right solution? It's not a numeric
>> problem...
>>
>>
>>
>
> You are right, it is not a problem with numerical stability, it is  
> just a problem with transcendental equations. You have ot be able  
> to produce an algebraic equation first before you can use Solve  
> reliably.
>
> Andrzej Kozlowski
>
>
>
>
>
>


  • Prev by Date: Re: Problem with circles in complex plane
  • Next by Date: Re: Wick like theorem and "symbolic" compilation
  • Previous by thread: Re: R: Problem with circles in complex plane
  • Next by thread: Using MathLink to create a GUI