Hello,
I want to solve a system of linear equations, so I wrote:
using Symbolics
@variables a11, a12, a21, a22
@variables x1, x2
@variables b1, b2
solution = Symbolics.solve_for([a11*x1+a12*x2~b1, a21*x1+a22*x2~b2],[x1, x2])
println(solution)
- Is it possible to achieve the same with something similar to
using Symbolics
@variables A[1:2, 1:2]
@variables x[1:2]
@variables b[1:2]
solution = Symbolics.solve_for(A*x~b,x)
println(solution)
- I want to rewrite the solution as to pull out 1/det(A). For doing so I tried to expand the expression, but
solution = simplify(solution, expand=true)
did not work. How can the solution expression be expanded?