Performing symbolic math steps is often related to pattern recognition. In theory, ChatGPT could be doing a good job here. I wanted to find the inverse of \[f(x) = {\mathrm{sign}}(x) \log(1+|x|)\] This function is a form of a signed logarithmic scaling. So, let's see what ChatGPT is telling us:
The idea to split this into two branches is excellent. Strictly speaking, we should handle \(x=0\) also in one of the branches, but let's ignore that for now. More worisome, somehow, it looses the \({\mathrm{sign}}(x)\) function in step 2 (needed for the \(x\lt 0\) branch). So, let's inform ChatGPT about this:
It says, "Let's include the \({\mathrm{sign}}(x)\) factor," but then it does not actually do that.
Doing the inverse by hand yields: \[f^{-1}(x) = {\mathrm{sign}}(x)(\exp(|x|)-1)\]
Hmm. ChatGPT does not really understand much of my feedback. It is rather polite, but it is just ignoring what I say.
Update 1: Wolfram Alpha
Wolfram Alpha [1] is based on the same symbolic math foundations as Mathematica. I tried the command:
inverse of sign(x)*log(1+|x|)
The response is:
This does not look too good either:
- The inverse function is incorrect
- and the blue line is not the plot of \(e^x-1\).
It is noted that ChatGPT can use Wolfram Alpha [2].
Update 2: Sage
Sage is a well-known open-source symbolic math package. An online version is available [3]. This does not seem to work either:
Sage cannot solve this. I tried doing it for the branches \(x\ge 0\) and \(g \lt 0\) separately. That worked fine. The complete function, however, seems out of reach.
Conclusion
A pen and a piece of paper is sometimes the most reliable tool to do math.
References
- https://www.wolframalpha.com/
- ChatGPT Gets Its “Wolfram Superpowers”!, https://writings.stephenwolfram.com/2023/03/chatgpt-gets-its-wolfram-superpowers/
- https://sagecell.sagemath.org/