FullSimply 不等式,然后在 Mathematica 7 中重新排列它们
我在笔记本界面中使用 Mathematica 7,我想重新排列不等式,以便在一侧得到某个变量。例如。
FullSimplify[x^3+L+r>3x^3+2r]
但是
L > r + 2 x^3
,我想要:
r < L-2x^3
我们是否可以指示 FullSimplify 以特定方式对变量进行排序?我也使用 Mathematica 进行演示,因此安排变量的方式对我来说很重要。
谢谢
SR
编辑:我尝试了Reduce,虽然这适用于这个例子,但它不适用于我的实际表达式,我收到一条错误消息,
This system cannot be solved with the methods available to Reduce.
编辑:这是实际的表达式:
{L - (m^2 ((-2 + e)^2 \[Delta] + (5 +
2 e (-7 + 4 e)) \[Tau]) \[Omega])/(36 (2 - 3 e + e^2)^2)} > {0}
我希望它以以下形式显示<代码>\[delta]< *某事* 谢谢!
I am using Mathematica 7 in the notebook interface and I want to rearrange an inequality so that I get a certain variable on one side. For eg.
FullSimplify[x^3+L+r>3x^3+2r]
Gives
L > r + 2 x^3
However, I want :
r < L-2x^3
Is there anyway we can instruct FullSimplify to order variables in a particular way? I am using Mathematica for presentation as well so, the way I arrange the variables is important to me.
Thanks
SR
Edit: I tried Reduce, while that works for this example, it does not work for the actual expression I have, I get an error saying,
This system cannot be solved with the methods available to Reduce.
Edit: here is the actual expression:
{L - (m^2 ((-2 + e)^2 \[Delta] + (5 +
2 e (-7 + 4 e)) \[Tau]) \[Omega])/(36 (2 - 3 e + e^2)^2)} > {0}
I want this to be displayed in the form of \[delta]< *something*
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
首先,让 Mathematica 准确地输出你想要的东西就像是一门黑魔法,需要很大的耐心。也就是说,如果您将
Reduce
应用于原始表达式,按照 Belisarius,你会得到然而,正如你所指出的,这不是完整的表达式,并且
Reduce
产生的只能是被描述为应用时不太有帮助的答案。此时需要耐心和大量额外的处理。我首先会说虽然这并没有给你一个干净的答案,但它比以前更好,并且揭示了解决方案的更多结构。 (我不会使用
FullSimplify
因为它会将Delta
与其他项混合在一起。)此时,我们需要更多地了解这些项本身以及Delta
的输出code>In[2] 并不像我们想要的那么有用。我将使用
LogicalExpand
重新扩展它,它为您提供了 12 个术语,这些术语比单独使用Reduce
所提供的要简单得多。 (您会注意到,只有最后六个术语实际上涉及 Delta,因此我会检查变量条件是否实际上与这些条件匹配。)仅选择最后六个术语,第三个术语是同义反复,但是
Simplify
和FullSimplify
似乎都无法删除它。无论如何,我们实际上只对中期感兴趣。如果欧米茄> 0
然后可以通过%[[2,1,2]]
提取您的表达式。将所有这些放在一个表达式中:
写出来之后,我意识到有一种更简单的方法来解决这个问题。我将重做上面的第 2 行,如下所示:
或者,前提是您确实知道
m != 0
和Omega > 。 0
你可以做First of all, getting Mathematica to output something exactly as you would like it is something of a black art, and requires a lot of patience. That said, if you apply
Reduce
to your original expression, as per Belisarius, you'd getHowever, as you pointed out, this isn't the full expression, and
Reduce
produces what can only be described as a less than helpful answer when applied to it. It is at this point where patience and a lot of extra processing is required. I'd start withWhile this doesn't give you a clean answer, it is better than before and reveals more of the structure of your solution. (I would not use
FullSimplify
as that mixesDelta
in with the other terms.) At this point, we need to know more about the terms themselves, and the output fromIn[2]
is not quite as useful as we want.I'd re-expand this with
LogicalExpand
which gives you twelve terms that are significantly simpler than the whatReduce
alone gives. (You'll note that only the last six terms actually involveDelta
, so I'd check that the variable conditions actually match those.) Selecting those last six terms only,The third term is tautological, but
Simplify
norFullSimplify
can't seem to remove it. And we're really only interested in the middle term anyway. IfOmega > 0
your expression can then be extracted via%[[2,1,2]]
.Putting this all together in one expression:
After writing that out, I realized that there is a much simpler way to approach this. I'd redo line 2, above, as follows:
Or, provided you really do know that
m != 0
andOmega > 0
you can do会做。
由于我不使用 Mathematica 进行编辑或演示,也许其他人可能会提供一些额外的建议。
编辑
根据您的评论
,您可以尝试:我纠正了一些语法错误。但你会发现结果的表达是相当不愉快的。为了进一步简化它,您需要知道变量的有效范围。如果您有该信息,请发布该信息。
哈!
Will do.
As I don't use Mathematica for editing or presentation, perhaps someone else may come with some extra advice.
Edit
based on your comment, you may try:
Where I corrected some syntax errors. But you'll find that the resulting expression is rather unpleasant. To simplify it further you need to know the valid ranges for your vars. Please post that info if you have it.
HTH!
检查 的输出
可以看到,
但是
因为 expr 的分母中有 \[Omega] 的符号。所有这些都忽略了 L、e、m 和 \[Omega] 值的其他条件,这些条件将改变结果,并且不同版本的 Mathematica 可能会改变 Simplify[Reduce[]] 结果的形式,这将使所有这些无效。
Inspect the output of
to see that
but
because the sign of \[Omega] in the denominator of expr. All this ignores the other conditions on the values of L, e, m and \[Omega] that will change the result and different versions of Mathematica may change the form of the result from Simplify[Reduce[]] which will invalidate all of this.
减少由Reduce[] 和LogicalExpand[] 返回的表达式的部分困难在于,当e=1 或=2 时,所提供的表达式涉及除以零。
我得到了一些可以忍受的紧凑的东西
,我没有花费任何精力用符号替换符号名称。
(为什么假设[...]?因为我懒得记住将相同的假设塞进每个简化步骤中。)
Part of the difficulty in reducing the expressions returned by Reduce[] and LogicalExpand[] is that the supplied expression involves division by zero when e=1 or =2.
I get something bearably compact with
where I've expended no effort to replace symbol names with symbols.
(Why Assuming[...]? Because I'm too lazy to remember to get the same assumptions jammed into each simplification step.)