Context: I am trying to solve a set of equations generated by hand from a complicated, but not particularly strange system via Newton's Second and Third Laws, and a few constraints. All the resulting equations are linear, and several are trivial, but essential. I am trying to do this with the Solve[] function in Mathematica.
If you want the systems, this diagram shows everything. It's probably indecipherable, but it's what I've got.
The real guts of my issue:
My code is as follows:
Clear["Global`*"];
Solve[
{
(*N2L*)
(*Central Stick*)
(*x*)Facx + Fbcx + Fhcx == mc acx,
(*y*)Facy + Fbcy + Wec + Fhcy == mc acy,
(*θ*)yha Facx + yhb Fbcx == Ic αc,
(*Stick A*)
(*x*)Flax + Fcax + Frax == ma aax,
(*y*)Flay + Fcay + Fray + Wea == ma aay,
(*θ*)(rcp Cos[θ] Flay + rcp Sin[θ] Flax) - (rcp Cos[θ] Fray + rcp Sin[θ] Frax) == Ia αa,
(*Stick B*)
(*x*)Flbx + Fcbx + Frbx == mb abx,
(*y*)Flby + Fcby + Frby + Web == mb aby,
(*θ*)(rcp Cos[θ] Flby + rcp Sin[θ] Flbx) - (rcp Cos[θ] Frby + rcp Sin[θ] Frbx) == Ib αb,
(*Left Pan*)
(*x*)Falx + Fblx + fs1l == ml alx,
(*y*)Faly + Fbly + N1l + Wel == ml aly,
(*θ*)-xa1 N1l - xap Wel - yab Fblx == Ip αl,
(*Right Pan*)
(*x*)Farx + Fbrx + fs2r == mr arx,
(*y*)Fary + Fbry + N2r + Wer == mr ary,
(*θ*)xa2 N2r + xap Wer + yab Fbrx == Ip αr,
(*Mass 1*)
(*x*)fsl1 == m1 a1x,
(*y*)Nl1 + We1 == m1 a1y,
(*Mass 2*)
(*x*)fsr2 == m2 a2x,
(*y*)Nr2 + We2 == m2 a2y,
(*N3L*)
Facx == -Fcax,
Facy == -Fcay,
Fbcx == -Fcbx,
Fbcy == -Fcby,
Falx == -Flax,
Faly == -Flay,
Fblx == -Flbx,
Fbly == -Flby,
Farx == -Frax,
Fary == -Fray,
Fbrx == -Frbx,
Fbry == -Frby,
N1l == -Nl1,
N2r == -Nr2,
fs1l == -fsl1,
fs2r == -fsr2,
(*Force Definitions*)
We1 == -m1 g,
We2 == -m2 g,
Wel == -mp g,
Wer == -mp g,
Wea == -ma g,
Web == -mb g,
Wec == -mc g,
(*Accelerations*)
acx == 0,
acy == 0,
αc == 0,
aax == acx,
aay == acy,
abx == acx,
aby == acy,
αa == αb,
aly == αa (rcp Cos[θ] + xap),
alx == αa (rcp Sin[θ] + yap),
αl == 0,
ary == -αa (rcp Cos[θ] + xap),
arx == -αa (rcp Sin[θ] + yap),
αr == 0,
a1x == alx,
a1y == aly,
α1 == αl,
a2x == arx,
a2y == ary,
α2 == αr
},
{
Fhcx, Fhcy,
Facx, Fcax, Facy, Fcay, Fbcx, Fcbx, Fbcy, Fcby,
Falx, Flax, Faly, Flay, Fblx, Flbx, Fbly, Flby,
Farx, Frax, Fary, Fray, Fbrx, Frbx, Fbry, Frby,
N1l, Nl1, N2r, Nr2, fs1l, fsl1, fs2r, fsr2,
We1, We2, Wel, Wer, Wea, Web, Wec,
acx, acy, αc,
aax, aay, abx, aby,
αa, αb,
alx, aly, αl,
arx, ary, αr,
a1x, a1y, α1,
a2x, a2y, α2
}
]
Or at least that's how it looks when I copy paste it here. I'm now realizing that becomes illegible because of formatting discrepancies, so here's some screenshots:
Mathematica returns an empty list when this is evaluated. My understanding is that this is supposed to mean that the system has either 0 or infinitely many solutions, but neither seem likely. It is a system of 62 equations with 62 unknown variables, and thus should (to my knowledge) have one unique solution. I have tried adding assumptions (limit to reals, and add assumptions that all known variables are positive numbers), but this leads to the the command never finishing (or at least not in the amount of time I've waited).
Attempts to simplify the system, or follow other solutions found in various other questions have all resulted in another instance of errors mentioned above, or a number of other errors.
So basically I'm stuck. Any suggestions?
FindRoot
, to check that your formulation is correct and it returns "reasonable" answers. 2) If the equations are correct, perhaps tryReduce
instead ofSolve
. $\endgroup$