I've been trying to solve the following equations in order to plot Subscript[θ, 41] with respect to Subscript[θ, 2] from 0 to 360 degrees.
Subscript[r, 1] = 38.79;
Subscript[r, 2] = 15;
Subscript[r, 3] = 50;
Subscript[r, 41] = 41.5;
Subscript[θ, 1] = 191.6 Degree;
Eq1 = Subscript[r, 1] Cos[Subscript[θ, 1]] ==
(Subscript[r, 2] Cos[Subscript[θ, 2] \[Degree]] +
Subscript[r, 3] Cos[Subscript[θ, 3] \[Degree]] +
Subscript[r, 41] Cos[Subscript[θ, 41] \[Degree]])
Eq2 = Subscript[r, 1] Sin[Subscript[θ, 1]] ==
(Subscript[r, 2] Sin[Subscript[θ, 2] \[Degree]] +
Subscript[r, 3] Sin[Subscript[θ, 3] \[Degree]] +
Subscript[r, 41] Sin[Subscript[θ, 41] \[Degree]])
Plot[(Subscript[θ, 41] /.
NSolve[{Eq1, Eq2}, {Subscript[θ, 3], Subscript[θ, 41]}][[2]]) + 360,
{Subscript[θ, 2], 0, 360} , PlotRange -> {{0, 360}, {240, 300}}]
Solution = (Subscript[θ, 41] /.
NSolve[{Eq1, Eq2}, {Subscript[θ, 3], Subscript[θ, 41]}][[2]]) + 360;
Plot[Solution, {Subscript[θ, 2], 0, 360}]
The solution of this gives 4 solutions for Subscript[θ, 41].
The problem is, whenever I try to plot one of those solutions by putting the whole Solve phrase in the Plot statement, it works.
But whenever I try to do them separately, it gives a completely different plot.
More details shown in the following photos:
The first plot is the one I'm looking for. The second one gives a different plot!... Although I technically haven't done anything different.
I think it's important to mention that I've noticed that the strange plot I got (the second one) is somehow a combination of all 4 solutions. It's typical to a certain solution in a certain range of Theta's, then flips to another solution in another range. I don't know how this helps.
I hope someone would explain this to me, thank you !!


Plothas attributeHoldAllor that it effectively is usingBlockfor Theta2. – Karsten7 Dec 11 '15 at 21:37Subscript[r, 3 ]is undefined. Is that intentional? – bbgodfrey Dec 11 '15 at 23:36Subscript[r, 3] = 50. – Karsten7 Dec 11 '15 at 23:51Subscript[\[Theta], 2]has a value at every pointPlotevaluates thatNSolve[...]. It is very similar to the situation here. – Karsten7 Dec 12 '15 at 00:17Subscriptwhile defining symbols (variables).Subscript[x, 1]is not a symbol, but a compound expression whereSubscriptis an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]which is to assign a Downvalue to the opratorSubscriptand not an Ownvalue to an indexedxas you may intend. Read how to properly define indexed variables here – rhermans Feb 22 '16 at 10:17