# Limiting solution space for symbolic algebra problems

I have a system of 12 quadratic equations with 12 variables (x11, x12, x21, x22, x23, x33, p1, p2, p3, ϕ, μ, τ) and several positive constants,w, q1, q2. ... > 0. I need to find the solutions ofx11in terms of the constants, but I'm only interested in the solutions wherep1,p2andp3 are positive.

The only way I could think of doing so is to solve for the positive p1, then find the values of p2 and p3 for each of the solutions and eliminate the solutions that allow for negative values. Then find the values of x1 for the remaining solutions. That is, something like:

eqn =
{w ==  p1*x11 + p2*x12,
w ==  p1*x21 + p2*x22 + p3*x23,
w == p3*x33 ,
1 == x11 + x21, 1 == x12 + x22,
0 == x23 + x33,
0 == q1 - γ/2 (2 x11*σ1^2 + 2 x12*σ12) - ϕ p1,
0 == q2 - γ/2 (2 x12*σ2^2 + 2 x11* σ12) - ϕ *p2,
0 == q1 - γ/2 (2 x21*σ1^2 + 2 x22* σ12 + 2 x23 σ13) - μ*p1,
0 == q2 - γ/2 (2 x22*σ2^2 + 2 x21*σ12 + 2 x23 *σ23) - μ*p2,
0 == q3 - γ/2 (2 x23*σ3^2 + 2 x22 σ23 + 2 x21*σ13) - μ*p3,
0 == q3 - γ/2 (2 x33*σ3^2) - τ*p3}

conditions =
{w > 0, q1 > 0, q2 > 0, q3 > 0,
σ1 > 0, σ2 > 0, σ3 > 0, σ12 > 0, σ13 > 0, σ23 > 0, γ > 0}

eqs = Flatten[AppendTo[eqs, conditions]]

presolve = Eliminate[eq2,{x11, x12, x21, x22, x33, p2, p3, τ, ϕ, μ}]

presolve = Flatten[AppendTo[presolve , {p1>0}]]
solutionsp1 = Solve[presolve, p1, Reals]
solutionsp2 = {}


And then for each element i in solutionsp1:

presolve = eqs
presolve = Flatten[AppendTo[presolve, {solutions[[i]], p2>0}]]
AppendTo[solutionsp2, Solve[presolve, {p2}, Reals]]


and then to repeat the same with p3.

Now, this seems a very inefficient way to do this. Is there any better way to identify the relevant solutions?

• Could you provide your equations? – Carl Woll Jun 12 '19 at 21:59
• I edited the question to specify the exact equations and conditions. – AVL Jun 12 '19 at 22:14
• One can obtain a polynomial in x11` and those parameters. It will have (possibly complex-valued) solutions independent to the values of the parameters. Is the goal to understand what regions in the parameter space give rise to real solutions? – Daniel Lichtblau Jun 12 '19 at 23:04
• The purpose is to find the value pairs of x11 and x12 in term of the constants (but only those solutions that are in the parameter space I describe) and then find the parameter space for which D({x11-x12},[Sigma]13) > 0 – AVL Jun 12 '19 at 23:16
• The solutions are not in any parameter space. Their values vary with the parameters, but that isn't the same thing. Also it seems the question is changing somewhat since now it involves a second variable. – Daniel Lichtblau Jun 12 '19 at 23:39