1
$\begingroup$

I have the following series of equations ($n+2$ equations $n+2$ variables):

\begin{equation*} k_0q_0+\lambda q_0 + c_0 = 0, \\ k_1q_1+\lambda q_1 + c_1 = 0, \\ k_nq_n+\lambda q_n + c_n = 0, \\ q_1+q_2+....+q_n = 1. \end{equation*}

The variables are $q_0,q_1,.....,q_n$ and $\lambda$. Note that $k$ and $c$ are series of constants.

How can I solve this?

  • 0
    My mistake. I edited the question.2010-11-05
  • 1
    I see n + 2 equations and n + 2 variables.2010-11-06
  • 0
    $q_i=-\frac{c_i}{\lambda+k_i}$ ...2010-11-06

3 Answers 3

4

$\displaystyle q_i = \frac{-c_i}{k_i + \lambda}$

Substituting in the last equation gives us

$\displaystyle \sum_{i=1}^{n} \frac{-c_i}{k_i + \lambda} = 1$

which can be made into a polynomial equation in $\displaystyle \lambda$, which you should be able to solve by standard numerical methods.

Once you find a root of the above polynomial, substituting $\displaystyle \lambda$ with the value of the root in $\displaystyle q_i = \frac{-c_i}{k_i + \lambda}$ will give the other variables.

  • 0
    Yes I was able to reach till this point. How do I solve this polynomial equation for $\lambda$ in order to express $q_i$ in terms of just c's and k's?2010-11-05
  • 2
    @SKypeMeSM: You most likely can't get a "formula", owing to the fact that the general polynomial of degree >= 5 is not "solvable". Search for Abel Ruffini theorem on the web.2010-11-05
  • 1
    @Skype: Or more properly, you can get symbolic solutions, but the symbolic solution is so unwieldy that it is impractical. The same thing will happen when you use Gröbner, though. (Gröbner is actually nothing more than an organized elimination of variables.)2010-11-05
2

It's not linear, first of all: you have two variables $\lambda$ and $q_i$ multiplied together. Luckily, your set of equations is algebraic; Gröbner may have a shot here.

  • 0
    M.: You are right but I was hoping of solving this analytically.2010-11-05
  • 0
    @Skype: Well, that's why I suggested Gröbner; any decent symbolic computing environment like Maple or *Mathematica* should have it, and it can return symbolic solutions.2010-11-05
0

Define $c_{n+1} = 1$ and $q_{n+1} = 0$. Observe that we can write the above system in the following $(n+2) \times (n + 2)$-matrix form: $K_{\lambda} \mathbf{q} = - \mathbf{c}$, where $K_{\lambda}$ is $\text{diag}(k_{i} + \lambda)$ for the upper $(n+1) \times (n+1)$-submatrix, ($0$ $1$ $1$ $\cdots$ $1$ $0$) for the bottom row and ($0$ $0$ $0$ $\cdots$ $0$ $1$)$^{\top}$ for the right most column. (By enlarging the matrix, we have encoded the constraint $\sum_{i = 1}^{n} q_{i} = 1$.)

Since $\lambda$ is unknown, we can proceed presupposing that $K_{\lambda}$ is not singular (i.e., $\det K_{\lambda} \neq 0$), and solve the constrained system by matrix inversion: $\mathbf{q} = - K_{\lambda}^{-1} \mathbf{c}$. The result is a vector $\mathbf{q}$ in terms of the unknown $\lambda$ and given constants. To find the allowed values for $\lambda$, numerically (or analytically) solve the polynomial $\mathbf{q} \cdot \mathbf{1} - 1 = 0$.