> 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.1-auxillary_function.md).

# 7.1 辅助函数

使用sympy.solvers.pde. pde\_separate\_add可以寻找偏微分方程的适用于加法可分的解的辅助函数。

例：求偏微分方程$$\frac{\partial}{\partial x} u(x,t) = e^{u(x,t)} \frac{\partial }{\partial t} u(x,t)$$ 适用加法可分的解的辅助函数。

```python
[]:from sympy import Function, Derivative as D

u, X, T = map(Function, 'uXT')

eq = Eq(D(u(x, t), x), E\*\*(u(x, t))\*D(u(x, t), t))

eq

[]:pde\_separate_add(eq, u(x, t), [X(x), T(t)])
```

\[]: ![](/files/jBJWjGV2XnCilaF9oea7)

使用sympy.solvers.pde.pde\_separate\_add可以寻找偏微分方程的适用于乘法可分的解的辅助函数。

例：求偏微分方程$$\frac{\partial {}^2}{\partial x^2 } u(x,y)=\frac{\partial {}^2}{\partial y^2 } u(x,y)$$适用乘法可分的解的辅助函数。

```python
[]:eq = Eq(D(u(x, y), x, 2), D(u(x, y), y, 2))

eq

[]:pde\_separate_mul(eq, u(x, y), [X(x), Y(y)])
```

\[]: ![](/files/9GUIspTJdVHwXGESeISr)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.1-auxillary_function.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.
