I have a set of linear equations, of the form Ax=b . However, the value of b depends on the sign of

Theresa Chung

Theresa Chung

Answered question

2022-02-17

I have a set of linear equations, of the form Ax=b . However, the value of b depends on the sign of the solution of x, such that
bi=ci+di if xi>0, and bi=cidi if xi<0.
I could solve this by trying each combination of positiveness of x, but that would require solving 2N sets of linear equations, which becomes unfeasible quite quickly.
Is this solvable analytically?

Answer & Explanation

Chettaf04

Chettaf04

Beginner2022-02-18Added 7 answers

You can write the system as
Ax=c+Ed
where E is a diagonal matrix whose diagonal elements are ei=±1.
This solves to x=A1c+A1Ed. You can solve this while leaving the ei as unknowns. Then you have the xi expressed as linear combinations of the ei, and can quickly run through the various combinations to see which ones have sign(xi)=ei for all i.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?