Group Abstract Group Abstract

Message Boards Message Boards

Plot multiple functions?

Posted 8 years ago

hi , when i tried to solve these eqns to give me function of anther variable ....it gives me so many eqns and i cant know which the right ones so i couldnt plot them i want to plot w3 , w4 with respect to varible theta2 (i want all varibles in output to be with respect to theta2} i will attach the code programming

r1 = 600;
r2 = 200;
r3 = 700;
r4 = 900;
(* \[Theta]2 is NOT constant !..*)
\[Alpha]2 = 0;
\[Omega]2 = 12.568;

eq1 = -r1  + r2 Cos[\[Theta]2 ] + r3 Cos[\[Theta]3 ] + 
   r4 Cos[\[Theta]4 ] ;
eq2 = r2 Sin[\[Theta]2 ] + r3 Sin[\[Theta]3  ] + r4 Sin[\[Theta]4 ] ;
m = Map[{\[Theta]3 , \[Theta]4} /. # &, {ToRules[
      N[Reduce[{eq1 == 0 && eq2 == 0} , {\[Theta]3, \[Theta]4}] /. {C[
           1] -> 0 , C[2] -> 0}]]}]/Degree;
Plot[m, {\[Theta]2, 0, 2 Pi}]
eq3 = -r2 \[Omega]2 *Sin[\[Theta]2 Degree] - 
   r3 \[Omega]3 Sin[\[Theta]3 Degree] - 
   r4 \[Omega]4 Sin[\[Theta]4 Degree];
eq4 = r2 \[Omega]2 Cos[\[Theta]2 Degree] + 
   r3 \[Omega]3 Cos[\[Theta]3 Degree] + 
   r4 \[Omega]4 Cos[\[Theta]4 Degree];

q = Map[{\[Omega]3 , \[Omega]4} /. # &, {ToRules[
     N[Reduce[{eq3 == 0 && eq4 == 0} , {\[Omega]3 , \[Omega]4}]]]}];
Plot[q, {\[Theta]2, 0, 2 Pi}]
Attachments:
POSTED BY: Ahmed Khodari
4 Replies
Attachments:
POSTED BY: Udo Krause

With $\omega2=\frac{1571}{125}$ the Reduce[] runs without warnings, giving at least a starting point for further work.

POSTED BY: Udo Krause

Why do only eq3 and eq4 have a Degree after the $\theta2, \theta3, \theta4$?

eq5 seems to have an error, it has three $\theta3$ and one $\theta4$ instead of two $\theta3$ and two $\theta4$ as eq6 has.

POSTED BY: Udo Krause

You seem to intend that $q$ depends on $\theta2$ only. That is not the case

In[74]:= Variables[q]
Out[74]= {\[Omega]3, \[Omega]4, Cos[0.0174533 \[Theta]2], 
 Cos[0.0174533 \[Theta]3], Cos[0.0174533 \[Theta]4], 
 Csc[0.0174533 \[Theta]3], Csc[0.0174533 \[Theta]4], 
 Sec[0.0174533 \[Theta]3], Sec[0.0174533 \[Theta]4], 
 Sin[0.0174533 \[Theta]2], Sin[0.0174533 \[Theta]3], 
 Sin[0.0174533 \[Theta]4]}

and therefore the

Plot[q, {\[Theta]2, 0, 2 Pi}]

remains empty. You need to replace $\theta3$ and $\theta4$ by the results of the previous substitution.

What is the purpose of this calculation? To eliminate $\theta3, \theta4, \omega3, \omega4, \alpha3, \alpha4$ from the equations in order to get one expression in $\theta2$?

POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard