# How to represent an equation with multiple parameters on dynamic graph in mathematica?

I work on this equation:

E=x(X)*y(Y)*z(Z)((1-a)*r+a(r-S))

Where a is probability [0, 1], r the anticipated wealth and S a monetary sanction and where x(X), y(Y), z (Z) are decreasing in X, Y, Z and takes values from 0 to 1. Large values of X, Y, Z produce values of x(X), y(Y), z (Z) close to zero and hence reduce the expected utility to nothing. On the other hand, result in values of x(X), y(Y), z (Z) close to one and so hardly affect expected utility.

suppose x(X), y(Y), z (Z) are all egal to 0 so E=0 even if I supppose r=100, S=20 and probability is a=0.5. So I want to simulate with other value (random for example) and see result on dynamic graph

Thanks for helping.

• What have you tried? There are many excellent examples of Manipulate in the documentation and on this site. Should get you through. Apr 1, 2017 at 16:53
• I don't know if I must use Manipulate at first to simulate different numerical value of my parameters Apr 1, 2017 at 17:26
• Reading the question it appears that X, Y and Z are functions and a, r and S are numbers. I am not sure if that is correct. You need to at a minimum show the functions and the range (you did this for a) of the other numbers. Maybe show one or two minimal examples. Doubtless you will get some help if you can clarify the question. Apr 1, 2017 at 17:32
• @JackLaVigne : suppose x(X), y(Y), z (Z) takes values from 0 to 1. Suppose are all egal to 0 so E=0 even if I supppose r=100, S=20 and probability is a=0.5. So I want to simulate with other value (random for example) and see result on dynamic graph Apr 1, 2017 at 17:38

With the Manipulate below you can select any value for the abscissa to see how that variable effects the result (Note: this is a bruce force method. I am sure one could make something more elegant).

You can manually change with the slider the values of the other variables as you observe the plot for a particular selection of the abscissa.

 Manipulate[
Labeled[
Switch[
abscissa,
"x",
Plot[x y z ((1 - a) r + a (r - s)), {x, 0, 1},
PlotRange -> {{0, 1}, {0, 100}}],
"y",
Plot[x y z ((1 - a) r + a (r - s)), {y, 0, 1},
PlotRange -> {{0, 1}, {0, 100}}],
"z",
Plot[x y z ((1 - a) r + a (r - s)), {y, 0, 1},
PlotRange -> {{0, 1}, {0, 100}}],
"a",
Plot[x y z ((1 - a) r + a (r - s)), {a, 0, 1},
PlotRange -> {{0, 1}, {0, 100}}],
"r",
Plot[x y z ((1 - a) r + a (r - s)), {r, 50, 100},
PlotRange -> {{50, 100}, {0, 100}}],
"s",
Plot[x y z ((1 - a) r + a (r - s)), {s, 10, 30},
PlotRange -> {{10, 30}, {0, 100}}]
],
{abscissa, "E"}, {Bottom, Left}
],
{{abscissa, "a"}, {"x", "y", "z", "a", "r", "s"},
ControlType -> SetterBar},
{{x, 0.8}, 0, 1, Appearance -> "Labeled"},
{{y, 0.8}, 0, 1, Appearance -> "Labeled"},
{{z, 0.8}, 0, 1, Appearance -> "Labeled"},
{{a, 0.5}, 0, 1, Appearance -> "Labeled"},
{{r, 70}, 50, 100, Appearance -> "Labeled"},
{{s, 20}, 10, 30, Appearance -> "Labeled"}
]


• @JackLaVigneYes I want to see the variation of E. but I want to see as well impact of X Y Z with different value between [0, 1] on E Apr 1, 2017 at 20:02
• ok its good. can add some color effect and filled for each variable and indicate visualy on the graph or next value of E? @JackLaVigne Apr 2, 2017 at 15:26
• @GarudaIkëtum The abscissa label changes when you change a variable. Apr 2, 2017 at 16:05
• yes maybe add some effect (color...) will be good and see numerical final value of E on a case @JackLaVigne Apr 2, 2017 at 16:16