在简化和扩展中使用替代特殊函数

发布于 2024-12-21 21:29:18 字数 221 浏览 2 评论 0原文

我有涉及特殊函数 Erf[x]Erfc[x] 的 Mathematica 表达式,但我想用

F[x_] := CDF[NormalDistribution[0,1]][x]

整个过程中 的缩放和翻译版本来表达它们笔记本。这是因为 F[x] 在我的问题的背景下有一个简单的解释。

I have Mathematica expressions involving the special functions Erf[x] and Erfc[x], but I'd like to express them in terms of the scaled and translated version

F[x_] := CDF[NormalDistribution[0,1]][x]

throughout the notebook. This is because F[x] has an easy interpretation in the context of my problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奢望 2024-12-28 21:29:18

不确定我是否理解你的问题,但我正在尝试回答我对你所说的话的解释。

所以你在 erf 和 erfc 中有一个表达式,就像这样

expr = Erf[x] + 1/Erfc[x] + Sin[Erf[x]] + Cos[Erfc[x]] 

用 F 替换 erf 和 erfc 所需要做的就是这样:

 expr //. {Erfc[x_] -> 2 F[-(x) Sqrt[2]], Erf[x_] -> 1 - Erfc[x]}

 (* ==>  1 + Cos[2 F[-Sqrt[2] x]] + 1/(2 F[-Sqrt[2] x]) -
         2 F[-Sqrt[2] x] + Sin[1 - 2 F[-Sqrt[2] x]]
 *)

这与你对 F[x] 的定义确实是相同的:

1 + Cos[2 F[-Sqrt[2] x]] + 1/(2 F[-Sqrt[2] x]) - 2 F[-Sqrt[2] x] + 
  Sin[1 - 2 F[-Sqrt[2] x]] /. F[x_] -> CDF[NormalDistribution[0, 1]][x]

(* ==> 1 + Cos[Erfc[x]] + 1/Erfc[x] - Erfc[x] + Sin[1 - Erfc[x]] *)

Not sure whether I understand your problem, but I'm trying to answer my interpretation of what your saying.

So you have an expression in erf and erfc, like this

expr = Erf[x] + 1/Erfc[x] + Sin[Erf[x]] + Cos[Erfc[x]] 

All it takes to replace erf and erfc with F is this:

 expr //. {Erfc[x_] -> 2 F[-(x) Sqrt[2]], Erf[x_] -> 1 - Erfc[x]}

 (* ==>  1 + Cos[2 F[-Sqrt[2] x]] + 1/(2 F[-Sqrt[2] x]) -
         2 F[-Sqrt[2] x] + Sin[1 - 2 F[-Sqrt[2] x]]
 *)

which with your definition of F[x] is indeed the same:

1 + Cos[2 F[-Sqrt[2] x]] + 1/(2 F[-Sqrt[2] x]) - 2 F[-Sqrt[2] x] + 
  Sin[1 - 2 F[-Sqrt[2] x]] /. F[x_] -> CDF[NormalDistribution[0, 1]][x]

(* ==> 1 + Cos[Erfc[x]] + 1/Erfc[x] - Erfc[x] + Sin[1 - Erfc[x]] *)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文