1
$\begingroup$

I have been desperately trying to find a way to get this equation solved with Mathematica (I am using version 11.1 if that matters):

$$ a\sqrt7 + b\sqrt{11} = (\sqrt7 + \sqrt{11})^{13}, $$

assuming that $a$ and $b$ are positive integers.

This is a really easy equation to solve and it admits the solution $a=2274430976$ and $b=1814368256$.

So naturally I thought Mathematica would find the result:

Solve[{(Sqrt[7] + Sqrt[11])^(13) == a Sqrt[7] + b Sqrt[11] && a > 0 && b > 0}, {a, b}, Integers]

But instead, I get a warning message:

Solve::svars: Equations may not give solutions for all "solve" variables.

And then the "solution" is this weird output:

{{b -> ConditionalExpression[(2274430976 Sqrt[7] + 1814368256 Sqrt[11] - Sqrt[7] a)/Sqrt[11], (a | (2274430976 Sqrt[7] + 1814368256 Sqrt[11] - Sqrt[7] a)/Sqrt[11]) \[Element] Integers && 1 <= a <= 4548861952]}}

So I thought I had to extract the values somehow from the solution, and I tried:

sol=Solve[...]
a./sol

Which yielded:

{a}

No help there. Then I tried using Normal[%] and First[%] and various combinations thereof, but I got even weirder output.

How can I find the correct numerical solutions for $a$ and $b$? All the help I find online ends up in weird warnings. Maybe my Mathematica is too old, and has a different syntax? Can someone help?


EDIT: I'm using version 11.1

$\endgroup$
2
  • 1
    $\begingroup$ Expand the RHS: (List @@ ((Sqrt[7] + Sqrt[11])^13 // Expand)) /. _Power :> 1 evaluates to {2274430976, 1814368256} $\endgroup$
    – Bob Hanlon
    Dec 7, 2023 at 17:06
  • 1
    $\begingroup$ Could extract coefficients of each square root, like so. In[241]:= Solve[ CoefficientList[(Sqrt[7] + Sqrt[11])^(13) - (a*Sqrt[7] + b*Sqrt[11]), {Sqrt[7], Sqrt[11]}] == 0] Out[241]= {{a -> 2274430976, b -> 1814368256}} $\endgroup$ Dec 7, 2023 at 20:56

3 Answers 3

2
$\begingroup$

The expansion yields the result (as expressed by others)

expr = (Sqrt[7] + Sqrt[11])^13 // Expand
Sequence @@ Cases[expr, Times[a_, #] :> a] & /@ {Sqrt[7], Sqrt[11]}

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you for this. This is the only solution that I can reproduce on Mathematica 11.1 so I will accept it. $\endgroup$
    – Klangen
    Dec 8, 2023 at 17:15
1
$\begingroup$

Mathematica v12.2 solves without problems:

Solve[{(Sqrt[7] + Sqrt[11])^(13) == a Sqrt[7] + b Sqrt[11] , a > 0,b > 0}, {a, b}, Integers]
(*{{a -> 2274430976, b -> 1814368256}}*)

Solve[{(Sqrt[7] + Sqrt[11])^(13) == a Sqrt[7] + b Sqrt[11] }, {a,b},PositiveIntegers]
(*{{a -> 2274430976, b -> 1814368256}}*)
$\endgroup$
2
  • 2
    $\begingroup$ So then it's because I'm using Mathematica 11.1? Is that the issue? I don't want to have to spend another 400 USD on a newer version every two years... $\endgroup$
    – Klangen
    Dec 7, 2023 at 13:40
  • $\begingroup$ In fact it also works in version 13.0 for Linux. Maybe the OP has defined something previously and now this is giving problems... $\endgroup$
    – mattiav27
    Dec 7, 2023 at 13:40
1
$\begingroup$

Use Reduce instead of Solve

Reduce[{(Sqrt[7] + Sqrt[11])^(13) == a Sqrt[7] + b Sqrt[11] && a > 0 &&    b > 0}, {a, b}, Integers]

(*a == 2274430976 && b == 1814368256*)

Also

FindInstance[(Sqrt[7] + Sqrt[11])^(13) == a Sqrt[7] + b Sqrt[11], {a,b}, Integers]

Gives the same output.

And also

NSolve[{(Sqrt[7] + Sqrt[11])^(13) == a Sqrt[7] + b Sqrt[11] && a > 0 && b > 0}, {a, b}, Integers]
$\endgroup$
6
  • $\begingroup$ For Reduce, I get this/ $$(a | b) \[Element] Integers && b == 4096/11 (4872571 + 555281 Sqrt[77]) - Sqrt[7/11] a$$, and for FindInstance I get "FindInstance::nsmet: The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist." $\endgroup$
    – Klangen
    Dec 7, 2023 at 13:40
  • $\begingroup$ @Klangen that is weird... I have tried mine and yours code on version 11.3 and it also works. Try restarting Mathematica. If it still doesn't work it might be a version specific problem $\endgroup$
    – mattiav27
    Dec 7, 2023 at 13:43
  • $\begingroup$ Is it possible that in version 11.3 they switched the behaviour of Solve, from symbolic/conditional to numerical? $\endgroup$
    – Klangen
    Dec 7, 2023 at 14:00
  • $\begingroup$ I don't know... but you can also try NSolve this is purely numerical @Klangen $\endgroup$
    – mattiav27
    Dec 7, 2023 at 14:05
  • $\begingroup$ NSolve yields the same warning and ConditionalExpression as Solve $\endgroup$
    – Klangen
    Dec 7, 2023 at 14:40

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.