# 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)
```

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://johannesliu.gitbook.io/learning-advanced-mathematics-with-python/7.0-partial_differential_equation/7.3-classification_of_pde.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
