Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 用symphy或matlab求解偏微分方程_Python_Matlab_Sympy_Equation_Pde - Fatal编程技术网

Python 用symphy或matlab求解偏微分方程

Python 用symphy或matlab求解偏微分方程,python,matlab,sympy,equation,pde,Python,Matlab,Sympy,Equation,Pde,我想知道如何用Symphy或matlab求解下面的偏微分方程 提前谢谢。我刚刚用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))

我想知道如何用Symphy或matlab求解下面的偏微分方程


提前谢谢。

我刚刚用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))