수식 검산
verify_mathVerify math steps and answers with SymPy, including equations, calculus, matrices, and probability; compare equivalent forms and get numeric counterexamples when matches fail.
Instructions
Check math with sympy: a solution step, or whether an answer equals a reference in another form. You solve; this only computes. ops: equal (expr vs against → matches true/false/"unknown", plus a numeric check at 5 random points), simplify, solve (equation "x2 = 4", inequality "x2 > 4", system "x + y = 3; x - y = 1" with var="x, y"; var also isolates a formula), diff (order), integrate (bounds → definite), limit (point "0", "oo", "0+", "0-"), evaluate (point "x=2, y=3"), ode (expr "y'' + 3y' + 2y = sin(x)", ics "y(0)=1, y'(0)=0"; against = your solution's right-hand side), matrix (matrix rows → det, rank, inverse, eigen, rref; expr "det, eigen" picks; matrix_b → A·B), laplace (in t), inverse_laplace (in s), series (point, order), sum (bounds [1, "oo"], index n), probability (dist Normal(mean, std) | Binomial(n, p) | Poisson(λ) | Exponential(rate) | Uniform(a, b); expr is an event "X > 1.96" or a quantity "X**2" for its expectation). Example: {"op": "equal", "expr": "sin(x)2", "against": "(1 - cos(2*x))/2"} Syntax: x2, sqrt, exp, log (= ln), log10, abs, factorial; constants are pi and e only (E is a variable); radians. Physical quantities: assume="positive". Decimals become fractions; numeric comparison is relative, so 9.8 ≠ 9.81. latex=true reads expr and against as LaTeX (not for ode, matrix, probability, inequalities; send the integrand without \int). Check parsed and read note. matches=false: numeric.counterexample shows where it breaks. "unknown": judge from numeric and say so. On failure: errors name the input and character; fix and call again. Timeout: split into smaller steps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| ics | No | ode initial conditions | |
| var | No | Variable: "x, y" for systems, "t" for ode/laplace, "n" for sum | |
| dist | No | "Normal(0, 1)" | |
| expr | No | Expression, equation or inequality (sympy syntax) | |
| latex | No | ||
| order | No | diff order / series degree (0 = default) | |
| point | No | limit "0+", evaluate "x=2", series center | |
| assume | No | real | |
| bounds | No | [0, "pi"], [1, "oo"] | |
| matrix | No | Rows: [["1", "2"], ["3", "4"]] | |
| against | No | equal: the other expression / ode: your solution | |
| matrix_b | No | B for A·B |