# Plotting “Findroot” solution with very complex variables?

Posted 4 months ago
693 Views
|
|
0 Total Likes
|
 I ran into an extremely complex "zero problem" and don't know how to solve and plot it. Can anyone help with this, please? [Pi]s and [Pi]r are objective functions, pd, po, qd, qo, and Phi (0<[Phi]<1) are variables. pd, po, qd, qo are determined to maximize [Pi]s and [Phi] is determined to maximize [Pi]r. This problem needs to be addressed by backward induction. First, I need to solve pd and po. Then I intend to solve qd and qo (with some constraints), but the results are so much complicated and thus I use "Reduce" afterward to select solutions. Last, [Phi] can be obtained by using the above solutions pd, po, qd, and qo. I want to Plot [Phi] when the parameter c is within a certain range, say 0 qd > 0 && 0 < c < pd - 1/2 (qd*qd) && 1 - (pd - po)/(qd - qo) > 0 && pd/qd - po/qo < 0 && 0 < \[Phi] < 1, \[Phi]\[Element]Reals Step 1 FullSimplify[Solve[{D[\[Pi]s, po] == 0, D[\[Pi]s, pd] == 0}, {po, pd}]] which gives po -> (qo (2 qo (2 + qo) (-1 + \[Phi]) + qd (-4 + qo (-2 + \[Phi])) (-1 + \[Phi]) + 2 c \[Phi] + qd^2 \[Phi]))/(2 qd (-2 + \[Phi])^2 + 8 qo (-1 + \[Phi])), pd -> (-2 c qd (-2 + \[Phi]) - qd^3 (-2 + \[Phi]) + 4 c qo (-1 + \[Phi]) + 2 qd^2 (-1 + \[Phi]) (-2 + qo + \[Phi]) + qd qo (-1 + \[Phi]) (4 + (-2 + qo) \[Phi]))/(2 qd (-2 + \[Phi])^2 + 8 qo (-1 + \[Phi])) Step 2 Solve[{D[\[Pi]s, qo] == 0, D[\[Pi]s, qd] == 0}, {qo, qd}] (*very complex*) Step 3 Reduce[qo > qd > 0 && 0 < c < pd - 1/2 (qd*qd) && 1 - (pd - po)/(qd - qo) > 0 && pd/qd - po/qo < 0 && 0 < \[Phi] < 1, \[Phi], Reals] (*also complex*) Step 4 g[c_?NumericQ] = \[Phi] /. FindRoot[D[\[Pi]r, \[Phi]] == 0, {\[Phi], 0, 0, 1}]; Assuming[\[Phi] \[Element] Reals, Plot[{g[c]}, {c, 0, 0.1}]] ` Answer Answer