简单的? Mathematica 7 中的消息传递
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不起作用,因为没有任何内容符合您的替换规则。
如果您在规则替换之前查看
eq2
的值,您会发现没有与C1[z]
匹配的子表达式,因为导数D[Pu[z,x,t],z]
在替换发生之前进行计算:C1'[z]
也许没有您期望的完整表达式形式,因此在求导后替换C1[z]
并不能达到您想要的效果:也许您的意思是这样的:
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 matchesC1[z]
, because the derivativeD[Pu[z,x,t],z]
evaluates before the substitution occurs:C1'[z]
doesn't have, perhaps, the full expression form you'd expect, so substituting forC1[z]
after taking the derivative doesn't do what you want:Maybe you meant something like this instead:
HTH!