# Inverse on a restricted domain

I have a function, whose domain is [0,1]. The function is

f = Piecewise[{{Exp[-β * (-Log[#])^α], 0 < # <= 1}}, #]&


with β > 0 and α > 0

(side note: is this the best way of defining the function such that it's Exp[-β * (-Log[#])^α] on (0,1] and 0 at 0?)

I would now like to use the inverse of this function, which I'm pretty sure exists (and is E^(-(-1)^((1/α)) β^(-1/α) Log[w]^(1/α))). However,

InverseFunction[f]


simply returns the call and not the actual inverse.

At this point I'm not sure whether it's my lousy Mathematica skills that keep me from getting the correct inverse or whether there's something in the math that I've neglected to consider. What am I doing wrong? How do I tell Mathematica to just find the inverse on [0,1] and how do I tell it that both parameters are positive?

In this case, I would restrict the domain of the inverse after inverting it, as follows

invf = InverseFunction[Exp[-β (-Log[#])^α] &]
(* E^(-(-1)^((1/α)) β^(-1/α) Log[#1]^(1/α))& *)

Piecewise[{{E^(-(-1)^((1/α)) β^(-1/α) Log[#1]^(1/α)), 0 < # <= 1}}, #]&


or, a little more programmatically

With[{f = invf[], Piecewise[{{f, 0 < # <= 1}}, #]&]


where the With gets around the HoldAll attribute of Function. Although, this works, too:

Piecewise[{{invf[#], 0 < # <= 1}}, #]&
{"ft_lang_label":"__label__en","ft_lang_prob":0.90876794,"math_prob":0.92711824,"size":793,"snap":"2021-31-2021-39","text_gpt3_token_len":236,"char_repetition_ratio":0.11153359,"word_repetition_ratio":0.0,"special_character_ratio":0.32282472,"punctuation_ratio":0.09467456,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99600154,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-25T01:17:47Z\",\"WARC-Record-ID\":\"<urn:uuid:60cac742-e022-47e4-a22d-31f043dc54d6>\",\"Content-Length\":\"164526\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bb30ae26-2390-49fb-9b8b-1ea95c2e55c7>\",\"WARC-Concurrent-To\":\"<urn:uuid:5061413d-756f-42f8-b0c3-2760a85b0d6e>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/29582/inverse-on-a-restricted-domain/29632#29632\",\"WARC-Payload-Digest\":\"sha1:FBKMUKAHK4VYM6OPBPO4BE5ZJ5GNZIQ6\",\"WARC-Block-Digest\":\"sha1:QRWOIFPGHGXI7GWJXYLQQV64ZCCDK6MZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057584.91_warc_CC-MAIN-20210924231621-20210925021621-00119.warc.gz\"}"}