# Mathematica does not solve system of equations

I am trying to solve a system of 7 equations and 7 unknowns given a set of assuptions. I am only interested in obtaining V1 as a function of the exogenous parameters.

I am using the following code:

Solve[V1 == (-24 s + 4 d V2 - 3 d l V2 + 4 d V3 - 3 d l V3 +
6 d l V4 + d l V5 + d l V6 + d l V7 + 12 w1 + 12 w3 + 12 w4)/(
12 - 4 d + 3 d l) &&
V2 == (-24 s + 4 d V1 - 3 d l V1 + 4 d V3 - 3 d l V3 + 6 d l V4 +
d l V5 + d l V6 + d l V7 + 12 w1 + 12 w2 + 12 w4)/(
12 - 4 d + 3 d l) &&
V3 == (-24 s + 4 d V1 - 3 d l V1 + 4 d V2 - 3 d l V2 + 6 d l V4 +
d l V5 + d l V6 + d l V7 + 12 w1 + 12 w2 + 12 w3)/(
12 - 4 d + 3 d l) &&
V4 == (12 s + d l V1 + d l V2 + d l V3 + d l V5 + d l V6 + d l V7)/(
6 (2 - 2 d + d l)) &&
V5 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V6 -
3 d l V6 + 4 d V7 - 3 d l V7 + 12 w2)/(12 - 4 d + 3 d l) &&
V6 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 -
3 d l V5 + 4 d V7 - 3 d l V7 + 12 w3)/(12 - 4 d + 3 d l) &&
V7 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 -
3 d l V5 + 4 d V6 - 3 d l V6 + 12 w4)/(12 - 4 d + 3 d l) &&
w1 > s > w2 > w3 > w4 > b > 0 && w1 + w2 + w3 + w4 == 4 s &&
0 < d < 1 && 0 < l < 1, V1, {V2, V3, V4, V5, V6, V7, s},
MaxExtraConditions -> All]


I solved similar systems using this method. However, Mathematica does not return me anything in this case.

Does anyone know a different way to solve this problem?

• please do not use l as variable name, it looks like 1 and it is confusing. You can choose any other letter besides l Jul 16, 2020 at 10:54
• Solve[V1 == (-24 s + 4 d V2 - 3 d l V2 + 4 d V3 - 3 d l V3 + 6 d l V4 + d l V5 + d l V6 + d l V7 + 12 w1 + 12 w3 + 12 w4)/(12 - 4 d + 3 d l) &&...&&V7 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 - 3 d l V5 + 4 d V6 - 3 d l V6 + 12 w4)/(12 - 4 d + 3 d l) && w1 > s > w2 > w3 > w4 > b > 0 && w1 + w2 + w3 + w4 == 4 s && 0 < d < 1 && 0 < l < 1, {V1, V2, V3, V4, V5, V6, V7}] performs {}. Jul 16, 2020 at 11:17
• @Nasser Ok, thanks for the comment. Jul 16, 2020 at 11:36
• @user64494 It it not working your command. I have the same problem. But thank you for your time. Jul 16, 2020 at 11:37
• @pau1996: V1 == (-24 s + 4 d V2 - 3 d l V2 + 4 d V3 - 3 d l V3 + 6 d l V4 + d l V5 + d l V6 + d l V7 + 12 w1 + 12 w3 + 12 w4)/(12 - 4 d + 3 d l) &&...&&V7 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 - 3 d l V5 + 4 d V6 - 3 d l V6 + 12 w4)/(12 - 4 d + 3 d l) && w1 > s > w2 > w3 > w4 > b > 0 && w1 + w2 + w3 + w4 == 4 s && 0 < d < 1 && 0 < l < 1 means the whole system under consideration. Pay your attention to .... The whole system is too long to be presented in a comment. Jul 16, 2020 at 12:30

Reduce[V1 == (-24 s + 4 d V2 - 3 d l V2 + 4 d V3 - 3 d l V3 +
6 d l V4 + d l V5 + d l V6 + d l V7 + 12 w1 + 12 w3 +
12 w4)/(12 - 4 d + 3 d l) &&
V2 == (-24 s + 4 d V1 - 3 d l V1 + 4 d V3 - 3 d l V3 + 6 d l V4 +
d l V5 + d l V6 + d l V7 + 12 w1 + 12 w2 + 12 w4)/(12 - 4 d +
3 d l) &&
V3 == (-24 s + 4 d V1 - 3 d l V1 + 4 d V2 - 3 d l V2 + 6 d l V4 +
d l V5 + d l V6 + d l V7 + 12 w1 + 12 w2 + 12 w3)/(12 - 4 d +
3 d l) &&
V4 == (12 s + d l V1 + d l V2 + d l V3 + d l V5 + d l V6 +
d l V7)/(6 (2 - 2 d + d l)) &&
V5 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V6 -
3 d l V6 + 4 d V7 - 3 d l V7 + 12 w2)/(12 - 4 d + 3 d l) &&
V6 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 -
3 d l V5 + 4 d V7 - 3 d l V7 + 12 w3)/(12 - 4 d + 3 d l) &&
V7 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 -
3 d l V5 + 4 d V6 - 3 d l V6 + 12 w4)/(12 - 4 d + 3 d l) &&
w1 > s > w2 > w3 > w4 > b > 0 && w1 + w2 + w3 + w4 == 4 s &&
0 < d < 1 && 0 < l < 1, {V1, V2, V3, V4, V5, V6, V7, s}]


0 < d < 1 && 0 < l < 1 && w4 > 0 && w3 > w4 && w2 > w3 && w1 > 3 w2 - w3 - w4 && 0 < b < w4 && V1 == (3 b d l - 6 w1 + 6 d w1 - 3 d l w1 + 6 w2 - 14 d w2 + 8 d^2 w2 + 5 d l w2 - 8 d^2 l w2 - 6 w3 + 10 d w3 - 4 d^2 w3 - 7 d l w3 + 4 d^2 l w3 - 6 w4 + 10 d w4 - 4 d^2 w4 - 7 d l w4 + 4 d^2 l w4)/(-12 + 24 d - 12 d^2 - 12 d l + 12 d^2 l) && V2 == w2 - w3 + Re[V1] && V3 == w2 - w4 + Re[V1] && V4 == (1/( 12 d l - 12 d^2 l + 12 d^2 l^2))(6 b d l - 12 w1 + 12 d w1 - 9 d l w1 + 12 w2 - 12 d w2 + 7 d l w2 - 12 w3 + 12 d w3 - 11 d l w3 - 12 w4 + 12 d w4 - 11 d l w4 + 24 Re[V1] - 32 d Re[V1] + 8 d^2 Re[V1] + 24 d l Re[V1] - 12 d^2 l Re[V1] + 4 d^2 l^2 Re[V1] - 8 d Re[V2] + 8 d^2 Re[V2] + 6 d l Re[V2] - 12 d^2 l Re[V2] + 4 d^2 l^2 Re[V2] - 8 d Re[V3] + 8 d^2 Re[V3] + 6 d l Re[V3] - 12 d^2 l Re[V3] + 4 d^2 l^2 Re[V3]) && V5 == (1/( 6 l))(-6 b l - 12 w1 + 9 l w1 + 12 w2 - 3 l w2 - 12 w3 + 9 l w3 - 12 w4 + 9 l w4 + 24 Re[V1] - 8 d Re[V1] - 18 l Re[V1] + 12 d l Re[V1] - 4 d l^2 Re[V1] - 8 d Re[V2] + 12 d l Re[V2] - 4 d l^2 Re[V2] - 8 d Re[V3] + 12 d l Re[V3] - 4 d l^2 Re[V3] - 12 d l Re[V4] + 12 d l^2 Re[V4]) && V6 == -w2 + w3 + Re[V5] && V7 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 - 12 V5 + 4 d V5 - 3 d l V5 + 4 d V6 - 3 d l V6 + 12 w2)/(-4 d + 3 d l) && s == 1/24 (-12 V1 + 4 d V1 - 3 d l V1 + 4 d V2 - 3 d l V2 + 4 d V3 - 3 d l V3 + 6 d l V4 + d l V5 + d l V6 + d l V7 + 12 w1 + 12 w3 + 12 w4)

Reduce is much more powerful in moderne Mathematica editions than Solve. This command runs very short time compared to the original question.

The original question is not solved by Reduce because it does not know MaxExtraConditions and the changed.

This version can be solved:

Reduce[{V1 == (-24 s + 4 d V2 - 3 d l V2 + 4 d V3 - 3 d l V3 +
6 d l V4 + d l V5 + d l V6 + d l V7 + 12 w1 + 12 w3 +
12 w4)/(12 - 4 d + 3 d l) &&
V2 == (-24 s + 4 d V1 - 3 d l V1 + 4 d V3 - 3 d l V3 + 6 d l V4 +
d l V5 + d l V6 + d l V7 + 12 w1 + 12 w2 + 12 w4)/(12 - 4 d +
3 d l) &&
V3 == (-24 s + 4 d V1 - 3 d l V1 + 4 d V2 - 3 d l V2 + 6 d l V4 +
d l V5 + d l V6 + d l V7 + 12 w1 + 12 w2 + 12 w3)/(12 - 4 d +
3 d l) &&
V4 == (12 s + d l V1 + d l V2 + d l V3 + d l V5 + d l V6 +
d l V7)/(6 (2 - 2 d + d l)) &&
V5 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V6 -
3 d l V6 + 4 d V7 - 3 d l V7 + 12 w2)/(12 - 4 d + 3 d l) &&
V6 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 -
3 d l V5 + 4 d V7 - 3 d l V7 + 12 w3)/(12 - 4 d + 3 d l) &&
V7 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 + 4 d V5 -
3 d l V5 + 4 d V6 - 3 d l V6 + 12 w4)/(12 - 4 d + 3 d l) &&
w1 > s > w2 > w3 > w4 > b > 0 && w1 + w2 + w3 + w4 == 4 s &&
0 < d < 1 && 0 < l < 1}, {V1, V2, V3, V4, V5, V6, V7, s}]


The result is:

0 < d < 1 && 0 < l < 1 && w4 > 0 && w3 > w4 && w2 > w3 &&
w1 > 3 w2 - w3 - w4 && 0 < b < w4 &&
V1 == (3 b d l - 6 w1 + 6 d w1 - 3 d l w1 + 6 w2 - 14 d w2 +
8 d^2 w2 + 5 d l w2 - 8 d^2 l w2 - 6 w3 + 10 d w3 - 4 d^2 w3 -
7 d l w3 + 4 d^2 l w3 - 6 w4 + 10 d w4 - 4 d^2 w4 - 7 d l w4 +
4 d^2 l w4)/(-12 + 24 d - 12 d^2 - 12 d l + 12 d^2 l) &&
V2 == w2 - w3 + Re[V1] && V3 == w2 - w4 + Re[V1] &&
V4 == (1/(
12 d l - 12 d^2 l +
12 d^2 l^2))(6 b d l - 12 w1 + 12 d w1 - 9 d l w1 + 12 w2 -
12 d w2 + 7 d l w2 - 12 w3 + 12 d w3 - 11 d l w3 - 12 w4 +
12 d w4 - 11 d l w4 + 24 Re[V1] - 32 d Re[V1] + 8 d^2 Re[V1] +
24 d l Re[V1] - 12 d^2 l Re[V1] + 4 d^2 l^2 Re[V1] - 8 d Re[V2] +
8 d^2 Re[V2] + 6 d l Re[V2] - 12 d^2 l Re[V2] +
4 d^2 l^2 Re[V2] - 8 d Re[V3] + 8 d^2 Re[V3] + 6 d l Re[V3] -
12 d^2 l Re[V3] + 4 d^2 l^2 Re[V3]) &&
V5 == (1/(
6 l))(-6 b l - 12 w1 + 9 l w1 + 12 w2 - 3 l w2 - 12 w3 + 9 l w3 -
12 w4 + 9 l w4 + 24 Re[V1] - 8 d Re[V1] - 18 l Re[V1] +
12 d l Re[V1] - 4 d l^2 Re[V1] - 8 d Re[V2] + 12 d l Re[V2] -
4 d l^2 Re[V2] - 8 d Re[V3] + 12 d l Re[V3] - 4 d l^2 Re[V3] -
12 d l Re[V4] + 12 d l^2 Re[V4]) && V6 == -w2 + w3 + Re[V5] &&
V7 == (-12 b + d l V1 + d l V2 + d l V3 + 6 d l V4 - 12 V5 +
4 d V5 - 3 d l V5 + 4 d V6 - 3 d l V6 + 12 w2)/(-4 d + 3 d l) &&
s == 1/24 (-12 V1 + 4 d V1 - 3 d l V1 + 4 d V2 - 3 d l V2 + 4 d V3 -
3 d l V3 + 6 d l V4 + d l V5 + d l V6 + d l V7 + 12 w1 + 12 w3 +
12 w4)


The question Whatis the difference between Reduce and Solve?. An answer over there got 97 upvote.

"The code for Solve and related functions is about 500 pages long.

Reduce and related functions use about 350 pages of Mathematica code and 1400 pages of C code."

The most important is :

Reduce returns results of computation as boolean formulae and gives complete description of solution sets. Solve returns lists of replacement rules yielding generic solutions.

• It hardly does what the OP wants, which is to eliminate V2 through V7 and s. Jul 16, 2020 at 13:43
• Thank you @Steffen Jaeschke ! It was very helpful! Jul 16, 2020 at 17:05
• Michael E2 But I just need the expression for V1. And is given in his solution right? So this should work. Jul 16, 2020 at 17:05