Given and solve
A Given/solve block finds values that satisfy several equations at once. Use the Math tab Solve block buttons: Given (tooltip: Given — opens a solve block. Constraints below (using =) are solved together by solve(...)) and solve (tooltip: solve(a, b, …) — solves the simultaneous equations above for the listed unknowns. Use guess values to control which root is found (default 0).).
Workflow
- Assign guess values above the block. They pick the root; default is 0 if you omit them.
- Insert Given in its own math region (Math tab → Solve block, or type
Given). That opens the block. - Below it, write one constraint per region. Use
=or==between the two sides. Do not put a trailing “show result” equals on a constraint line. - In a later region, insert solve or type
solve(a, b)with the unknown names. The count of names must match the count of equations. - Evaluate.
solvewrites the roots back into those names and closes the block.
x := 1
y := 1
Given
x + y = 10
x - y = 2
solve(x, y) =
Errors
Messages start with solve:. Typical causes:
- No Given block open above this
solve. - No equations — each constraint needs a top-level
=or==. - Wrong number of unknowns for the number of constraints.
- The solver did not converge — change the guesses.
What is not a Given block
solve(A, b) on a matrix is linear algebra — see
Matrices and vectors.
A lone trailing = on a normal assignment still means “show
the result”. Inside a Given block, a top-level = is a
constraint.