# Solving a system of non-linear equations with symbolic parameters

I'm in the middle of preparing my master thesis, where I need to find a closed form or a numerical solution for the system below.

Solve[] and NSolve could not do anything. In a paper in the literature [Reference?], there is an iterative approach for solving a system similar to ours, but I'm really stuck and need help finding a solution:

    γ (1 - Subscript[ρ,
mo]) (Subscript[b, sp] Subscript[q, sp] - 0.5 Subscript[a, sp]
\!$$\*SubsuperscriptBox[\(q$$, $$sp$$, $$2$$]\) -
Subscript[w,
s] (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
mi] (-1 + Subscript[ρ, so]) -
Subscript[c, so] Subscript[ρ, so] - Subscript[d, so]
\!$$\*SubsuperscriptBox[\(ρ$$, $$so$$, $$2$$]\) +
Subscript[p,
s] (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so])) (Subscript[α, sp] Subscript[ρ,
mi] (1 - 2 Subscript[ρ, so]) +
Subscript[α, sp] Subscript[ρ, so] +
Subscript[q, mp] Subscript[α, mp] Subscript[α,
sp] (-1 +
2 Subscript[ρ, mi] Subscript[ρ, so])) + (Subscript[b,
sp] - 1. Subscript[a, sp] Subscript[q, sp] -
Subscript[w, s] Subscript[α, sp] Subscript[ρ,
mi] (-1 + Subscript[ρ, so]) +
Subscript[p, s] Subscript[α, sp] Subscript[ρ,
so]) (α - Subscript[βp,
m] + γ (1 - Subscript[ρ,
mo]) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so] + Subscript[ρ,
mi] (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ,
so]) + Subscript[q, mp] Subscript[q, sp] Subscript[α,
mp] Subscript[α,
sp] (-1 + 2 Subscript[ρ, mi] Subscript[ρ, so])))
Subscript[π, sr] = γ (-1 + Subscript[ρ, mi] +
Subscript[q, sp] Subscript[α,
sp] (1 +
2 (-1 + Subscript[q, mp] Subscript[α,
mp]) Subscript[ρ, mi])) (1 - Subscript[ρ,
mo]) (Subscript[b, sp] Subscript[q, sp] - 0.5 Subscript[a, sp]
\!$$\*SubsuperscriptBox[\(q$$, $$sp$$, $$2$$]\) -
Subscript[w,
s] (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
mi] (-1 + Subscript[ρ, so]) -
Subscript[c, so] Subscript[ρ, so] - Subscript[d, so]
\!$$\*SubsuperscriptBox[\(ρ$$, $$so$$, $$2$$]\) +
Subscript[p,
s] (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so])) + (-Subscript[c,
so] + (-1 +
Subscript[q, sp] Subscript[α, sp]) (Subscript[p, s] -
Subscript[w, s] Subscript[ρ, mi]) -
2 Subscript[d, so] Subscript[ρ, so]) (α -
Subscript[βp,
m] + γ (1 - Subscript[ρ,
mo]) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so] + Subscript[ρ,
mi] (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ,
so]) + Subscript[q, mp] Subscript[q, sp]
Subscript[α, mp] Subscript[α,
sp] (-1 + 2 Subscript[ρ, mi] Subscript[ρ, so])))
Subscript[π, mri] = γ (1 - Subscript[ρ, mo]) (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ, so] +
2 Subscript[q, mp] Subscript[q, sp] Subscript[α, mp]
Subscript[α, sp] Subscript[ρ, so]) (Subscript[q,
mp] Subscript[q, sp] Subscript[α, mp] Subscript[α,
sp] (-Subscript[w, m] (-1 + Subscript[ρ, mo]) +
Subscript[p, m] Subscript[ρ, mo]) + (Subscript[b, mp]
Subscript[q, mp] - 0.5 Subscript[a, mp]
\!$$\*SubsuperscriptBox[\(q$$, $$mp$$, $$2$$]\) + (Subscript[p, m] -
Subscript[w, m]) (1 - Subscript[ρ, mo]) -
Subscript[c, mo] Subscript[ρ, mo] - Subscript[d, mo]
\!$$\*SubsuperscriptBox[\(ρ$$, $$mo$$, $$2$$]\)) (Subscript[q,
sp] Subscript[α,
sp] + (1 - Subscript[ρ, mi]) (1 - Subscript[ρ,
so])) +
Subscript[w,
s] (1 - Subscript[q, sp] Subscript[α,
sp]) Subscript[ρ,
mi] (1 - Subscript[ρ, so]) - (Subscript[p, s] +
Subscript[c, mi] Subscript[ρ, mi] + Subscript[d, mi]
\!$$\*SubsuperscriptBox[\(ρ$$, $$mi$$, $$2$$]\)) (1 - (1 -
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so])) + (Subscript[w,
s] (1 - Subscript[q, sp] Subscript[α, sp]) (1 -
Subscript[ρ, so]) + (Subscript[b, mp] Subscript[q, mp] -
0.5 Subscript[a, mp]
\!$$\*SubsuperscriptBox[\(q$$, $$mp$$, $$2$$]\) + (Subscript[p, m] -
Subscript[w, m]) (1 - Subscript[ρ, mo]) -
Subscript[c, mo] Subscript[ρ, mo] - Subscript[d, mo]
\!$$\*SubsuperscriptBox[\(ρ$$, $$mo$$, $$2$$]\)) (-1 +
Subscript[ρ, so]) - (Subscript[c, mi] +
2 Subscript[d, mi] Subscript[ρ,
mi]) (1 - (1 -
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so])) (α - Subscript[βp,
m] + γ (1 - Subscript[ρ,
mo]) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so] +
Subscript[ρ,
mi] (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ,
so]) + Subscript[q, mp] Subscript[q, sp]
Subscript[α, mp] Subscript[α,
sp] (-1 + 2 Subscript[ρ, mi] Subscript[ρ, so])))
Subscript[π, mp] = (Subscript[q, mp] Subscript[q, sp]
Subscript[α, mp] Subscript[α, sp]
Subscript[ρ,
mo] + (1 - Subscript[ρ,
mo]) (Subscript[q, sp] Subscript[α,
sp] + (-1 + Subscript[ρ, mi]) (-1 + Subscript[ρ,
so]))) (α - Subscript[βp,
m] + γ (1 - Subscript[ρ,
mo]) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so] + Subscript[ρ,
mi] (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ,
so]) + Subscript[q, mp] Subscript[q, sp] Subscript[α,
mp] Subscript[α,
sp] (-1 + 2 Subscript[ρ, mi] Subscript[ρ, so])))
Subscript[π, mq] = γ Subscript[q, sp] Subscript[α,
mp] Subscript[α,
sp] (1 - Subscript[ρ, mo]) (-1 +
2 Subscript[ρ, mi] Subscript[ρ, so]) (Subscript[q, mp]
Subscript[q, sp] Subscript[α, mp] Subscript[α,
sp] (-Subscript[w, m] (-1 + Subscript[ρ, mo]) +
Subscript[p, m] Subscript[ρ, mo]) + (Subscript[q,
mp] (Subscript[b, mp] -
0.5 Subscript[a, mp] Subscript[q, mp]) -
Subscript[p, m] (-1 + Subscript[ρ, mo]) +
Subscript[w, m] (-1 + Subscript[ρ, mo]) -
Subscript[ρ,
mo] (Subscript[c, mo] +
Subscript[d, mo] Subscript[ρ, mo])) (Subscript[q, sp]
Subscript[α,
sp] + (-1 + Subscript[ρ, mi]) (-1 + Subscript[ρ,
so])) +
Subscript[w,
s] (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
mi] (-1 + Subscript[ρ, so]) - (Subscript[p, s] +
Subscript[ρ,
mi] (Subscript[c, mi] +
Subscript[d, mi] Subscript[ρ, mi])) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so])) + (Subscript[q, sp] Subscript[α, mp]
Subscript[α,
sp] (-Subscript[w, m] (-1 + Subscript[ρ, mo]) +
Subscript[p, m] Subscript[ρ, mo]) + (Subscript[b, mp] -
1. Subscript[a, mp] Subscript[q, mp]) (Subscript[q, sp]
Subscript[α,
sp] + (-1 + Subscript[ρ, mi]) (-1 + Subscript[ρ,
so]))) (α - Subscript[βp,
m] + γ (1 - Subscript[ρ,
mo]) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so] + Subscript[ρ,
mi] (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ,
so]) + Subscript[q, mp] Subscript[q, sp]
Subscript[α, mp] Subscript[α,
sp] (-1 + 2 Subscript[ρ, mi] Subscript[ρ, so])))
Subscript[π, mro] = -γ (Subscript[q, mp] Subscript[q, sp]
Subscript[α, mp] Subscript[α,
sp] (-Subscript[w, m] (-1 + Subscript[ρ, mo]) +
Subscript[p, m] Subscript[ρ, mo]) + (Subscript[q,
mp] (Subscript[b, mp] -
0.5 Subscript[a, mp] Subscript[q, mp]) -
Subscript[p, m] (-1 + Subscript[ρ, mo]) +
Subscript[w, m] (-1 + Subscript[ρ, mo]) -
Subscript[ρ,
mo] (Subscript[c, mo] +
Subscript[d, mo] Subscript[ρ, mo])) (Subscript[q, sp]
Subscript[α,
sp] + (-1 + Subscript[ρ, mi]) (-1 + Subscript[ρ,
so])) +
Subscript[w,
s] (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
mi] (-1 + Subscript[ρ, so]) - (Subscript[p, s] +
Subscript[ρ,
mi] (Subscript[c, mi] +
Subscript[d, mi] Subscript[ρ, mi])) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so])) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so] +
Subscript[ρ,
mi] (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ, so]) +
Subscript[q, mp] Subscript[q, sp] Subscript[α, mp]
Subscript[α,
sp] (-1 +
2 Subscript[ρ, mi] Subscript[ρ, so])) + (Subscript[
q, mp] Subscript[q,
sp] (Subscript[p, m] - Subscript[w, m]) Subscript[α, mp]
Subscript[α,
sp] + (-Subscript[c, mo] - Subscript[p, m] + Subscript[w, m] -
2 Subscript[d, mo] Subscript[ρ, mo]) (Subscript[q, sp]
Subscript[α,
sp] + (-1 + Subscript[ρ, mi]) (-1 + Subscript[ρ,
so]))) (α - Subscript[βp,
m] + γ (1 - Subscript[ρ,
mo]) (1 + (-1 +
Subscript[q, sp] Subscript[α, sp]) Subscript[ρ,
so] + Subscript[ρ,
mi] (-1 +
Subscript[q, sp] Subscript[α,
sp] (1 - 2 Subscript[ρ, so]) + Subscript[ρ,
so]) + Subscript[q, mp] Subscript[q, sp]
Subscript[α, mp] Subscript[α,
sp] (-1 + 2 Subscript[ρ, mi] Subscript[ρ, so])))

Solve[Subscript[π, mro] == 0 && Subscript[π, mq] == 0 &&
Subscript[π, mp] == 0 && Subscript[π, mri] == 0 &&
Subscript[π, sr] == 0 &&
Subscript[π, sq] == 0, {Subscript[ρ, mi], Subscript[ρ,
mo], Subscript[ρ, so], Subscript[p, m], Subscript[q, sp],
Subscript[q, mp]}]

• Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Oct 4 '15 at 9:06
• Can you reduce your question to a minimal example and clarify your question? – user9660 Oct 4 '15 at 9:08
• sorry,, i know it was a little bit confusing,,, – h aaa Oct 4 '15 at 9:14
• now, i've got two problem,,, 1. don't know how to copy my expressions from mathematica and paste them here so that you can clearly see what are my 6 equations. – h aaa Oct 4 '15 at 9:15
• and 2nd. how to solve this system of non linear equations. – h aaa Oct 4 '15 at 9:16

This is not an answer but rather an extensive editing of your question.

In addition to being a poor idea to use π as a variable, it is a really bad idea to use variables with subscripts as symbols as inputs to functions. This can wreak havoc and is best avoided.

What I did was to replace all occurrences of a symbol followed by subscripts with the symbol followed by the upper case subscript. So for example Subscript[z, mro] became zMRO.

I used the variable z in place of π.

The first portion of your large expression is missing an assignment. I guessed based upon your solve expression that you intended it to be zSQ.

What you can do is:

1. Validate the edit.
2. Rework your question by cutting and pasting portions of this edit after you have validated that it matches your intended equations.
3. Supply typical values for the symbols that you are not using in the Solve, for example: aSP, βpM, etc. These are needed in order to attempt to use NSolve and also to set the domain and or constraints for Solve.
4. You can and should set constraints and the domain for variables in Solve. Below is a fake example:

Solve[eqns && sM > 0, {pM, qSP}, Reals]

With this (rather large) preamble, below is the edit for you to validate.

zSR

zSR = γ (-1 + ρMI +
qSP αSP (1 +
2 (-1 + qMP αMP) ρMI)) (1 - ρMO) (bSP qSP -
0.5 aSP qSP^2 -
wS (-1 + qSP αSP) ρMI (-1 + ρSO) - cSO ρSO -
dSO ρSO^2 +
pS (1 + (-1 + qSP αSP) ρSO)) + (-cSO + (-1 +
qSP αSP) (pS - wS ρMI) -
2 dSO ρSO) (α - βpM + γ (1 - ρMO) \
(1 + (-1 + qSP αSP) ρSO + ρMI (-1 +
qSP αSP (1 - 2 ρSO) + ρSO) +
qMP qSP αMP αSP (-1 + 2 ρMI ρSO)))


zMRI

zMRI = γ (1 - ρMO) (-1 +
qSP αSP (1 - 2 ρSO) + ρSO +
2 qMP qSP αMP αSP ρSO) (qMP qSP αMP \
αSP (-wM (-1 + ρMO) + pM ρMO) + (bMP qMP -
0.5 aMP qMP^2 + (pM - wM) (1 - ρMO) - cMO ρMO -
dMO ρMO^2) (qSP αSP + (1 - ρMI) (1 - \
ρSO)) +
wS (1 - qSP αSP) ρMI (1 - ρSO) - (pS +
cMI ρMI +
dMI ρMI^2) (1 - (1 - qSP αSP) ρSO)) + (wS (1 -
qSP αSP) (1 - ρSO) + (bMP qMP -
0.5 aMP qMP^2 + (pM - wM) (1 - ρMO) - cMO ρMO -
dMO ρMO^2) (-1 + ρSO) - (cMI +
2 dMI ρMI) (1 - (1 -
qSP αSP) ρSO)) (α - βpM + γ \
(1 - ρMO) (1 + (-1 + qSP αSP) ρSO + ρMI (-1 +
qSP αSP (1 - 2 ρSO) + ρSO) +
qMP qSP αMP αSP (-1 + 2 ρMI ρSO)))


zMP

zMP = (qMP qSP αMP αSP ρMO + (1 - ρMO) (qSP \
αSP + (-1 + ρMI) (-1 + ρSO))) (α - βpM \
+ γ (1 - ρMO) (1 + (-1 +
qSP αSP) ρSO + ρMI (-1 +
qSP αSP (1 - 2 ρSO) + ρSO) +
qMP qSP αMP αSP (-1 + 2 ρMI ρSO)))


zMQ

zMQ = qSP αMP αSP γ (1 - ρMO) (-1 +
2 ρMI ρSO) (qMP qSP αMP αSP (-wM (-1 + \
ρMO) + pM ρMO) + (qMP (bMP - 0.5 aMP qMP) -
pM (-1 + ρMO) +
wM (-1 + ρMO) - ρMO (cMO +
dMO ρMO)) (qSP αSP + (-1 + ρMI) (-1 + \
ρSO)) +
wS (-1 +
qSP αSP) ρMI (-1 + ρSO) - (pS + ρMI (cMI \
+ dMI ρMI)) (1 + (-1 +
qSP αSP) ρSO)) + (qSP αMP αSP \
(-wM (-1 + ρMO) + pM ρMO) + (bMP -
1. aMP qMP) (qSP αSP + (-1 + ρMI) (-1 + \
ρSO))) (α - βpM + γ (1 - ρMO) (1 + (-1 +
qSP αSP) ρSO + ρMI (-1 +
qSP αSP (1 - 2 ρSO) + ρSO) +
qMP qSP αMP αSP (-1 + 2 ρMI ρSO)))


zMRO

zMRO = -γ (qMP qSP αMP αSP (-wM (-1 + ρMO) +
pM ρMO) + (qMP (bMP - 0.5 aMP qMP) - pM (-1 + ρMO) +
wM (-1 + ρMO) - ρMO (cMO +
dMO ρMO)) (qSP αSP + (-1 + ρMI) (-1 + \
ρSO)) +
wS (-1 +
qSP αSP) ρMI (-1 + ρSO) - (pS + ρMI (cMI \
+ dMI ρMI)) (1 + (-1 + qSP αSP) ρSO)) (1 + (-1 +
qSP αSP) ρSO + ρMI (-1 +
qSP αSP (1 - 2 ρSO) + ρSO) +
qMP qSP αMP αSP (-1 +
2 ρMI ρSO)) + (qMP qSP (pM -
wM) αMP αSP + (-cMO - pM + wM -
2 dMO ρMO) (qSP αSP + (-1 + ρMI) (-1 + \
ρSO))) (α - βpM + γ (1 - ρMO) (1 + (-1 +
qSP αSP) ρSO + ρMI (-1 +
qSP αSP (1 - 2 ρSO) + ρSO) +
qMP qSP αMP αSP (-1 + 2 ρMI ρSO)))


zSQ

Remember, I am guessing that you intended the first part of your large expression to represent zSQ.

zSQ = γ (1 - ρMO) (bSP qSP - 0.5 aSP qSP^2 -
wS (-1 + qSP αSP) ρMI (-1 + ρSO) - cSO ρSO -
dSO ρSO^2 +
pS (1 + (-1 +
qSP αSP) ρSO)) (αSP ρMI (1 -
2 ρSO) + αSP ρSO +
qMP αMP αSP (-1 + 2 ρMI ρSO)) + (bSP -
1. aSP qSP - wS αSP ρMI (-1 + ρSO) +
pS αSP ρSO) (α - βpM + γ (1 - \
ρMO) (1 + (-1 + qSP αSP) ρSO + ρMI (-1 +
qSP αSP (1 - 2 ρSO) + ρSO) +
qMP qSP αMP αSP (-1 + 2 ρMI ρSO)))


Solve

Finally below is your Solve expression

Solve[zMRO == 0 && zMQ == 0 && zMP == 0 && zMRI == 0 && zSR == 0 &&
zSQ == 0, {ρMI, ρMO, ρSO, pM, qSP, qMP}]

• I really appreciate your time and effort to help me. THE ABOVE EXPRESSIONS YOU MENTIONED ARE EXACTLY MINE. and about the first part of my expression, yes, i meant zSQ . – h aaa Oct 9 '15 at 15:24
• All of the parameters are between (equal) 0 and 1. – h aaa Oct 9 '15 at 15:56
• And variables, all of them except "pM" have the same constraint as "parameters" which means they are between (equal) 0 and 1. – h aaa Oct 9 '15 at 15:59
• "pM" which refers to "Manufacturer's Price" must be greater than 0. – h aaa Oct 9 '15 at 16:00
• I understand that if i give values to parameters and define ranges for variables, i can use "Solve" and find a "numerical" answer for my system of n.l equations. BUT in the original paper, "a note on "Quality investment and inspection policy in a supplier manufacturer supply chain" which has a 5 / 5 system of non.linear equation similar to mine, an "Iterative approach" is proposed in order to find a closed form solution. CAN YOU TELL ME HOW CAN I WRITE SUCH "ITERATIVE APPROACH" IN MATHEMATICA IN ORDER TO SOLVE MY 6/6 SYSTEM OF N.L EQUATIONS? – h aaa Oct 9 '15 at 16:08