2
$\begingroup$

I want to find integer solutions of the following inequality by using Mathematica

$$\bigg| \sqrt[3]{2}-\frac{p}{q} \bigg | <\frac{1}{q^{5/2}}$$

Reduce[Abs[Surd[2, 3] - p/q] < 1/q^(5/2), {p, q}, Integers] //ToRadicals // TraditionalForm

but there is a strange result

enter image description here

I also tried FindInstance but there is the only one solution

FindInstance[Abs[Surd[2, 3] - p/q] < 1/q^(5/2), {p, q}, Integers, 2]

enter image description here

There are 3 solutions according the Wolfram Alpha

enter image description here

but...

WolframAlpha["Abs[Surd[2,3]-p/q]<1/q^2.5)", {{"IntegerSolution"}, "Content"}]

{}

It's still not working..

I tried "Open Code" in WolframAlpha but it didn't help me.

what's going on here? :)

$\endgroup$
2
  • 2
    $\begingroup$ If you don't mind specifying a range of integers to search (which, understandably, you probably do) you could use a region: reg = ImplicitRegion[Abs[Surd[2, 3] - p/q] < 1/q^(5/2), {{p, 1, 5}, {q, 1, 5}}]; and then Reduce[Element[{p, q}, reg], {p, q}, Integers] gives you the desired output. $\endgroup$ Commented Sep 30, 2017 at 12:46
  • $\begingroup$ A graphical solution is possible with Show[Graphics[{LightGray, Table[Point[{i, j}], {i, 0, 6}, {j, 0, 6}]}, Axes -> True], RegionPlot[Abs[Surd[2, 3] q - p] < 1/q^(3/2), {p, 0, 6}, {q, 0, 6}, Frame -> True], Graphics[{Red, Point[{1, 1}], Point[{2, 1}], Point[{5, 4}]}, Axes -> True]] to make yourself shure this are all solutions of integer pairs. $\endgroup$ Commented Mar 26, 2020 at 21:56

1 Answer 1

4
$\begingroup$

See KennyColnago answer.

Union[Flatten[
Select[Table[
Quiet[FindInstance[Abs[Surd[2, 3] - p/q] < 1/q^(5/2), {p, q}, 
Integers, 2, RandomSeed -> k]], {k, 1, 200}], 
Head[#] =!= FindInstance &], 1]]

(* {{p -> 1, q -> 1}, {p -> 2, q -> 1}, {p -> 5, q -> 4}} *)
$\endgroup$
1
  • $\begingroup$ Too slow....... $\endgroup$
    – vito
    Commented Oct 1, 2017 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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