3
$\begingroup$

I'm not sure if this is possible at all or whether manipulate is the best option to plot this, but currently I'm using the following code to plot Function Func vs. t values for different x values.

Manipulate[a = -0.5;
b = 0.2;
c = 1;
Func[t_] := a/t^2*(t - x)^2 + b/t*(t - x) + c;
Plot[Func[t], {t, 1, 100}], {x, 1, 100, 1}]

What I'm really interested in is to plot Func vs. t-x (EDIT: t-x = t minus x being a new variable for plotting purpose only.) and then for different values of x. I can't find a way to make this plot. I would appreciate any suggestion.

$\endgroup$
2
$\begingroup$

Perhaps

Manipulate[ParametricPlot[{t-x, a/t^2*(t - x)^2 + b/t*(t - x) + c}, {t, 1, 100},
  AspectRatio -> 1, Frame -> True, PlotRange -> {{-100, 100}, {-5, 20}},
  FrameLabel -> {"t-x", "Func"}],
 {x, 1, 100, 1}, Delimiter, {a, 0, 10}, {b, 0, 10}, {c, 0, 10}]

enter image description here

or,

Manipulate[Plot[a/(w + x)^2*(w)^2 + b/(w + x)*(w) + c, {w, -100,  100},
  AspectRatio -> 1, Frame -> True, PlotRange -> {{-100, 100}, {-5, 100}},
  FrameLabel -> {"t-x", "Func"}],
 {x, 1, 100, 1}, Delimiter, {a, 0, 10}, {b, 0, 10}, {c, 0, 10}]

enter image description here

$\endgroup$
  • $\begingroup$ thanks. This is exactly what I was looking for. $\endgroup$ – Yasmin Nov 9 '14 at 0:14
  • $\begingroup$ @Yasmin, my pleasure. Welcome to mma.se.. $\endgroup$ – kglr Nov 9 '14 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.