mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Math (https://www.mersenneforum.org/forumdisplay.php?f=8)
-   -   Inverse of functions (https://www.mersenneforum.org/showthread.php?t=15519)

 Raman 2011-04-13 17:31

Inverse of functions

That website [URL]http://wims.unice.fr[/URL] contains a plenty of useful online calculators,
really a lot, but I couldn't find out a place where inverse of functions is being sought.

For example take up with 1. [TEX]e^x + sinh(x)[/TEX]
Can put with [TEX]sinh(x) = \frac{e^x - e^{-x}}{2}[/TEX] and then solve with that quadratic for [TEX]e^x[/TEX].
The inverse is being given by [TEX]ln (\frac{x\pm\sqrt{x^2+3}}{3})[/TEX]

2. [TEX]cosh(x) + sinh(x)[/TEX]
The inverse of this function is given by [TEX]ln\ x[/TEX]
[COLOR=White]just simply this case goes away within that way.[/COLOR]
3. [TEX]cos(x)+sin(x)[/TEX]
Writing with this function as [TEX]\sqrt{2}\ sin(x+\frac{\pi}{4})[/TEX]
The inverse can be given by [TEX]sin^{-1}\frac{x}{\sqrt 2}-\frac{\pi}{4}[/TEX]

OK, then what will be the inverses of these following functions?
It seems that they cannot be solved by using all those elementary mathematical functions at all!
(4) [TEX]x^x[/TEX]
(5) [TEX]x^{\frac{1}{x}}[/TEX]
(6) [TEX]x+sin(x)[/TEX]
(7) [TEX]x+tan(x)[/TEX]
(8) [TEX]x+e^x[/TEX]
(9) e[TEX]^x+sin(x)[/TEX]
(10) [TEX]sin(x)+sinh(x)[/TEX]

Thanks for your help, if possible within any case

Disclaimer:
I had faced a problem which asked me to give an algorithm to check out if N is a perfect power, x[sup]y[/sup] where that value of y is ≥ 2. I told that it can be done by using checks of [TEX]\sqrt{x}[/TEX], [TEX]log_2(x)[/TEX], [TEX]^3\sqrt{x}[/TEX], [TEX]log_3(x)[/TEX], [TEX]^4\sqrt{x}[/TEX], [TEX]log_4(x)[/TEX], ... alternately, what value to check upto for base? Till N = z[sup]z[/sup], for some value of z. Thus, how to write up with that value of z as a function of N? [COLOR=White]How does that way work out rather...[/COLOR]

 CRGreathouse 2011-04-13 19:17

[QUOTE=Raman;258429]That website [URL]http://wims.unice.fr[/URL] contains a plenty of useful online calculators,
really a lot, but I couldn't find out a place where inverse of functions is being sought.[/QUOTE]

The problem is hard and in general cannot be done symbolically.

[QUOTE=Raman;258429]I had faced a problem which asked me to give an algorithm to check out if N is a perfect power, x[sup]y[/sup] where that value of y is ≥ 2. I told that it can be done by using checks of [TEX]\sqrt{x}[/TEX], [TEX]log_2(x)[/TEX], [TEX]^3\sqrt{x}[/TEX], [TEX]log_3(x)[/TEX], [TEX]^4\sqrt{x}[/TEX], [TEX]log_4(x)[/TEX], ... alternately, what value to check upto for base? Till N = z[sup]z[/sup], for some value of z. Thus, how to write up with that value of z as a function of N? [COLOR=White]How does that way work out rather...[/COLOR][/QUOTE]

For that one you'll need a special function like Lambert's W, or numerical techniques. I think it's exp(W(log N)). W(x) is about log x - log log x, so this is roughly exp(log log N - log log log N) = log N / log log N, where log is the natural log.

 science_man_88 2011-04-13 19:58

[QUOTE=CRGreathouse;258444]The problem is hard and in general cannot be done symbolically.

For that one you'll need a special function like Lambert's W, or numerical techniques. I think it's exp(W(log N)). W(x) is about log x - log log x, so this is roughly exp(log log N - log log log N) = log N / log log N, where log is the natural log.[/QUOTE]

if he didn't want work I'd say use PARI's ispower() with a loop through base values.

 CRGreathouse 2011-04-13 23:05

[QUOTE=science_man_88;258450]if he didn't want work I'd say use PARI's ispower() with a loop through base values.[/QUOTE]

With ispower() there's no need to loop at all -- ispower(N) does the right thing. ispower(N, b) is only when you want to check for a particular base and no others.

You should look at the code for it some time, it's fascinating. They check for 2nd, 3rd, and 5th powers separately, then move on to general testing for larger bases. Some amount of trial division is also done so you don't have to check quite as high, IIRC.

Incidentally, Bernstein has a nice paper about doing this test efficiently, in almost-linear time. Pretty impressive stuff.

 science_man_88 2011-04-13 23:22

[QUOTE=CRGreathouse;258465]With ispower() there's no need to loop at all -- ispower(N) does the right thing. ispower(N, b) is only when you want to check for a particular base and no others.

You should look at the code for it some time, it's fascinating. They check for 2nd, 3rd, and 5th powers separately, then move on to general testing for larger bases. Some amount of trial division is also done so you don't have to check quite as high, IIRC.

Incidentally, Bernstein has a nice paper about doing this test efficiently, in almost-linear time. Pretty impressive stuff.[/QUOTE]

Bernstein ? I don't have a math degree and have never read the name to my knowledge.

 CRGreathouse 2011-04-13 23:29

[QUOTE=science_man_88;258467]Bernstein ? I don't have a math degree and have never read the name to my knowledge.[/QUOTE]

Read and be enlightened:
[url]http://cr.yp.to/[/url]

In particular, his math stuff is mostly in one of these:
[url]http://cr.yp.to/ntheory.html[/url]
[url]http://cr.yp.to/factorization.html[/url]
[url]http://cr.yp.to/arith.html[/url]

 All times are UTC. The time now is 04:54.