> For the complete documentation index, see [llms.txt](https://johannesliu.gitbook.io/learning-advanced-mathematics-with-python/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://johannesliu.gitbook.io/learning-advanced-mathematics-with-python/7.0-partial_differential_equation/7.3-classification_of_pde.md).

# 7.3 偏微分方程分类

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

例：对偏微分方程$$1+\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$$进行分类

```python
[]: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)
```

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