# Question:Solving system of linear and nonlinear equations with inequalities

## Question:Solving system of linear and nonlinear equations with inequalities

Maple

Hi,

I'm trying to solve system of linear and nonlinear equations with inequalities and it looks like this:

SX := solve(
[
seq(diff(EX,WX[k+1])=0, k = 0..m), # these are linear
seq(AX[k+1]*(WX[k+1]-rightX)=0, k = 0..m), # these are nonlinear, but very simple
seq(BX[k+1]*(leftX-WX[k+1])=0, k = 0..m), # these are nonlinear, but very simple
seq(WX[k+1]                        seq(WX[k+1] >= leftX, k = 0..m),
seq(AX[k+1] >= 0, k = 0..m),
seq(BX[k+1] >= 0, k = 0..m)
],
[
seq(WX[k+1], k = 0..m),
seq(AX[k+1], k = 0..m),
seq(BX[k+1], k = 0..m)
]
):

Variables are WX, AX, BX, the rest is constant.

The problem is that I have to wait for the solution much too long, for instance: if m = 7 then I have to wait like 15 minutes, and for m > 8 I don't get any results at all. How can I make it run faster ? I tried to use fsolve (and got only trivial =0 solutions), Groebner[Basis] and then solve, but I didn't get any result in 50 minutes. Tried to get rid of inequalities but it didn't make any difference.

EX isn't very complicated, I tried to solve linear system:

SX := solve(
[
seq(diff(EX,WX[k+1])=0, k = 0..m), # these are linear
],
[
seq(WX[k+1], k = 0..m)
]
):

and I got the results immediately.

﻿