用sympy或matlab解决PDE问题

时间:2017-04-21 11:35:37

标签: python matlab sympy equation pde

我想知道如何使用sympy或matlab解决以下PDE

提前致谢。enter image description here

1 个答案:

答案 0 :(得分:5)

我刚用sympy解决了这个问题

import sympy as sp

x1, x2 = sp.symbols('x1, x2')
f = sp.Function('f')
phi = f(x1, x2)
eq = phi.diff(x1) * sp.cos(x2) + phi.diff(x2)
print(sp.pdsolve(eq)) # f(x1, x2) == F(-x1 + sin(x2))