Can fricas solve this equation?

31 views
Skip to first unread message

Pieter van Oostrum

unread,
Jan 12, 2023, 1:15:03 PM1/12/23
to fricas...@googlegroups.com
I saw a math olympiad problem:

solve 27^x = 1/x

The solution is rather simple, although not completely trivial.
Solution: x = 1/3.

I tried to solve this with fricas, but it can't fins a solution.

(1) -> solve(27^x = 1/x, x)

(1) []
Type: List(Equation(Expression(Integer)))

On my iPad I tried it with PocketCAS (based of giac), and it does find a slution, although not an exact one.

solve(27^x = 1/x, x)
->[exp(-LambertW(ln(27)))]
which is correct, but it calculates it approximately 0.3333333333

Is there a way to get this result in Fricas, preferably exact?
--
Pieter van Oostrum <pie...@vanoostrum.org>
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]

Валерий Заподовников

unread,
Jan 13, 2023, 7:50:18 AM1/13/23
to FriCAS - computer algebra system

Waldek Hebisch

unread,
Jan 13, 2023, 6:09:30 PM1/13/23
to fricas...@googlegroups.com
On Thu, Jan 12, 2023 at 07:15:01PM +0100, Pieter van Oostrum wrote:
> I saw a math olympiad problem:
>
> solve 27^x = 1/x
>
> The solution is rather simple, although not completely trivial.
> Solution: x = 1/3.
>
> I tried to solve this with fricas, but it can't fins a solution.
>
> (1) -> solve(27^x = 1/x, x)
>
> (1) []
> Type: List(Equation(Expression(Integer)))
>
> On my iPad I tried it with PocketCAS (based of giac), and it does find a slution, although not an exact one.
>
> solve(27^x = 1/x, x)
> ->[exp(-LambertW(ln(27)))]
> which is correct, but it calculates it approximately 0.3333333333
>
> Is there a way to get this result in Fricas, preferably exact?

ATM FriCAS can not solve such an equation. As a general comment
let me say that FriCAS focuses on general methods which scale
resonably well. Also, while FriCAS documentaion says that
"variables" by default are real, in fact FriCAS solution methods
work mostly in complex domain. In complex domain equations like
you gave have infinite number of solutions. In this case, 'lambertW'
is multivalued and in fact represents infinite set of solutions
(probably all). As noted, 'lambertW' solution is exact. You can
use FriCAS to verify this. Namely, note that the equation is
equivalent to

x*exp(log(27)*x) = 1

Now plug in 'exp(-lambertW(a))' inside:

(3) -> exp(-lambertW(log(27)))*exp(log(27)*exp(-lambertW(log(27))))

(3) 1
Type: Expression(Integer)

We got 1, so this is true equality. In fact, this is more general,
'exp(-lambertW(a))' solves 'x*exp(a*x) = 1'. FriCAS can not check
this directy, but there is general 'lambertW' indentity:

exp(-lambertW(a)) = 1/exp(lambertW(a)) = lambertW(a)/a

If we plug in this into equation we get:

(9) -> (lambertW(a)/a)*exp(a*(lambertW(a)/a))

(9) 1
Type: Expression(Integer)

Coming back to original equation, if you seek for rational solutions,
for this equation solution can be easily obtained by factorization.
However, in general factorization is prohibitively expensive.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages