# LAMPIRAN A : MENTERJEMAHKAN SETIAP LANGKAH DEMI LANGKAH KE BAHASA MATHEMATICA 9

31

(1)

1

1

2

3

1

1

2

3

2

1

2

2

3

3

1

3

3

2

3

2

22

1

2

3

3

32

1

3

1

2

3

1

## (2.19)

g (m1+m2+m3) Sin[θ1[t]]+θ2’[t]^2 l2 (m2+m3) Sin[θ1[t]

-θ2[t]]+θ3’[t]^2 l3 m3 Sin[θ1[t]-θ3[t]]+l1 m1 θ1’’[t]+(m2+m3)

## pendulum:

sol=NDSolve[eqns, (θ1,θ2}, {t,0,p}, Maxsteps->Infinity, PrecisionGoal->4];pq=sol[[1,1,2,1,1,2]];

## Posisi Persamaan pendulum :

(2)

pos2[t_]:={(l1 Sin[θ1[t]]+l2 Sin[θ2[t]]),(-l1 Cos[θ1[t]]-l2

Cos[θ2[t]])};

pos3[t_]:={(l1 Sin[θ1[t]]+l2 Sin[θ2[t]]+l3 Sin[θ3[t]]),(-l1

Cos[θ1[t]]-l2 Cos[θ2[t]]-l3 Cos[θ3[t]])};

(3)

## Tombol Pemilihan Grafik hasil animasi Pendulum :

Switch[plottype,

(*Tampilan plot simpangan x m1 dan m2 terhadap t*)

x1x2, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Green, Blue}, Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan y m1 dan m2 terhadap t*)

y1y2, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Green, Blue}, Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan x m2 dan m3 terhadap t*)

x2x3, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Blue, Red},

Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan y m2 dan m3 terhadap t*)

y2y3, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Blue, Red},

Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan θ m1 dan m2 terhadap t*)

θ1θ2, Plot[{g1[t], g2[t]}, {t,0,p},

(4)

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150}, AspectRatio->32/100.],

(*Tampilan plot simpangan θ m2 dan m3 terhadap t*)

θ2θ3, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Blue, Red},

Axes->False,PlotLabel->Style{“θ(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan Plot x1 vs y1*)

x1y1,

ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion-

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[x,1],” vs “,

Subscript[y,1]}],PlotRange->{{-3Pi/4,3Pi/4}, Automatic},

ImageSize->{420,150},PlotStyle->Darker[Green,.1],AspectRatio->32/100.],

(*Tampilan Plot x2 vs y2*)

x2y2,

ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion-

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[x,2],” vs “, Subscript[y,2]}],PlotRange

->{{-3Pi/2,3Pi/2}, Automatic},

ImageSize->{420,150},PlotStyle->Darker[Blue,.1],AspectRatio->32/100.],

(*Tampilan Plot x3 vs y3*)

x3y3,

ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion-

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[x,3],” vs “, Subscript[y,3]}],PlotRange

->{{-3Pi/2,3Pi/2}, Automatic},

ImageSize->{420,150},PlotStyle->Darker[Blue,.1],AspectRatio->32/100.],

(*Tampilan Plot θ1 vs θ2*)

θθ, ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion -

(5)

->{{-Pi,Pi}, Automatic}, ImageSize->{420,150},ColorFunction->(Blend[{Blue, Green}, #1]&),AspectRatio->32/100.],

(*Tampilan Plot θ2 vs θ3*)

θϕ, ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion -

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[θ,2],” vs “, Subscript[θ,3]}],PlotRange

->{{-Pi,Pi}, Automatic},

ImageSize->{420,150},ColorFunction->(Blend[{Red, Blue}, #1]&),AspectRatio->32/100.],

(*Tampilan plot ω1 vs θ1*)

θθPrime1, ParametricPlot[{g1[t], g2[t]}, {t,0,p}, MaxRecursion

->ControlActive[3,4],

Axes->False,PlotLabel->Row[{Subscript[OverDot[θ],1],” vs “,Subscript[θ,1]}],Plot Range->{{-Pi,Pi}, Automatic},ImageSize{420,150},AspectRatio->32/100., PlotStyle->Darker[Green,.2]],

(*Tampilan plot ω2 vs θ2*)

θθPrime2, ParametricPlot[{g1[t], g2[t]}, {t,0,p}, MaxRecursion

->ControlActive[3,4],

Axes->False,PlotLabel->Row[{Subscript[OverDot[θ],2],” vs “,Subscript[θ,2]}],PlotRange ->{{-Pi,Pi}, Automatic},ImageSize{420,150},AspectRatio->32/100., PlotStyle->Darker[Blue,.2]],

(*Tampilan plot ω3 vs θ3*)

θθPrime2, ParametricPlot[{g1[t], g2[t]}, {t,0,p}, MaxRecursion

->ControlActive[3,4],

(6)

Style[“***********************************************”, Bold,16, Darker[Black, .1], “Label”],

Style[“PENDULUM NONLINIER”, Bold, 18, Darker[Black, .1], “Label”],

Style[“******************************************”, Bold, 12, Darker[Black, .1], “Label”],

Style[“ “, Bold, 12, Darker[Green,.8], “Label”],

Style[“Parameter Pendulum”,”Subsection”, Bold, 12,

Darker[Black,.1], “Label”],

## hijau, biru, merah, dan waktu (Berurutan):

{{m1, 1, “Green mass (m1)”},1,5,ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{m2,1,”Blue mass (m2)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{m3,1,”Red mass (m3)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{l1,1,”Green length (l1)”},1,5,ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{l2,1,”Blue length (l2)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{l3,1,”Red length (l3)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{g,1,”Gravity (g)”},1,9.8, ImageSize->Tiny, ContinuousAction->False, Appearance->”Labeled”},

Delimiter,

Style[“Kondisi Awal”, “Subsection”, Bold, 12,

Darker[Black,.1],”Label”],

{{init1,Pi/2,”green angle(θ1)

“},-Pi/2, Pi/2, Appearance->”Labeled”, ImageSize->Tiny},

{{init2,0,”blue angle(θ2)

(7)

{{init3,0,”red angle(θ3)

“},-Pi/2, Pi/2, Appearance->”Labeled”, ImageSize->Tiny},

{{initprime1,0,”green velocity(ω1)”},0,5,ImageSize

->Tiny,Appearance->”Labeled”},

{{initprime2,0,”blue velocity(ω2)”},0,

5,ImageSize->Tiny,Appearance->”Labeled”},

{{initprime3,0,”red velocity(ω3)”},0,5,ImageSize

->Tiny,Appearance->”Labeled”},

m3”, y2y3->” Simpangan y m2 dan m3”,θ1θ2->”Sensitivitas Kondisi

Awal θ1 dan θ2”, θ2θ3->”Sensitivitas Kondisi Awal θ2 dan

θ3”,x1y1->”x1 vs. y1”, x2y2->”x2 vs. y2”, x3y3->”x3 vs. y3”,θθ->”θ1

vs. θ2”, θϕ->”θ2 vs. θ3”, θθprime1->” 𝜃̇1 vs θ1”, θθprime2->” 𝜃̇2 vs

θ2”, θθprime3->” 𝜃̇3 vs θ3”} ”},ControlType->PopupMenu}

## Tombol untuk menganimasikan pendulum terhadap waktu:

{{p,0.001,”Animasi”},0.001,100,1.0, ControlType->Trigger},

AutorunSequencing->All,TrackedSymbols:->Manipulate,Initialization:->Get[“Barcharts”],

(8)

## PENDULUM NONLINIER

Berikut ini merupakan listing program untukanimasi dan visualisasi gerakan triple pendulum nonlinier

(*Penentuan Variabel-variabel dan konstanta-konstanta*)

sol=NDSolve[eqns, (θ1,θ2}, {t,0,p}, Maxsteps->Infinity, PrecisionGoal->4];pq=sol[[1,1,2,1,1,2]];

pos1[t_]:={l1 Sin[θ1[t]],-l1 Cos[θ1[t]]};

pos2[t_]:={(l1 Sin[θ1[t]]+l2 Sin[θ2[t]]),(-l1 Cos[θ1[t]]-l2

Cos[θ2[t]])};

pos3[t_]:={(l1 Sin[θ1[t]]+l2 Sin[θ2[t]]+l3 Sin[θ3[t]]),(-l1

Cos[θ1[t]]-l2 Cos[θ2[t]]-l3 Cos[θ3[t]])};

path=ParametricPlot[Evaluate[pos3[t]/.sol[[1]],{t,p-

(9)

path1=ParametricPlot[Evaluate[pos2[t]/.sol[[1]],{t,p-p/5,p},

Darker[Green,.2],Line[{{0, 0}, First@Evaluate[pos1[pq]/.sol]}], Disk[First@Evaluate[pos1[pq]/.sol,.2],ImageSize->{320, Sin[θ2[t]],y1y2,(-l1 Cos[θ1[t]]-l2 Cos[θ2[t]]),x2x3,(l1

Sin[θ1[t]+l2 Sin[θ2[t]]+l3 Sin[θ3[t]]),y2y3,(-l1 Cos[θ1[t]-l2 Cos[t]]-l3

Cos[t]]),x1y1,pos1[t][[2]],x2y2,pos2[t][[2]],pos3[t][[2]],θ1θ2, θ2[t],θ2θ3,θ3[t],θθ,θ2[t],θϕ,θ3[t],θθprime1,θ1’[t],θθprime2, θ2’[t],θθprime3,θ3’[t],_,1]/.sol[[1]];

Switch[plottype,

(*Tampilan plot simpangan x m1 dan m2 terhadap t*)

x1x2, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Green, Blue}, Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”],

PlotRange->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

(10)

(*Tampilan plot simpangan y m1 dan m2 terhadap t*)

y1y2, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Green, Blue}, Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan x m2 dan m3 terhadap t*)

x2x3, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Blue, Red},

Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan y m2 dan m3 terhadap t*)

y2y3, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Blue, Red},

Axes->False,PlotLabel->Style{“x(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan θ m1 dan m2 terhadap t*)

θ1θ2, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Green, Blue}, Axes->False,PlotLabel->Style{“θ(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

AspectRatio->32/100.],

(*Tampilan plot simpangan θ m2 dan m3 terhadap t*)

θ2θ3, Plot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3, 4], PlotStyle->{Blue, Red},

Axes->False,PlotLabel->Style{“θ(t)vs t”, “Label”], PlotRange

->{{pq-25,pq}, Automatic}, ImageSize->{420, 150},

(11)

(*Tampilan Plot x1 vs y1*)

x1y1,

ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion-

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[x,1],” vs “, Subscript[y,1]}],PlotRange

->{{-3Pi/4,3Pi/4}, Automatic},

ImageSize->{420,150},PlotStyle->Darker[Green,.1],AspectRatio->32/100.],

(*Tampilan Plot x2 vs y2*)

x2y2,

ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion-

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[x,2],” vs “, Subscript[y,2]}],PlotRange

->{{-3Pi/2,3Pi/2}, Automatic},

ImageSize->{420,150},PlotStyle->Darker[Blue,.1],AspectRatio->32/100.],

(*Tampilan Plot x3 vs y3*)

x3y3,

ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion-

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[x,3],” vs “, Subscript[y,3]}],PlotRange

->{{-3Pi/2,3Pi/2}, Automatic},

ImageSize->{420,150},PlotStyle->Darker[Blue,.1],AspectRatio->32/100.],

(*Tampilan Plot θ1 vs θ2*)

θθ, ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion -

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[θ,1],” vs “, Subscript[θ,2]}],PlotRange

->{{-Pi,Pi}, Automatic},

ImageSize->{420,150},ColorFunction->(Blend[{Blue, Green}, #1]&),AspectRatio->32/100.],

(*Tampilan Plot θ2 vs θ3*)

θϕ, ParametricPlot[{g1[t],g2[t]},{t,0,p},MaxRecursion -

>ControlActive[3,4],Axes->False,PlotLabel->Rown[{Subscript[θ,2],” vs “, Subscript[θ,3]

}],PlotRange->{{-Pi,Pi}, Automatic},

(12)

(*Tampilan plot ω1 vs θ1*)

θθPrime1, ParametricPlot[{g1[t], g2[t]}, {t,0,p}, MaxRecursion

->ControlActive[3,4],

Axes->False,PlotLabel->Row[{Subscript[OverDot[θ],1],” vs “,Subscript[θ ,1]}],PlotRange->{{-Pi,Pi}, Automatic},ImageSize{420,150},AspectRatio->32/100., PlotStyle->Darker[Green,.2]],

(*Tampilan plot ω2 vs θ2*)

θθPrime2, ParametricPlot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3,4],

Axes->False,PlotLabel->Row[{Subscript[OverDot[θ],2],” vs “,Subscript[θ,2]}],PlotRange ->{{-Pi,Pi}, Automatic},ImageSize{420,150},AspectRatio->32/100., PlotStyle->Darker[Blue,.2]],

(*Tampilan plot ω3 vs θ3*)

θθPrime2, ParametricPlot[{g1[t], g2[t]}, {t,0,p},

MaxRecursion->ControlActive[3,4],

Axes->False,PlotLabel-Style[“ANIMASI GERAK TRIPLE”, Bold, 18, Darker[Black,.1], “Label”],

Style[“***********************************************”,

Bold,16, Darker[Black, .1], “Label”],

Style[“PENDULUM NONLINIER”, Bold, 18, Darker[Black, .1], “Label”],

Style[“******************************************”, Bold, 12, Darker[Black, .1], “Label”],

Style[“ “, Bold, 12, Darker[Green,.8], “Label”],

Style[“Parameter Pendulum”,”Subsection”, Bold, 12,

(13)

{{m1, 1, “Green mass (m1)”},1,5,ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{m2,1,”Blue mass (m2)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{m3,1,”Red mass (m3)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{l1,1,”Green length (l1)”},1,5,ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{l2,1,”Blue length (l2)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{l3,1,”Red length (l3)”},1,5, ImageSize->Tiny,

ContinuousAction->False, Appearance->”Labeled”},

{{g,1,”Gravity (g)”},1,9.8, ImageSize->Tiny, ContinuousAction->False, Appearance->”Labeled”},

Delimiter,

Style[“Kondisi Awal”, “Subsection”, Bold, 12,

Darker[Black,.1],”Label”],

{{init1,Pi/2,”green angle(θ1)

“},-Pi/2, Pi/2, Appearance->”Labeled”, ImageSize->Tiny},

{{init2,0,”blue angle(θ2)

“},-Pi/2, Pi/2, Appearance->”Labeled”, ImageSize->Tiny},

{{init3,0,”red angle(θ3)

“},-Pi/2, Pi/2, Appearance->”Labeled”, ImageSize->Tiny},

{{initprime1,0,”green velocity(ω1)”},0,5,ImageSize

->Tiny,Appearance->”Labeled”},

{{initprime2,0,”blue velocity(ω2)”},0,5,ImageSize

->Tiny,Appearance->”Labeled”},

{{initprime3,0,”red velocity(ω3)”},0,5,ImageSize

(14)

m3”, y2y3->” Simpangan y m2 dan m3”,θ1θ2->”Sensitivitas Kondisi

Awal θ1 dan θ2”, θ2θ3->”Sensitivitas Kondisi Awal θ2 dan

θ3”,x1y1->”x1 vs. y1”, x2y2->”x2 vs. y2”, x3y3->”x3 vs. y3”,θθ->”θ1

vs. θ2”, θϕ->”θ2 vs. θ3”, θθprime1->” 𝜃̇1 vs θ1”, θθprime2->” 𝜃̇2 vs

θ2”, θθprime3->” 𝜃̇3 vs θ3”},

(15)

1

1

2

3

1

1

1

1

1

1

1

1

1

2

2

3

3

1

1

2

3

1

2

1

2

3

1 cos θ1

2cos θ2

3

1

2

(16)

𝑑

(17)

1

12

1

2

12

1

3

12

1

2

1

2

2

1

2

1

1

2

3

1

1

2

3

2

1

2

2

3

3

1

3

3

2

3

2

22

1

2

3

3

32

1

3

1

2

3

1

(18)

2

2

3

1

1

2

1

2

3

2

2

3

3

2

3

3

2

3

1

12

1

2

3

3

32

2

3

2

3

2

3

3

1

1

3

1

3

2

2

3

2

3

3

3

3

1

12

1

(19)

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1vs. 1

1vs. 1

1vs. 1

(20)

1

2

3

1

2

3

1

2

3

1

2

3

1vs. 1

1vs. 1

1vs. 1

(21)

1

2

3

1

2

3

1

2

3

1

2

3

1vs. 1

1vs. 1

1vs. 1

(22)

1

2

3

1

2

3

1

2

3

1

2

3

2

3

1

1

2

3

1vs. 1

1vs. 1

1vs. 1

(23)

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1vs. 1

1vs. 1

1vs. 1

1vs. 1

(24)

1

2

3

1

2

3

1

2

3

1

3

1

2

2

3

1

2

3

1

2

1

3

2

3

1vs. 1

1vs. 1

(25)

3

2

3

3

2

3

3

2

3

3

2

3

3

2

3

3vs. 3

3vs. 3

3vs. 3

3vs. 3

(26)

3

2

3

3

2

3

3

2

3

3

2

3

3

2

3

3vs. 3

3vs. 3

3vs. 3

3vs. 3

(27)

2

3

1

2

3

1

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1vs. 1

1vs. 1

1vs. 1

1vs. 1

(28)

1

3

1

2

3

1

2

2

3

2

2

3

2

2

3

2

2

3

2

2

3

2vs. 2

2vs. 2

2vs. 2

2vs. 2

(29)

1

2

1

2

3

1

3

2

3

3

2

3

3

2

3

3

2

3

3

2

3

3vs. 3

3vs. 3

3vs. 3

3vs. 3

(30)

3

2

3

3

2

3

3

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

3vs. 3

3vs. 3

3vs. 3

1vs. 1

(31)

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1

2

3

1vs. 1

1vs. 1

Memperbarui...