I’m attempting to solve a system of 8 vector equations with 8 unknown vectors symbolically in Julia using Ax = b. The matrix is 24*24 (due to 3-dimensional vectors) of variables I’ve defined using @ vars
After defining A and b I have x = A \ b however when running this in the VSCode editor it takes a few minutes to evaluate but eventually just spits out a bunch of errors.
Sure, of course. Here is my code if that is sufficient as an example. Please let me know if I’m misinterpreting the request! The b vector gets pretty gnarly and the A matrix is composed of smaller 3x3 matrices
# A Matrix
# xddot_a xddot_b wdot_a wdot_b F_a_con F_b_con T_a_con T_b_con
A = [m_a*eye z z z -eye z z z;
z m_b*eye z z z -eye z z;
z z -I_a z d_amat z eye z;
z z z -I_b z d_bmat z eye;
z z z z eye eye z z;
z z z z z rx eye eye
eye -eye wa_dots xmat(d_b) z z z z
z z -eye eye z z z z]
A = factorize(A)
x0 = A \ b
I have it running with Symbolics.jl now. It’s been evaluating for about 50 minutes and hasn’t finished. Not sure if this is a realistic time given that Julia is supposed to be relatively fast?
Well, solving systems of equations symbolically is a hard task and can be fast or slow, depending on many little details. Julia is much faster than SymPy for some tasks, but definitely not for all tasks. Keep posting your results, perhaps we can find the bottleneck.
Does it actually finish with SymPy though? My guess it that it would also do funky things, since yes solving a system of equations has exponentially more equations as the system grows if you just use \.
I would recommend using the documented solve_for option.
with SymPy it produced errors. However, for now I have decided to go down a different avenue to solve this problem that is not symbolic. I appreciate the time you took to help me in my efforts!