Mathematica 中的反三角函数范围
让我们假设所有数字都是真实。我试图在mathematica中获取一个区间内ArcSin
的所有值。特别是,mathematica 中 ArcSin
的正常行为是 ArcSin[x]
位于 [-Pi/2,Pi/2]
区间内每当 x
在 [-1,1]
区间内为实数时。
但是,我需要获取每个 x
的 [0,2 Pi]
间隔中的所有角度,如上所述。有办法实现这一点吗?
Let us assume that all numbers are real. I'm trying to obtain in mathematica all values of ArcSin
in an interval. In particular, the normal behavior of ArcSin
in mathematica is that ArcSin[x]
is in [-Pi/2,Pi/2]
interval whenever x
is real in [-1,1]
interval.
However, I need to obtain all the angles in [0,2 Pi]
interval for every x
as above. Is there a way to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Leonid 的答案中隐含的是公式
从上面两个无限家族解决方案,您可以找到对于任何给定的
y
和可接受的x
范围满足y = sin(x)
的角度(请参阅 Leonid 的回答,其中,每次调用时,都会生成上述内容以及额外条件start <= x <= end
并吐出x
的所有解决方案。)显式公式为x 值范围
[0,请
注意,前两行是边缘值,中间的线取自上述无限解的一个族,最后两行放在一起取自另一族的解。这与狮子座的评论一致:
上述公式假定 ArcSin 的主值。
主值
在任何 2 pi 周期内,对于给定的
y
,Sin[x] == y
有两种解决方案。从Sin[x]
(2 pi 周期)的图表中可以明显看出这一点拥有唯一的反函数
x = ArcSin[y]
您需要选择您想要的特定解决方案(从两个无限系列中)。 Mathematica 选择标准范围-Pi/2 < x < Pi/2
。这个选择(按照惯例)是反三角函数Implicit in Leonid's answer is the formula
From the two above infinite families of solutions, you can find the angles satisfying
y = sin(x)
for any giveny
and range of acceptablex
(See Leonid's answer, which, every time it's called, generates the above along with the extra conditionstart <= x <= end
and spits out all solutions forx
.)The explicit formula for x values in the range
[0, Pi)
isNote that the first two lines are the edge values, the middle line is taken from one family of the above infinite solutions and the last two lines taken together are from the other family of solutions. This agrees with Leonids comment:
The above formulae assume the principal value for
ArcSin
.Principal Value
In any 2 pi period, there are two solutions to
Sin[x] == y
for a giveny
. This is obvious from the graph forSin[x]
(which is 2 pi periodic)To have a unique inverse function
x = ArcSin[y]
you need to choose which particular solution (out of the two infinite families) you want. Mathematica chooses the standard range-Pi/2 < x < Pi/2
. This choice is (by convention) the principal value of the inverse trigonometric function您可以尝试如下操作:
例如:
You can try something like the following:
For example:
你不能。正如您所知,
ArcSin
是Sin
函数的反函数,该函数在 [0,2 Pi] 范围内不是双射的。此范围内的某些 x 值会产生相同的Sin
值(例如,Sin[3/4 [Pi]] == Sin[1/4 [Pi]]),因此您不能扭转这个过程。您可以在绘图中获得的最接近的结果类似于:
[https://i.sstatic.net /Jcqxy.png">
You can't.
ArcSin
, as you will be well aware of, is the inverse function of theSin
function which isn't bijective in the range [0,2 Pi]. Some of the x values in this range yield the sameSin
value (e.g., Sin[3/4 [Pi]] == Sin[1/4 [Pi]]), so you can't reverse this process.The closest you can get in plotting would be something like:
[https://i.sstatic.net/Jcqxy.png">