To calculate the solution for the following equation set's unknown variables ${C,V}$
\begin{equation} \begin{aligned} \sum_{i=1}^m Abs[bt_{i} \cdot xt'_{i} - V \cdot bt'_{i}] \cdot c &== C \\ C + V &== \sum_{i=1}^m bt_{i} \cdot xt'_{i} \end{aligned} \end{equation}
For $m = 2$ it's easily solved by Mathematica's Solve function: $\left\{V\to \frac{bt_1 \cdot xt'_1 \left(S_1 \cdot c + 1 \right) + bt_2 \cdot xt'_2 \left(S_2 \cdot c + 1 \right)}{bt'_1 \cdot S_1 \cdot c + bt'_2 \cdot S_2 \cdot c + 1 }\right\}$ and $\left\{ C \to \sum_{i=1}^2 bt_{i} \cdot xt'_{i} - V \right\}$
where $ S_i = \left\{ \begin{array}{lr} 1 & \\ -1 & \end{array} \right. $
But for $m \ge 3$ it took forever for Solve function to give an analytical solution, I waited for 10 mins hoping Mathematica would crack out the solutions before I aborted the evaluation. Eventually I made a guess that the solution for any integer $m$ could be: $\left\{V\to \frac{\sum _{i=1}^m bt_i xt'_i \left(S_i \cdot c + 1 \right)}{\sum _{i=1}^m bt'_i \cdot S_i \cdot c + 1}\right\}$ where $ S_i = \left\{ \begin{array}{lr} 1 & \\ -1 & \end{array} \right. $
This unproved solution seems to make the original equations satisfied with any numeric $bt_i, bt'_i, xt'_i$ and $c$ I throw at it.
But I'm still not sure it is the actual solution, thus questions:
- Is there a way to get this equation's analytical solution when $m \ge 3$ ?
- If Mathematica can not provide the analytical solution, does it at least provide some function to verify the legitimacy of my guessed solution?
- If my guessed solution is indeed the legitimate one, how to determine the sign of $S_i$ ? I know it depends on the relative quantity of $bt_{i} \cdot xt'_{i} $ and $ bt'_{i}$ but still can not figure out a definitive rule about it.
I tried use $S_i = \text{If}\left[bt_i>bt'_i,-1,1\right]$, but it has been proved wrong by some numerical coefficients combinations.
When $m \lt 10$ I can try all $S_i \pm$ combinations to find the non trivial solution, but this approach quickly becomes non-feasible when $m$ is more than that, because of the exponential increase of possible combinations.
Any help on the Math or Mathematica would be appreciated.
I have put the actual Mathematica code in below (Note I don't know how to type prime sign so i used bt2 and xt2 instead):
NSolve[{\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(m\)]\(Abs[
\*SubscriptBox[\(bt\), \(i\)]*
\*SubscriptBox[\(xt2\), \(i\)] - V*
\*SubscriptBox[\(bt2\), \(i\)]]*c\)\) == C && C + V == \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(m\)]\(
\*SubscriptBox[\(bt\), \(i\)]*
\*SubscriptBox[\(xt2\), \(i\)]\)\)} /. {m -> 3}