Functions and solving
Open the Math tab when you need a function. Type the name if you know it, or click it. Every button inserts a name you could have typed. Get the argument order wrong and the region reports an error, not a plausible wrong number.
Where the operators and functions live
- Algebra, on the tab itself: +, −, ·, /, xⁿ, √, |x|, ! and parentheses. The root button takes an index, so type 3 in it for a cube root.
- Compare: =, ≠, <, >, ≤, ≥, ∧ (and), ∨ (or).
- Solve block: exactly two buttons, Given and solve.
- Matrix / Vector: Mᵀ, det, M⁻¹, ‖v‖, a×b, a·b. All of them act on an array you have already named.
- Operators ▾ opens five categories: Algebra, Compare, Matrix, Calculus and Define. The calculus tokens and
:=live here. - Functions ▾ opens four: Stats, Matrix, Trig, More. Operators and the matrix palette are under Operators, not here.
- Constants: π, e, ∞ and g. g is standard gravity, 9.80665 m/s².
You cannot define your own function
There is no name(...) := syntax. That is usually the first thing a
Mathcad user tries. Three substitutes cover nearly everything you would have
written a definition for. The complete list of names the evaluator does accept
is generated from the engine itself, in
Reference → Function list.
- A named assignment handles the common case. Write
Z := b * h^2 / 6once, then changeborhabove it and every region below re-evaluates. - A Given/solve block handles the inverse problem, where you know the answer you need and want the input that produces it.
- if and while put a branch or an iteration inside one expression.
The pages
- Function catalog — which names exist, how they group on the ribbon, and why a length inside
ln()is rejected. - Matrices and vectors — how you write a two-row matrix, and what units come out of det and inv.
- Given and solve — two equations, two unknowns, and where the starting guesses have to go.
- Differentiation and integration — the argument order for diff, nintegrate, nsum and nprod.
- Control flow — how
whilecan be a function call at all, and when a sweep table is the better answer.