Whats the best way to solve a system of 12 linear equations where all of them are defined using chart coords independent variables?

asked 2026-05-21 08:43:54 +0200

Joudy gravatar image

I'm trying to solve a system of 12 linear non-differential equations with 12 unknowns.

I tried matrix multiplication in that I wrote it in the form MA=b where M is a 12x12 matrix, A and b are 12x1 vectors but i keep getting errors because Sage tried to determine the rank/invertibility of a symbolic 12×12 matrix whose entries contain things like e^f(r),sinθ,f(r),v(r).

I also tried writing it as a system of 12 equations and using solve() but that is very inconsistent, it sometimes works and sometimes doesnt, the issue is related to the independent variables being chart coordinates.

And even when it does work, it flattens some of the functions I had defined, so for example my unknowns are 12 A_i components. I had a function v=v(r), in the solution one unknown is proportional to dv/dr. Then after solve() the program forgets that the v in the dv/dr is still a function of r, so if you take the derivative again of that unknown with respect to r, it doesnt take its derivative.

Is there a better method to solve these equations? or to fix the above issues?

edit retag flag offensive close merge delete