English 中文(简体)
我如何看待职能的反常?
原标题:How do I get the inverse of a function?

If I have some function y[x_]:=ax+b (just an example), how do I obtain x[y_]:=(y-b)/a in Mathematica? I ve tried InverseFunction,Collect and they don t work.

最佳回答

视之为方程式和使用<代码> Solve。

In:=Solve[y-ax-b==0,x]
Out={{x -> (-b + y)/a}}
问题回答

如果你想要确定一项职能,你可以做到:

x[y_] := x /. Solve[y == a x + b, x][[1]]

x[1]  

-> (1 - b)/a

rel=“nofollow”http://mathworld.wolfram.com/InverseFunction.html

具体如下:

In Mathematica, inverse functions are represented using InverseFunction[f].

一种办法是:

In[29]:= Solve[y == a x + b, x]

Out[29]= {{x -> (-b + y)/a}}




相关问题
Solving vector equations in Mathematica

I m trying to figure out how to use Mathematica to solve systems of equations where some of the variables and coefficients are vectors. A simple example would be something like where I know A, V, and ...

Introspection of messages generated in Mathematica

Is there any way to get at the actual messages generated during the evaluation of an expression in Mathematica? Say I m numerically solving an ODE and it blows up, like so In[1] := sol = NDSolve[{x [...

Connecting points in Mathematica

I have a collection of points displayed in a graphic: alt text http://img69.imageshack.us/img69/874/plc1k1lrqynuyshgrdegvfy.jpg I d like to know if there is any command that will connect them ...

Mathematica, PDF Curves and Shading

I need to plot a normal distribution and then shade some specific region of it. Right now I m doing this by creating a plot of the distribution and overlaying it with a RegionPlot. This is pretty ...

Targeted Simplify in Mathematica

I generate very long and complex analytic expressions of the general form: (...something not so complex...)(...ditto...)(...ditto...)...lots... When I try to use Simplify, Mathematica grinds to a ...

热门标签