Re: FindInstance puzzler
- To: mathgroup at smc.vnet.net
- Subject: [mg83712] Re: FindInstance puzzler
- From: m.r at inbox.ru
- Date: Wed, 28 Nov 2007 05:50:25 -0500 (EST)
- References: <figur5$fpn$1@smc.vnet.net>
On Nov 27, 5:25 am, Tom Burton <n... at brahea.com> wrote:
> A diagnosis seems easy enough, but so far a cure eludes me. Observe
> that your conditions contain the radical Sqrt[z1^2+4z2]. Your
> invocation of FindInstance asks it to assume that, not only the
> variables but also all function values are real, in particular Sqrt,
> implying that z1^2+4z2>0. Indeed, all points found satisfy this
> condition. No puzzler here. Unfortunately, when I try the suggested
> variation to relax this assumption,
>
> RegionPlot[conds,{z1,-.75,2.25},{z2,-1.25,1.25},PlotPoints->90,
> Epilog->Point[{z1,z2}/.
> FindInstance[conds&&Element[{z1,z2},Reals],{z1,z2},10^3]
> ]]
>
> the kernel goes out to lunch. I hope someone has a better idea.
>
> Tom
>
> When responding, please replace news with my first initial and full
> last name, as one word.
>
> Tom Burton
>
> > ...
> > RegionPlot[conds, {z1, -.75, 2.25}, {z2, -1.25, 1.25}, PlotPoints -
> > > 90,
> > Epilog -> Point[{z1, z2} /. FindInstance[conds, {z1, z2}, Reals,
> > 10^3]]]
> > ...
Hitting conds a couple of times with a hammer helps:
In[2]:= Reduce[ComplexExpand[conds /. Sqrt[z1^2 + 4 z2] -> r, r] &&
Element[{z1, z2}, Reals] /.
a_/z2^2 >= b_ :> a >= b z2^2 && z2 != 0 /.
r -> Sqrt[z1^2 + 4 z2],
{z1, z2}]
Out[2]= (z1 == -1/2 && z2 == 1/2) || (-1/2 < z1 < 0 && -z1 <= z2 <= 1
+ z1) || (0 <= z1 < 1 && 0 < z2 <= 1 - z1) || (0 < z1 <= 1 && (-z1^2/4
< z2 < 0 || -z1 <= z2 <= -z1^2/4)) || (1 < z1 < 2 && (-z1^2/4 < z2 <=
1 - z1 || -1 <= z2 <= -z1^2/4)) || (z1 == 2 && z2 == -1)
RegionPlot[conds, {z1, -.75, 2.25}, {z2, -1.25, 1.25},
PlotPoints -> 90,
Epilog -> Point[{z1, z2} /. FindInstance[%, {z1, z2}, 10^3]]]
Maxim Rytin
m.r at inbox.ru