# Complex vs. real results of log(b,a)

Sebastian Voß shared this question 1 year ago
Answered

Hello,

when i type "log(2, -8)" in Geogebra Classic (Windows 10, v6.0.620.0-offline), i get the result "undefined".

When i type the same in Geogebra CAS (Windows 10, v6.0.620.0-offlinecas), i get the complex result "(ln(8)+i*pi)/ln(2)". When i use the aprroximate-button, the result turns to "?".

Is this behaviour intended? Unfortunately i cannot find an option to enable/disable complex results - this would be great for introducing the log-function for the first time. Would it be possible to integrate this? Or is this option already there and i have missed it?

## Comments (5)

1

If you make a complex number eg z_1 = 1+2 ί then you can use ln(z_1)

Complex numbers aren't supported for the other "log" functions in the Algebra View

1

Hmm, sorry, but this doesn't really answer my question. It's not about complex numbers as an argument for the log-function, but as a result of log(2, -8). GGB Classic yields "undefined" as result, while GGB CAS yields a complex number as result. I wonder, if there is an option to toggle this behaviour (e.g. complex results on/off)?

1

What follows is not really an answer to your question, but maybe it can be a starting point for developing an application that guides students towards what you would like to achieve.

If you type ln(-8), geogebra classic gives you "undefined"

If you type ln(-8+0*i), the result is 2.08+3.14i

With some user interface this difference in behaviour may be used as some kind of switch.

1

Ah ok! This behaviour of GGB Classic would be perfectly fine: If my argument is a complex number, the result will also be a complex number. But if my argument is a real number and negative, the result would be undefined.

Would it be possible to implement this behaviour in GGB CAS, too? This would also increase the consistency of Classic and CAS.

By the way: The graphing calculator behaves as GGB Classic.

1

Sorry, we won't be changing that

Leave a Comment
• GeoGebra
• Help
• Partners
• Contact us
• Feedback & Questions
• This email address is being protected from spambots. You need JavaScript enabled to view it.
• +43 677 6137 2693
© 2022 International GeoGebra Institute