I realized I made a terrible mistake from the very beginning. The variable replacement in Plot does work, but the easiest solution is to establish all variables to be used in Manipulate in the defined function; i.e.
Eqn1 = D[f[t], {t, 2}] + [Omega]^2*f[t] == 0;
IC1 = f[0] == [Alpha];
IC2 = (D[f[t], {t, 1}] == [Gamma]) /. { t -> 0 };
Sol2 = Simplify[ DSolve[{Eqn1, IC1, IC2}, f[t], t] ];
x[[Alpha], [Gamma], [Omega], t] = Replace[ f[t], Sol2 ];
With this, Plot within the Manipulate command will run:
Manipulate[
Plot[
{
x[\[Alpha], \[Gamma], \[Omega], t]
},
{ t, 0, 10 }
(* Plot *)],
{{[Alpha], -10, Style["[Alpha]", 16, FontFamily -> "Times"]}, -10,
10, 0.01, ImageSize -> Medium, Appearance -> "Labeled"},
{{[Gamma], 0, Style["[Gamma]", 16, FontFamily -> "Times"]}, -10,
10, 0.01, ImageSize -> Medium, Appearance -> "Labeled"},
{{[Omega], 1.0,
Style["[Omega] [rad. \!(*SuperscriptBox[(s), (-1)])]", 16,
FontFamily -> "Times"]}, 0, 10, 0.01, ImageSize -> Medium,
Appearance -> "Labeled"},
ControlPlacement -> Left,
SaveDefinitions -> False,
TrackedSymbols :> {[Alpha], [Gamma], [Omega]}
(* Manipulate *)]
However, this output { x[[Alpha], [Gamma], [Omega], t] = Replace[ f[t], Sol2 ]; } does not work in Graphics[]. See below.
Manipulate[
Graphics[{
{
RGBColor[0, 0, 0.75],
EdgeForm[
Directive[AbsoluteThickness[2.5], Dashed,
RGBColor[0, 0, 0]]],
Rectangle[ { (x[\[Alpha], \[Gamma], \[Omega], time]) + 5 ,
0 }, { (x[\[Alpha], \[Gamma], \[Omega], time]) - 5 , 10 } ]
}
(* Graphics *) }],
{{[Alpha], -10, Style["[Alpha]", 16, FontFamily -> "Times"]}, -10,
10, 0.01, ImageSize -> Medium, Appearance -> "Labeled"},
{{[Gamma], 0, Style["[Gamma]", 16, FontFamily -> "Times"]}, -10,
10, 0.01, ImageSize -> Medium, Appearance -> "Labeled"},
{{[Omega], 1.0,
Style["[Omega] [rad. \!(*SuperscriptBox[(s), (-1)])]", 16,
FontFamily -> "Times"]}, 0, 10, 0.01, ImageSize -> Medium,
Appearance -> "Labeled"},
{{time, 10^-20,
Style["time", 16, FontFamily -> "Times"]}, 10^-20, 120,
ControlType -> Trigger, DefaultDuration -> 120.0,
DisplayAllSteps -> True, AnimationRate -> 1.0, ImageSize -> Medium,
Appearance -> "Labeled"},
ControlPlacement -> Left,
SaveDefinitions -> False,
TrackedSymbols :> {[Alpha], [Gamma], [Omega], time}
(* Manipulate *)]
Does anyone have a recommendation for getting the function to work in Manipulate [ Graphics[....] ] ??? It doesn't make sense that defining the function from the output doesn't work, but defining the function explicitly does allow it to run in Graphics. See below.
Manipulate[
Graphics[{
{
RGBColor[0, 0, 0.75],
EdgeForm[
Directive[AbsoluteThickness[2.5], Dashed,
RGBColor[0, 0, 0]]],
Rectangle[ { ( \[Alpha] Cos[time \[Omega]] + (\[Gamma] Sin[time \[Omega]])/\[Omega] ) + 5 ,
0 }, { ( \[Alpha] Cos[time \[Omega]] + (\[Gamma] Sin[time \[Omega]])/\[Omega] ) - 5 , 10 } ]
}
(* Graphics *) }],
{{[Alpha], -10, Style["[Alpha]", 16, FontFamily -> "Times"]}, -10,
10, 0.01, ImageSize -> Medium, Appearance -> "Labeled"},
{{[Gamma], 0, Style["[Gamma]", 16, FontFamily -> "Times"]}, -10,
10, 0.01, ImageSize -> Medium, Appearance -> "Labeled"},
{{[Omega], 1.0,
Style["[Omega] [rad. \!(*SuperscriptBox[(s), (-1)])]", 16,
FontFamily -> "Times"]}, 0, 10, 0.01, ImageSize -> Medium,
Appearance -> "Labeled"},
{{time, 10^-20,
Style["time", 16, FontFamily -> "Times"]}, 10^-20, 120,
ControlType -> Trigger, DefaultDuration -> 120.0,
DisplayAllSteps -> True, AnimationRate -> 1.0, ImageSize -> Medium,
Appearance -> "Labeled"},
ControlPlacement -> Left,
SaveDefinitions -> False,
TrackedSymbols :> {[Alpha], [Gamma], [Omega], time}
(* Manipulate *)]