I'm a newbie in Mathematica. I'm trying to solve for two functions (best-response functions in a simple game), and then to plot the functions on the same graph. One function is p1 = resp1(p2) and the other is p2 = resp2(p1). I'd like to plot them both such that p1 is the x-axis and p2 is on the y-axis. The goal is that I'd like to be able to alter the form of q1 and q2 and easily see how the shape of the best-responses functions change and how many equilibria exist (the intersections of the best responses).
q1 = A - a*p1 + c*CDF[GammaDistribution[α, β], p2];
q2 = B - b*p2 + c*CDF[GammaDistribution[α, β], p1];
r1 = (p1 - mc)*q1;
r2 = (p2 - mc)*q2;
BR1t = FullSimplify[Solve[ D[r1, p1] == 0, p1, Reals],Assumptions -> {p2 > 0, p1 > 0}];
BR2t = FullSimplify[Solve[ D[r2, p2] == 0, p2, Reals],Assumptions -> {p1 > 0, p2 > 0}];
A = 100; B = 100; a = 1; b = 1; c = 30; mc = 1;
α= 4; β = 2;
resp1 = p1 /. First[BR1t]
resp2 = p2 /. First[BR2t]
g1 = Plot[resp1, {p2, 1, 100}]
g2 = Plot[resp2, {p1, 1, 100}]
I'm not sure what comes next in terms of creating the single plot.... any help would be appreciated.
Thank you.
ParametricPlot[]
? $\endgroup$Plot[resp2 /. p1 -> resp1, {p1, 0, 10}]
? $\endgroup$