Symbolic math in the command window#
An expression can be a VALUE here. syms x declares a symbol, and from then on
x^2 + 1 is carried as the expression it is rather than evaluated to a number —
so it can be differentiated, integrated, factored, simplified, substituted into
and printed, and it only becomes a number when you ask for one.
Every name on this page is MATLAB's, with MATLAB's arguments and MATLAB's answers, and the answers are checked against a live MATLAB with the Symbolic Math Toolbox rather than against a description of it.
The families, and what to reach for#
| You want to | Use |
|---|---|
| Declare symbols | syms x y z, or x = sym('x') |
| Turn a number into an exact one | sym(0.1) (which is 1/10), sym(x, 'f') for the exact binary value |
| Read an expression from text | str2sym("x^2 + 1") |
| Ask what is in an expression | symvar(f), symvar(f, 1) (the one closest to x), class(f) |
| Open it up | expand, collect, combine, rewrite, horner |
| Tidy it up | simplify, factor, partfrac, numden |
| Read off coefficients | coeffs(p, x), [c, t] = coeffs(p, x), sym2poly(p); poly2sym(c, x) builds an expression back out of a coefficient row |
| Differentiate | diff(f), diff(f, x), diff(f, x, 2), diff(f, x, y) |
| Integrate | int(f), int(f, x), int(f, a, b), int(f, x, a, b) |
| Do vector calculus | jacobian, hessian, gradient, divergence, curl, laplacian |
| Put values in | subs(f, x, 2), subs(f, [x y], [1 2]), subs(f) (from the workspace) |
| Reach the special functions | gamma(f), erf(f), erfc(f), factorial(f), nchoosek(n, k) |
| Work with divisors and fractions | gcd(a, b), lcm(a, b), divisors(n), factor(n), simplifyFraction(f) |
| Write a condition | x == 1, x > 0, x <= 3, x ~= 3 — a condition is a value here |
| Ask whether a condition holds | isAlways(cond), logical(cond) |
| Solve one | solve(eqn, x), [x, y] = solve(eq1, eq2, x, y), vpasolve(eqn, x) |
| Take a limit | limit(f, x, a), limit(f, x, a, "left"), limit(f, x, Inf) |
| Expand as a series | taylor(f), taylor(f, x, a), taylor(f, x, "Order", 4) |
| Sum or multiply a series | symsum(f, k, a, b), symprod(f, k, a, b) |
| Transform a signal | laplace(f), ilaplace(F), ztrans(f), iztrans(F) — and the two- and three-argument forms that name the variables |
| Make a function you can call | f(x) = x^2 + 1, then f(2); syms f(x) declares one with no formula |
| Ask about a function | formula(f), argnames(f), class(f), finverse(f), compose(f, g) |
| Solve a differential equation | dsolve(diff(y, t) == a*y), dsolve(eqn, y(0) == 1) — over syms y(t) |
| Work with a matrix of symbols | sym("A", [2 2]), det, inv, adjoint, rank, null, charpoly, eig, trace, diag, A*B, A^2 |
| Say what a symbol is | assume(x, "real"), syms x positive, assumeAlso(x > 2), assumptions(x), assume(x, "clear") |
| Step, spike and switch | heaviside(x), dirac(x), sign(x), abs(x), kroneckerDelta(m, n), piecewise(cond, val, …) |
| Get a number out | double(f), vpa(f), vpa(f, 30), digits |
| Get out to the rest of the console | matlabFunction(f) (a handle), polynomial(f), tf(f), char(f), latex(f), pretty(f) |
| Differentiate something that is NOT symbolic | symgrad("expr", x0) — central differences over a quoted expression, which is what this console had before it had symbols and is still the right tool for a function you only have as text |
A worked line or two#
Factor a cubic, differentiate it and integrate it:
>>> syms x; f = x^3 - 6*x^2 + 11*x - 6; f
f = 11*x - 6*x^2 + x^3 - 6 # Sym
>>> factor(f)
[x - 1, x - 2, x - 3] # Sym
>>> [diff(f), int(f)]
[3*x^2 - 12*x + 11, (11*x^2)/2 - 6*x - 2*x^3 + x^4/4] # Sym
Integrate a rational function — the partial fractions are exact, so the answer is two logarithms and not a fit:
>>> syms x; int(1/(x^2 + 3*x + 2))
log(x + 1) - log(x + 2) # Sym
>>> int(x*sin(x))
sin(x) - x*cos(x) # Sym
Arithmetic is exact, and a decimal you type is recognised rather than cast:
>>> sym(0.1) + sym(0.2)
3/10 # Sym
>>> syms x; simplify((x^2 - 1)/(x - 1))
x + 1 # Sym
Ask for digits when you want them, and as many as you want:
>>> vpa(pi, 40)
3.141592653589793238462643383279502884197 # Sym
>>> syms x; double(int(exp(-x), 0, Inf))
1 # Integer
And leave symbolic when you are done — matlabFunction hands back an ordinary
console handle, so the expression you just derived can be evaluated, plotted or
passed to a solver:
>>> syms x; h = matlabFunction(x^2 + 1); h(3)
10 # Integer
The special functions keep their exact values rather than turning into decimals, and they carry their own calculus:
>>> syms x; gamma(sym(7)/2)
(15*pi^(1/2))/8 # Sym
>>> syms x; diff(gamma(x))
gamma(x)*psi(x) # Sym
>>> syms x; int(erf(x))
exp(-x^2)/pi^(1/2) + x*erf(x) # Sym
>>> syms x; nchoosek(sym(10), 5)
252 # Sym
gcd and lcm work on exact numbers and on polynomials, and divisors and
simplifyFraction come with them:
>>> syms x; gcd(2*x^2 - 2, 4*x + 4)
2*x + 2 # Sym
>>> syms x; lcm(2*x, 3*x)
6*x # Sym
>>> syms x; divisors(x^2 - 1)
[1, x - 1, x + 1, (x - 1)*(x + 1)] # Sym
>>> syms x; simplifyFraction((x^3 - 1)/(x - 1))
x + x^2 + 1 # Sym
>>> [g, c, d] = gcd(12, 18)
g = 6 # Integer
c = -1 # Integer
d = 1 # Integer
Telling the console what a symbol is changes what it can say about it:
>>> syms x; simplify(sqrt(x^2))
(x^2)^(1/2) # Sym
>>> syms x; assume(x, "real"); simplify(sqrt(x^2))
abs(x) # Sym
>>> syms x; assume(x, "positive"); simplify(sqrt(x^2))
x # Sym
>>> syms x; assume(x, "real"); isAlways(x^2 >= 0)
1 # Logical
>>> syms x; piecewise(x < 0, -x, x)
piecewise(x < 0, -x, symtrue, x) # Sym
>>> syms x; int(heaviside(x))
(x*(sign(x) + 1))/2 # Sym
Solving:
>>> syms x; solve(x^2 == 1, x)
[1; -1] # Sym
>>> syms x; solve(x^3 - 2)
[2^(1/3); 2^(1/3)*((3^(1/2)*1i)/2 - 1/2); 2^(1/3)*(- (3^(1/2)*1i)/2 - 1/2)] # Sym
>>> syms x; solve(exp(x) == 2, x)
log(2) # Sym
>>> syms x y; [a, b] = solve(x + y == 3, x - y == 1, x, y)
a = 2 # Sym
b = 1 # Sym
Limits, series and sums:
>>> syms x; limit(sin(x)/x, x, 0)
1 # Sym
>>> syms x; limit(1/x, x, 0, "left")
-Inf # Sym
>>> syms x; taylor(sin(x))
x - x^3/6 + x^5/120 # Sym
>>> syms k n; symsum(k^2, k, 1, n)
n/6 + n^2/2 + n^3/3 # Sym
>>> syms k; symsum(1/k^2, k, 1, Inf)
pi^2/6 # Sym
A matrix whose entries are symbols behaves like one:
>>> sym("A", [2 2])
[A1_1, A1_2; A2_1, A2_2] # Sym
>>> det(sym("A", [2 2]))
A1_1*A2_2 - A1_2*A2_1 # Sym
>>> eig(sym([1 2; 3 4]))
[5/2 - 33^(1/2)/2; 33^(1/2)/2 + 5/2] # Sym
>>> null(sym([1 2; 2 4]))
[-2; 1] # Sym
Every transcript on this page is real output, captured with
ICoreBlocks --console "<line>" on 2026-09-04 at commit 497e1ea2; the
special-function, divisor and fraction transcripts were captured the same way
on 2026-09-05, from the builds that landed them.
The transforms#
laplace, ilaplace, ztrans, iztrans, fourier and ifourier are here
with MATLAB's names, MATLAB's three argument forms and MATLAB's answers. The
first four have rational tables: each is a partial-fraction walk over poles
this console can find exactly. The Fourier pair's table is the Gaussian, the
two-sided exponential, the step and the impulse, and its answers carry 1i
and dirac (see fourier and ifourier below).
>>> syms t s z n a w
>>> laplace(t^2)
2/s^3 # Sym
>>> laplace(exp(a*t)*sin(w*t))
w/((s - a)^2 + w^2) # Sym
>>> ilaplace((s + 1)/(s^2 + 2*s + 5))
cos(2*t)*exp(-t) # Sym
>>> ztrans(n^2)
(z + z^2)/(z - 1)^3 # Sym
>>> iztrans(z^2/((z - 1)*(z - 2)))
4*2^(n - 1) - 1 # Sym
Which variable is which — the rule, and its two traps#
There is no fixed pair. laplace reads t and answers in s; if the
expression has no t, the source is symvar(f, 1) instead; and if that is
already s, the answer moves to z. The other five follow the same rule one
letter along — s → t (escaping to x), n → z (to w), z → n (to k),
and for the Fourier pair x → w (to v) and w → x (to t).
>>> laplace(exp(s))
1/(z - 1) # Sym
>>> ilaplace(1/(t + 1))
exp(-x) # Sym
Both are MATLAB's answers. The second trap is the argument order:
>>> laplace(t^2, x)
2/x^3 # Sym
The two-argument form names the TRANSFORM variable, not the source — here
and in MATLAB. laplace(f, var, transVar) is the form that names both.
What a term outside the table does#
It comes back unevaluated, which is MATLAB's own answer and not a refusal —
the same contract int has. And because a transform is linear, a sum answers
term by term:
>>> laplace(1/t)
laplace(1/t, t, s) # Sym
>>> laplace(t + sin(t^2))
laplace(sin(t^2), t, s) + 1/s^2 # Sym
iztrans and the delta you must not drop#
Every iztrans answer carries a kroneckerDelta correction, and it is not
decoration. c/(z - r)^k inverts to c*r^(n-k)*nchoosek(n-1, k-1) — a closed
form that does not vanish at n = 0 — so a term c*(-1)^k/r^k at the
origin has to come off it:
>>> iztrans(1/(z - 2))
2^(n - 1) - kroneckerDelta(n, 0)/2 # Sym
>>> iztrans(z/(z - 1))
1 # Sym
MATLAB prints the first as 2^n/2 - kroneckerDelta(n, 0)/2, which is the same
number. In the second the delta cancels, which is why the unit step comes back
as the plain 1 on both sides. Without the correction the answer would be
wrong at exactly one sample — the one no plot would show you.
fourier and ifourier#
MATLAB's convention, and the only one here: fourier(f) is
∫ f(x)·e^(−iwx) dx over the whole line, and ifourier(F) is
∫ F(w)·e^(iwx) dw / 2π.
>>> syms x w
>>> fourier(exp(-x^2))
pi^(1/2)*exp(-w^2/4) # Sym
>>> fourier(heaviside(x)*exp(-2*x))
1/(w*1i + 2) # Sym
>>> fourier(cos(3*x))
pi*dirac(w + 3) + pi*dirac(w - 3) # Sym
>>> fourier(x*exp(-x^2))
-(w*pi^(1/2)*exp(-w^2/4)*1i)/2 # Sym
>>> ifourier(exp(-w^2))
exp(-x^2/4)/(2*pi^(1/2)) # Sym
As with laplace, x^n is not a table row. It is 1i^n times the n-th
derivative in w. Likewise cos(b*x) and sin(b*x) are the modulation pair
around whatever they multiply, and exp(1i*m*x) is a shift. ifourier has no
table of its own: it is the forward table read back through
ifourier(F)(x) = fourier(F)(−x)/2π.
Three things to know:
A condition the console cannot prove leaves the term unevaluated.
exp(-a*abs(x))has a transform only whena > 0. MATLAB answers it with no assumption; this console answers once you say so:``` >>> syms a >>> fourier(exp(-a*abs(x))) fourier(exp(-a*abs(x)), x, w) # Sym
>>> syms p positive >>> fourier(exp(-p*abs(x))) (2*p)/(p^2 + w^2) # Sym ```
- A complex number is a symbolic constant. Since the Fourier pair landed, a
complex literal can go into a symbolic expression, so an answer can be typed
back in:
fourier(exp(1i*x))is2*pi*dirac(w - 1), and2i*xprints as2*x*1i, which MATLAB writesx*2i. - A complex answer can go on a wire; a distribution cannot. The
Fourier Transform block (Control Systems / Symbolic) takes
fourierorifourieronce, at configuration load, splits the answer into its real and imaginary parts with every variable taken as real, and outputs a complex signal. An answer that holdsdirac—fourier(1),fourier(cos(3*x))— is refused there by name, because an impulse has no value at a sample.
Every line in this section is real output from the build that landed the pair
(2026-09-30), and each expected value was checked against R2026a with
isAlways first. The command-parity suite runs 61 such cases.
What the tables hold#
| Transform | It recognises |
|---|---|
laplace | c*t^n*exp(a*t)*{1, sin, cos, sinh, cosh}(w*t), the fractional power t^p through gamma(p+1)/s^(p+1), heaviside(t - a) and dirac(k, t - a) |
ilaplace | a rational F with rational-number coefficients: any pole multiplicity, one irreducible quadratic, the polynomial part as dirac(k, t), and exp(-a*s)*G(s) as the second shift |
ztrans | c*n^k*r^n*{1, sin, cos, sinh, cosh}(w*n), with exp(a*n) read as r = exp(a) |
iztrans | a rational F with rational poles, at any multiplicity |
fourier | c*x^n*{1, cos, sin}(b*x) times one of 1, exp(-A*x^2 + B*x + c) (A > 0), exp(-a*abs(x)) (a > 0), heaviside(x - b) alone or times exp(-a*x) (a > 0), dirac(k, x - b), sign(x) or abs(x), 1/(p*x^2 + q) (p, q > 0), 1/x and sin(b*x)/x; exp(1i*m*x) as a shift |
ifourier | whatever fourier recognises, read back through fourier(F)(−x)/2π |
t^n and n^k are not table rows: the first is the n-th derivative of the
base row in s, the second the Eulerian closed form in z. That is why
laplace(t*cos(w*t)) comes back as MATLAB's own two-term answer and
ztrans(n^3) as its tidy single fraction — each side is doing what the other
does.
Every line above is real output, captured with
ICoreBlocks --console "<line>" on 2026-09-05 from the build that landed the
row, and every expected value was read from R2026a before the engine was
written.
Functions you can call, and the equations written over them#
f(x) = x^2 + 1 makes a symbolic function: an expression carrying its
argument list, so it can be called.
>>> syms x y
>>> f(x) = x^2 + 1
f = x^2 + 1 # Sym
>>> f(2)
5 # Sym
>>> f(y)
y^2 + 1 # Sym
>>> formula(f)
x^2 + 1 # Sym
>>> argnames(f)
x # Sym
>>> class(f)
'symfun' # String
It prints as its formula, which is what char(f) gives you and what MATLAB
shows. Everything else in this page treats it as that formula — diff(f) is
2*x, a*f is a*(x^2 + 1) — so the whole symbolic table works on one
without being taught about it. Two arguments work the same way, and they
substitute simultaneously:
>>> g(a, b) = a*b + 1
g = a*b + 1 # Sym
>>> g(b, a)
a*b + 1 # Sym
finverse and compose#
>>> finverse(a*x + b)
(x - b)/a # Sym
>>> compose(exp(x), log(y))
y # Sym
finverse(f) is the y with f(y) = x, written in x. An inverse is not
unique and both this console and MATLAB take one branch — the positive one, so
finverse(x^2) is x^(1/2) rather than the pair. It is built on solve, so
what solve can do is what it can do.
syms y(t) — a function with no formula#
That is the point of it. Its derivative cannot be worked out, so it stays as one:
>>> syms y(t)
>>> diff(y, t)
diff(y(t), t) # Sym
…and that is what a differential equation is written over.
dsolve#
>>> syms y(t) a
>>> dsolve(diff(y, t) == a*y)
C1*exp(a*t) # Sym
>>> dsolve(diff(y, t) == a*y, y(0) == 1)
exp(a*t) # Sym
>>> dsolve(diff(y, t, 2) + 2*diff(y, t) + 5*y == 0)
C1*cos(2*t)*exp(-t) + C2*exp(-t)*sin(2*t) # Sym
>>> dsolve(diff(y, t, 2) + y == 0, y(0) == 1, subs(diff(y, t), t, 0) == 0)
cos(t) # Sym
What it solves, and this is a decision rather than a limit that was hit:
| Shape | How |
|---|---|
first order, linear, any coefficient — y' + p(t)y = q(t) | the integrating factor exp(∫p), so a constant coefficient is just the easy case |
| second order, linear, constant coefficients | the characteristic polynomial — distinct real, repeated and complex roots, in MATLAB's own exp, t*exp and exp*cos/exp*sin forms |
| a constant forcing term | added as the particular solution |
| initial conditions | y(0) == 1, and subs(diff(y, t), t, 0) == 0 for a derivative |
Anything else refuses and says so. MATLAB will answer a great deal more; a console that guessed at the rest would be quietly wrong, which on a symbolic engine is the one failure worth avoiding above all others.
⚠ The arbitrary constants are C1 and C2 on both sides, and their signs
are not shared. MATLAB writes C1*cos(t) - C2*sin(t) where this writes
C1*cos(t) + C2*sin(t), and it labels the two exponentials of a
distinct-root solution the other way round. Both are the same two-parameter
family. With initial conditions there is nothing arbitrary left and the two
answers are identical.
Every line above is real output, captured with
ICoreBlocks --console "<line>" on 2026-09-05 from the build that landed the
rows.
Seven things that surprise people#
sym(0.1)is1/10, not the double you typed. MATLAB's default conversion RECOGNISES a number rather than casting it: a short rational, a rational multiple ofpi, or a square root of one.sym(pi/4)ispi/4andsym(sqrt(2))is2^(1/2). When nothing short reproduces the value you get the exact binary rational instead —sym(1.23456789)is5559999489367579/4503599627370496, which is genuinely what that double is.sym(x, 'f')asks for that form outright.subsanswers a SYM, not a number.subs(x^2, x, 2)issym(4); it prints as4and it is still symbolic, which is whydouble()exists beside it. The same applies to the replacement going in:subs(x^2, x, 0.5)is1/4, because the 0.5 is converted the way rule 1 describes.coeffscounts DOWN.[c, t] = coeffs(2*x^3 + 5*x, x)answersc = [2, 5]witht = [x^3, x], and only the non-zero coefficients are there.coeffs(p, x, "All")keeps the zeros —[2, 0, 5, 0].sym2polyis the one that always answers every coefficient, highest power first, as plain numbers.- An integral the table cannot do comes back as itself.
int(exp(x^2))answersint(exp(x^2), x)rather than an error or a wrong closed form — MATLAB does the same thing whenever its own engine cannot go further. What this console does cover: polynomials, rational functions, the elementary antiderivatives,f(a*x + b), integration by parts againstx^n, andsin^2/cos^2. - Two antiderivatives can both be right. They differ by a constant, so
int(sin(2*x + 1))is-cos(2*x + 1)/2here andsin(x + 1/2)^2in MATLAB — the same function, 1/2 apart. Differentiate both if you want to see it. vpawill not print digits it does not have.vpa(pi, 40)is exact, and so is anything built from rationals,pi,e, powers and square roots.vpa(sin(2), 32)is REFUSED, becausesinis evaluated in double precision here and 32 digits of a 17-digit answer would be a lie. Ask for 16 or fewer and it answers.- The same name can mean two things, and the value decides which.
diffon a matrix is still the difference between neighbouring elements;diffon a symbolic expression is the derivative. So arefactor(primes, or polynomial factors),gradient,curlanddivergence(the numeric fields, or the symbolic ones), andgamma,erf,erfc,factorialandnchoosek(a double each, or an expression each). This is MATLAB's own arrangement, not a collision. gammaand its family answer EXACTLY where an exact answer exists.gamma(sym(5))is24,gamma(sym(0))isInf, and every half-integer is a rational multiple of the root of pi —gamma(sym(7)/2)is(15*pi^(1/2))/8,gamma(sym(-1)/2)is-2*pi^(1/2). Ask for a number withdoubleorvpawhen you want one. The derivative brings inpsi, the digamma function, exactly as MATLAB's does:diff(gamma(x))isgamma(x)*psi(x).psiis an expression here rather than a name you can call on a number.gcdof two polynomials keeps the numbers in front of them.gcd(2*x^2 - 2, 4*x + 4)is2*x + 2, notx + 1— the greatest common divisor is taken of the whole-number parts and of the polynomials separately, and then multiplied together. It is the same rule that makesgcd(x^2 - 1, 2)equal 1: a plain number has no polynomial part to share. This is MATLAB's answer in both cases.gcdandlcmalso work on exact fractions —gcd(sym(1)/2, sym(1)/3)is1/6— and agcdof two expressions in more than one variable is refused rather than guessed at.- A comparison of two symbols is a VALUE, not a yes-or-no.
x == 1is a condition you can hand topiecewiseor store in a variable; asking whether it holds is a separate step. And the two ways of asking are different questions:logical(cond)asks whether the two sides are the same EXPRESSION,isAlways(cond)asks whether they are the same FUNCTION — sological((x+1)^2 == x^2+2*x+1)is false whileisAlwaysof it is true. Both answer the way MATLAB answers. - A condition that cannot be proved is false, not an error. Without an
assumption
xcould be complex, soisAlways(x^2 >= 0)is false;assume(x, "real")first and it is true. MATLAB does the same thing and prints a warning about it. >and>=get rewritten. Typex^2 >= 0and it comes back as0 <= x^2— MATLAB stores only the four relations==,~=,<and<=, and turns the other two round. Nothing is lost; it is the same condition.- A limit that does not exist is
NaN, not an error.limit(1/x, x, 0)is NaN because the two sides disagree; ask for one of them and you get-InforInf. MATLAB answers the same three things. taylor's"Order"counts terms, not powers. The default 6 gives you everything up tox^5. This catches people out in MATLAB too; it is the same convention.symsumwith no bounds is not a sum from 1.symsum(k)isk^2/2 - k/2— the function whose difference isk, which is the sum from 1 tok - 1. Give it bounds when you mean a particular sum.- The rank of a matrix of free symbols is full.
rank(sym("A", [2 2]))is 2, because nothing tells the console thatA1_1is zero — and MATLAB answers 2 for the same reason. If you know an entry is zero, say so by putting a zero there. - A matrix with no inverse does not raise an error.
invof a singular matrix answers infinities, here and in MATLAB. The two consoles fill in slightly different infinities; neither number means anything, anddetis the honest question to ask.
What is not here#
Each of these refuses with a message that says so, rather than answering something close:
- an equation
solvecannot invert — it solves polynomials exactly,x^n = cin radicals, rational equations through their numerator, and equations where an elementary function can be peeled off the unknown one step at a time.sin(x) + x == 1is outside that and says so. MATLAB is not much better behaved here than it looks: it answers a general cubic or quintic withroot(z^3 - z - 1, z, 1), a NAME for the root, and so does this. - a system that is not square and linear —
[x, y] = solve(...)wants as many equations as unknowns and no unknown multiplied by another. - a complex
vpasolve— the digits here are real decimal arithmetic, sovpasolve(x^2 + 1 == 0, x)refuses where MATLAB prints±1.0i. - a limit outside the rules above —
limit(exp(x)/log(x), x, Inf)says so rather than guessing. symsum(1/k^3, k, 1, Inf)— that iszeta(3), andzetais not here. The even powers 2, 4 and 6 do answer.symprodof anything but the index or a constant — MATLAB closessymprod(k + 1, k, 1, n)with a gamma quotient; this console refuses it.- dividing one matrix by another —
A/BmeansA*inv(B); write that.A^nfor a wholendoes work. - the null space of a matrix that has none —
nullof a full-rank matrix says so rather than answering an empty value this console does not have. negativeandcomplexassumptions —real,positive,integerandrationalare the four this console reads, plus any relation you assume.- the derivative of
abswithout an assumption — MATLAB answers it in terms ofconj, which this console does not have.assume(x, "real")first and both answersign(x). besselj,bessely,besseli,besselk,zetaandhypergeom—gamma,erf,erfc,factorialandnchoosekare all here, and each of them can be differentiated, integrated and turned into a number. These six cannot be turned into a number at all on this console, so carrying them as expressions would hand you something nothing could evaluate; they refuse and say so. (MATLAB does answer some of them exactly —zeta(sym(2))ispi^2/6there.)psi(x)as something you can call on a number. It exists here only as part of an answer —diff(gamma(x))isgamma(x)*psi(x)— anddoubleandvpawill evaluate it, but there is no numericpsito type, and the polygamma family MATLAB writespsi(k, x)is not here at all.- arbitrary-precision integers — numbers here are exact rationals of 64-bit
integers, so
sym(2)^100(a 31-digit integer in MATLAB) is refused rather than silently wrapped. - a Fourier term outside the table, or a positivity it cannot prove.
ifourier(1/(1 + 1i*w)), a phase (fourier(cos(x + 1))),x*dirac(x)and1/x^2come back unevaluated, where MATLAB answers them. So doesfourier(exp(-a*abs(x)))untilais declared positive. - an
ilaplaceoriztranswhose denominator has a SYMBOL in it. The decomposition is exact over rational numbers, soilaplace(w/(s^2 + w^2))comes back unevaluated where MATLAB answerssin(t*w). The forward direction has no such limit —laplace(sin(w*t))isw/(s^2 + w^2). - a repeated irreducible quadratic —
ilaplace(1/(s^2 + 1)^2)issin(t)/2 - t*cos(t)/2in MATLAB and unevaluated here. - an ODE outside
dsolve's table — nonlinear iny, third order or above, a second-order equation with a coefficient that varies witht, or a forcing term that is not constant. The table above says what does work. - a SYSTEM of differential equations — one equation in one unknown function.
fplot. This one is not a symbolic gap at all:fplothas never been on this console under any kind — not a recipe verb, not a function, and no core row has ever listed it — so plotting an expression is a plotting verb that is missing rather than anything to do with symbols.matlabFunction(expr)makes a handle out of it andsubs(expr, x, values)evaluates it.finverseof somethingsolvecannot invert —finverse(sin(x))isasin(x)in MATLAB, and heresolvewill not peel a trig function off the unknown when the other side is an expression rather than a number.