Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了计算 f(x) 的反函数,我定义了以下函数:
inv(fx):=exp▶list(solve(fx=y,x),x)
输出是:
inv(x^(2)) {piecewise(−√(y),y≥0),piecewise(√(y),y≥0)}
所以这部分已经可以工作了,但是我怎样才能将这个结果用作可调用函数 i(y) 呢?
谢谢你的帮助
在您的程序之外,您可以使用以下方法将结果转换为函数i(y):
i(y)
i(y):=piecewise(-√(y),y≥0,√(y),y≥0)
我没有 CAS,因此您的结果可能会有所不同,但是,因为该函数只能返回一个值,所以它只会返回(并在图表中显示)第一个值,在这种情况下,-√(y). 如果要在图表上显示或获取两者的值,最好创建两个单独的函数(-√(y)和√(y))。希望这可以帮助您“将结果用作可调用函数”。
-√(y)
√(y)