       • To: mathgroup at smc.vnet.net
• Subject: [mg77773] bad performance of Reduce (5.2)
• From: dimitris <dimmechan at yahoo.com>
• Date: Sat, 16 Jun 2007 03:34:05 -0400 (EDT)

```Hello.

\$VersionNumer
5.2

o=Sin[ArcTan[z] + ArcTan[2*z]] -1/Sqrt ;

The equation o=0 has two roots in the real positive axis

Plot[Sin[ArcTan[z] + ArcTan[2*z]] - 1/Sqrt, {z, 0, 5}]

In:=
Needs["NumericalMath`IntervalRoots`"]

In:=
IntervalBisection[Sin[ArcTan[z] + ArcTan[2*z]] - 1/Sqrt, z,
Interval[{0, 5}], 0.1]
List @@ %
(FindRoot[Sin[ArcTan[z] + ArcTan[2*z]] - 1/Sqrt == 0, {z, #1[],
#1[]}, WorkingPrecision -> 30,
PrecisionGoal -> 20] & ) /@ %

Out=
Interval[{0.23437500000000014, 0.31250000000000033}, {1.71875,
1.7968750000000009}]

Out=
{{0.23437500000000014, 0.31250000000000033}, {1.71875,
1.7968750000000009}}

Out=
{{z -> 0.28077640640441513745535298432248087547755357014`30.}, {z ->
1.780776406404415137455352463993519256286808059355`30.}}

Solve returns the correct roots.

In:=
Off[N::meprec]

In:=
Solve[Sin[ArcTan[z] + ArcTan[2*z]] == 1/Sqrt, z]
FullSimplify[Sin[ArcTan[z] + ArcTan[2*z]] == 1/Sqrt /. %]

Out=
{{z -> (1/4)*(-3 + Sqrt)}, {z -> (1/4)*(3 + Sqrt)}}

Out=
{True, True}

However, it is well known that Solve is not proper for equations like
o=0.

Let's use Reduce

In:=
Reduce[Sin[ArcTan[z] + ArcTan[2*z]] == 1/Sqrt, z, Reals]
(*ommited output*)

Let's be more specifically!

In:=
Reduce[Sin[ArcTan[z] + ArcTan[2*z]] == 1/Sqrt && z > 0, z, Reals]

Out=
((-Pi + 4*ArcTan[(1/4)*(-3 + Sqrt)] + 4*ArcTan[(1/2)*(-3 +
Sqrt)])/(8*Pi)   Integers && z == (1/4)*(-3 + Sqrt)) ||
((-3*Pi + 4*ArcTan[(1/4)*(3 + Sqrt)] + 4*ArcTan[(1/2)*(3 +
Sqrt)])/(8*Pi)   Integers && z == (1/4)*(3 + Sqrt))

The roots are correct but it appears a strange condition

((-Pi + 4*ArcTan[(1/4)*(-3 + Sqrt)] + 4*ArcTan[(1/2)*(-3 +
Sqrt)])/(8*Pi)   Integers