Solving logarithmic equations

40 views
Skip to first unread message

Paolo Robillos

unread,
Apr 9, 2022, 5:18:09 AM4/9/22
to sage-support

Hi, 

I am trying to solve the following equation for x, 1+2log(x+1, 4)==2log(x,2)

I entered in the input "(1+2log(x+1, 4)==2log(x,2)).solve(x,algorithm='sympy', domain='all')"

and the Output was "{𝑥∣𝑥∈ℂ∧−𝑥2log(2)+𝑒(𝑥+1)1log(2)=0}∖{𝑥∣𝑥∈ℂ∧𝑥2log(2)=0}"

The answer I am looking for is "x = 1+3^(1/2)."


sagemath.png

David Joyner

unread,
Apr 9, 2022, 5:34:10 AM4/9/22
to SAGE support
You're right, but here is a comment to show SymPy is on the right track:

The first equation is x^(2/log(2)) == e*(x + 1)^(1/log(2)). If you
first raise both sides ro the log(2) power, SageMath can solve it:

sage: solve(x^(2) == e^(log(2))*(x + 1), x)
[x == -sqrt(3) + 1, x == sqrt(3) + 1]


>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/4f7fb72f-b292-4abd-8740-9a5f50491a2an%40googlegroups.com.

Emmanuel Charpentier

unread,
Apr 9, 2022, 5:37:17 PM4/9/22
to sage-support

BTW :

sage: solve(1+2*log(x+1, 4)==2*log(x,2), x, to_poly_solve="force")
[x == -sqrt(3) + 1, x == sqrt(3) + 1]

HTH,

Reply all
Reply to author
Forward
0 new messages