简单的? Mathematica 7 中的消息传递

发布于 2024-09-06 08:42:35 字数 382 浏览 3 评论 0原文

Uu[z_,x_,t_] := A1[z]*F[t*a*x]
Wu[z_,x_,t_] := B1[z]*F[t*a*x]
Pu[z_,x_,t_] := C1[z]*F[t*a*x]
eq1 = D[Uu[z,x,t],t]==-R*D[Pu[z,x,t],x];
C1z = DSolve[eq1,C1[z],z];
eq2 = D[Wu[z,x,t],t]==-R*D[Pu[z,x,t],z]/.C1z[[1]]

赋值 /.C1z[[1]] 的行为不符合我的预期。我什至不确定这种现象叫什么(这使得谷歌搜索非常困难)。

C1z 确实在常量和 A1[z] 方面保留了 C1[z] 的正确值,但是当我尝试将其“插入”eq2 时,它似乎不起作用。

感谢您的帮助。

Uu[z_,x_,t_] := A1[z]*F[t*a*x]
Wu[z_,x_,t_] := B1[z]*F[t*a*x]
Pu[z_,x_,t_] := C1[z]*F[t*a*x]
eq1 = D[Uu[z,x,t],t]==-R*D[Pu[z,x,t],x];
C1z = DSolve[eq1,C1[z],z];
eq2 = D[Wu[z,x,t],t]==-R*D[Pu[z,x,t],z]/.C1z[[1]]

The assignment /.C1z[[1]] does not behave the way I expect it to. I am unsure of even what this pheonomena is called, (which makes googling it quite difficult).

C1z does hold the correct value for C1[z] in terms of constants and A1[z], but when I try to 'plug it into' eq2, it does not seem to work.

Thank you for your help.

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

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

发布评论

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

评论(1

橘寄 2024-09-13 08:42:35

这不起作用,因为没有任何内容符合您的替换规则。

如果您在规则替换之前查看 eq2 的值,您会发现没有与 C1[z] 匹配的子表达式,因为导数 D[Pu[z,x,t],z] 在替换发生之前进行计算:

In[13]:= eq2a = D[Wu[z,x,t],t]==-R*D[Pu[z,x,t],z]
Out[13]= a x B1[z] F'[a t x]==-R F[a t x] C1'[z]

C1'[z] 也许没有您期望的完整表达式形式,因此在求导后替换 C1[z] 并不能达到您想要的效果:

In[14]:= FullForm[C1'[z]]
Out[14]//FullForm= Derivative[1][C1][z]

也许您的意思是这样的:

In[15]:= eq2=D[Wu[z,x,t],t]==-R*D[Pu[z,x,t]/.C1z[[1]],z]
Out[15]= a x B1[z] F'[a t x]==(x F[a t x] A1'[z])/t

HTH!

This doesn't work because nothing matches your substitution rule.

If you look at the value of eq2 before the rule substitution, you'll notice there is no sub-expression that matches C1[z], because the derivative D[Pu[z,x,t],z] evaluates before the substitution occurs:

In[13]:= eq2a = D[Wu[z,x,t],t]==-R*D[Pu[z,x,t],z]
Out[13]= a x B1[z] F'[a t x]==-R F[a t x] C1'[z]

C1'[z] doesn't have, perhaps, the full expression form you'd expect, so substituting for C1[z] after taking the derivative doesn't do what you want:

In[14]:= FullForm[C1'[z]]
Out[14]//FullForm= Derivative[1][C1][z]

Maybe you meant something like this instead:

In[15]:= eq2=D[Wu[z,x,t],t]==-R*D[Pu[z,x,t]/.C1z[[1]],z]
Out[15]= a x B1[z] F'[a t x]==(x F[a t x] A1'[z])/t

HTH!

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