【问题标题】:How Do I Use Indexed with NIntegrate in Mathematica?如何在 Mathematica 中使用带有 NIntegrate 的索引?
【发布时间】:2015-08-04 23:51:08
【问题描述】:

我在使用时遇到问题

Indexed[]

NIntegrate[]

在数学中。我想评估类似的东西

NIntegrate[Indexed[t, 1], {Indexed[t, 1], 0, 1}]

有更多的变量(指数)。但是,我收到此错误:

"Tag Indexed in Indexed[t,1] is Protected"

我很确定问题出在第二个论点,因为

NIntegrate[Indexed[x, 1]^2 Indexed[x, 2]^2, x \[Element] Rectangle[]]

按照我的预期进行评估。 我尝试取消保护第二个参数并用评估包装它,但都没有奏效。我想我需要使用

Indexed[]

因为我在具有可变维数的复杂区域上有一个复杂的表达式。我必须使用

NIntegrate[]

因为

Integrate[]

未能解决我的积分问题,但在其他方面表现如我预期,例如,

Integrate[Indexed[t, 1], {Indexed[t, 1], 0, 1}].

我正在使用 Mathematica 10.0。

【问题讨论】:

  • 您不能将索引的结果用作积分变量。使用t[1] ,t[2]

标签: wolfram-mathematica


【解决方案1】:

尚不清楚在您的情况下 Indexed 的目的是什么。 如果这只是为了装饰,我建议使用下标而不是索引。试试这个

NIntegrate[Subscript[t, 1], {Subscript[t, 1], 0, 1}]

它适用于 Mathematica 10.0

【讨论】:

  • 我需要 NIntegrate 的输出看起来像一个正确的数学表达式,以便可以轻松地将其与预测进行比较。我想这使它成为“装饰”。作为奖励,您的答案可以正确复制为 Latex。
猜你喜欢
  • 2023-04-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-09-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多