3
$\begingroup$

As shown in this video, the expression

$$4 \sqrt{4 - 2 \sqrt{3}} + \sqrt{97 - 56 \sqrt{3}}$$

is in fact an integer.

One way to check is:

FullSimplify[4 Sqrt[4 - 2 Sqrt[3]] + Sqrt[97 - 56 Sqrt[3]]]

which resolves to $3$, and

IntegerQ@FullSimplify[4 Sqrt[4 - 2 Sqrt[3]] + Sqrt[97 - 56 Sqrt[3]]]

resolves to True. Great.

But the direct computation:

IntegerQ[4 Sqrt[4 - 2 Sqrt[3]] + Sqrt[97 - 56 Sqrt[3]]]

gives False.

Why doesn't Mathematica yield True to the direct computation? After all, it resolves other such expressions, such as this trivial example:

IntegerQ[Sqrt[5]^2]

(* True *)

$\endgroup$
3
  • 6
    $\begingroup$ RootReduce can do this simplification and is a pretty powerful tool all-around. $\endgroup$
    – Roman
    Jul 17 at 18:26
  • $\begingroup$ @Roman: Ahh yes... very helpful. Thanks. But still... why would Mathematica give False to the direct approach? $\endgroup$ Jul 17 at 18:29
  • $\begingroup$ @DavidG.Stork Simplification usually does not happen automatically. $\endgroup$
    – bbgodfrey
    Jul 18 at 0:27
11
$\begingroup$

The result of

IntegerQ[4 Sqrt[4 - 2 Sqrt[3]] + Sqrt[97 - 56 Sqrt[3]]]

False

is as designed. Let us look in the documentation to IntegerQ, namely, in the Details section

IntegerQ[expr] returns False unless expr is manifestly an integer (i.e. has head Integer).

Let us check

Head[4 Sqrt[4 - 2 Sqrt[3]] + Sqrt[97 - 56 Sqrt[3]]]

Plus

$\endgroup$
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.