Skip to main content
Glama
sdiehl
by sdiehl

calculate_divergence

Calculate the divergence of a vector field in a given coordinate system using symbolic algebra for mathematical analysis and solutions.

Instructions

Calculates the divergence of a vector field using SymPy's divergence function.

Args:
    vector_field_key: The key of the vector field expression.

Example:
    # First create a coordinate system
    create_coordinate_system("R")

    # Create a vector field F = (x, y, z)
    vector_field = create_vector_field("R", "R_x", "R_y", "R_z")

    # Calculate divergence
    div_result = calculate_divergence(vector_field)
    # Returns 3

Returns:
    A key for the divergence expression.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vector_field_keyYes

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