7.3 偏微分方程分类

使用sympy.solvers.pde.classify_pde()可以对偏微分方程进行分类。

例:对偏微分方程1+2xf(x,y)f(x,y)+3yf(x,y)f(x,y)=01+\frac{2 \frac{\partial}{\partial x} f(x,y)}{f(x,y)} + \frac{3 \frac{\partial}{\partial y} f(x,y)}{f(x,y)} =0 进行分类

[]:classify_pde(eq)

[]:('1st_linear_constant_coeff_homogeneous',)

function this way:

from sympy import Function, Derivative

from sympy.abc import x, y # x and y are the independent variables

f = Function("f")(x, y) # f is a function of x and y

#fx will be the partial derivative of f with respect to x

fx = Derivative(f, x)

#fy will be the partial derivative of f with respect to y

fy = Derivative(f, y)

结果表明,该方程为第一类线性常系数齐次偏微分方程

Last updated