solve.yac_symbol | R Documentation |
This generic function solves the equation $a x = b$ for $x$.
## S3 method for class 'yac_symbol' solve(a, b, ...)
a |
A |
b |
A |
... |
See details and examples. |
When a
is a matrix and b
not provided,
this finds the inverse of a
.
When a
is a matrix and a vector b
is provided, the
linear system of equations is solved.
Note that solving non-linear equations:
solve(a, b)
: find roots of a
for variable b
, i.e. yacas Solve(a == 0, b)
solve(a, b, v)
: find solutions to a == b
for variable v
, i.e. yacas Solve(a == b, v)
This also works for a system of equations (when a
is a vector)
A <- outer(0:3, 1:4, "-") + diag(2:5) a <- 1:4 B <- ysym(A) b <- ysym(a) solve(A) solve(B) solve(A, a) solve(B, b) poly <- ysym("x^2 - x - 6") solve(poly, "x") # Solve(poly == 0, x) solve(poly, 3, "x") # Solve(poly == 3, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.