Skip to main content
Glama
sdiehl
by sdiehl

pdsolve_pde

Solve partial differential equations (PDEs) using SymPy's pdsolve function on the Symbolic Algebra MCP Server. Input expression key and function name to obtain a LaTeX-formatted solution, handling complex PDEs efficiently.

Instructions

Solves a partial differential equation using SymPy's pdsolve function.

Args:
    expr_key: The key of the expression (previously introduced) containing the PDE.
             If the expression is not an equation (Eq), it will be interpreted as
             PDE = 0.
    func_name: The name of the function (previously introduced) to solve for.
               This should be a function of multiple variables.

Example:
    # First introduce variables and a function
    intro("x", [Assumption.REAL], [])
    intro("y", [Assumption.REAL], [])
    introduce_function("f")

    # Create a PDE: 1 + 2*(ux/u) + 3*(uy/u) = 0
    expr_key = introduce_expression(
        "Eq(1 + 2*Derivative(f(x, y), x)/f(x, y) + 3*Derivative(f(x, y), y)/f(x, y), 0)"
    )

    # Solve the PDE
    result = pdsolve_pde(expr_key, "f")
    # Returns solution with exponential terms and arbitrary function

Returns:
    A LaTeX string representing the solution. Returns an error message string if issues occur.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expr_keyYes
func_nameYes
hintNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sdiehl/sympy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server