Skip to main content
Glama
sdiehl
by sdiehl

integrate_expression

Perform symbolic integration of an expression with respect to a specified variable. Supports both indefinite and definite integration using SymPy's functionality via the Symbolic Algebra MCP Server.

Instructions

Integrates an expression with respect to a variable using SymPy's integrate function.

Args:
    expr_key: The key of the expression (previously introduced) to integrate.
    var_name: The name of the variable to integrate with respect to.
    lower_bound: Optional lower bound for definite integration.
    upper_bound: Optional upper bound for definite integration.

Example:
    # Introduce a variable
    intro("x", [Assumption.REAL], [])

    # Create an expression to integrate: x^2
    expr_key = introduce_expression("x**2")

    # Indefinite integration
    indefinite_result = integrate_expression(expr_key, "x")
    # Returns x³/3

    # Definite integration from 0 to 1
    definite_result = integrate_expression(expr_key, "x", "0", "1")
    # Returns 1/3

Returns:
    A key for the integrated expression.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expr_keyYes
lower_boundNo
upper_boundNo
var_nameYes

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