Print solution

# S3 method for caracas_solve_sys_sol
print(
  x,
  simplify = getOption("caracas.print.sol.simplify", default = TRUE),
  ...
)

Arguments

x

A caracas_symbol

simplify

Print solution in a simple format

...

Passed to print.caracas_symbol()

Examples

if (has_sympy()) {
  x <- symbol('x')
  solve_sys(x^2, -1, x)
  
  y <- symbol("y")
  lhs <- cbind(3*x*y - y, x)
  rhs <- cbind(-5*x, y+4)
  sol <- solve_sys(lhs, rhs, list(x, y))
  sol
}
#> Solution 1:
#>   x =  2/3 
#>   y =  -10/3 
#> Solution 2:
#>   x =  2 
#>   y =  -2