Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- g = 9.81;
- a = 1.5;
- Subscript[w, 0] = Sqrt[g/a]
- sol1 = NDSolve[
- {x1'[t] == x2[t],
- x2'[t] ==
- [Minus]1/2 x4'[t] Cos[x1[t] [Minus] x3[t]] [Minus]
- Subscript[w, 0] ^2 Sin[x1[t]] [Minus]
- x4[t] Sin[x1[t] [Minus] x3[t]],
- x3'[t] == x4[t],
- x4'[t] == [Minus]x2'[t] Cos[x1[t] [Minus] x3[t]] [Minus]
- Subscript[w, 0] ^2 Sin[x3[t]] + x2[t]^2 Sin[x1[t] [Minus] x3[t]],
- x1[0] == 0, x2[0] == 0, x3[0] == [Pi]/9, x4[0] == 0},
- {x1, x2, x3, x4}, {t, 0, 50},
- Method -> {"EquationSimplification" -> "Residual"}];
- x1sol[t_] := x1[t] /. sol1[[1]]
- x2sol[t_] := x2[t] /. sol1[[1]]
- x3sol[t_] := x3[t] /. sol1[[1]]
- x4sol[t_] := x4[t] /. sol1[[1]]
- Plot[x1sol[t], {t, 0, 50}, Frame [RightArrow] True,
- PlotRange [RightArrow] {All, All},
- FrameLabel [Minus] > {StyleForm["time (s) ",
- FontSize [RightArrow] 14],
- StyleForm["[CurlyPhi]1 (rad)", FontSize [RightArrow] 14]}]
- Plot[x3sol[t], {t, 0, 50}, Frame [RightArrow] True,
- PlotRange [RightArrow] {All, All},
- FrameLabel [Minus] > {StyleForm["time (s) ",
- FontSize [RightArrow] 14],
- StyleForm["[CurlyPhi]2 (rad)", FontSize [RightArrow] 14]}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement