System of four equations with four unknowns

325 Views Asked by At

I have got 4 equations as shown below. I'm considering if there is any simple method to solve it.

$d_1+d_2+d_3+d_4=0$

$\alpha d_1-\alpha d_2+\beta d_3-\beta d_4=1-e^{-\omega t}$

$d_1 e^{AL}+d_2e^{-AL}+d_3e^{BL}+d_4e^{-BL}=0$

$\alpha d_1 e^{AL}-\alpha d_2e^{-AL}+\beta d_3e^{BL}-\beta d_4e^{-BL}=0$

all parameters $\alpha, \omega , \beta , A , B, L $ are constant numbers which will change based on conditions of the problem.

Thank you

1

There are 1 best solutions below

2
On BEST ANSWER

This is a system of four equations in 4 unknowns. You can form the matrix $$ M = \pmatrix{1 & 1 & 1 & 1 \\ \alpha & -\alpha & \beta & -\beta\\ e^{AL} & e^{-AL} & e^{BL} & e^{-BL} \\ \alpha e^{AL} & -\alpha e^{-AL} & \beta e^{BL}& -\beta e^{-BL} } $$ and the vector $$ b = \pmatrix{ 0\\ 1 - e^{-\omega t} \\ 0 \\ 0} $$ and the solve $Ad = b$ for $d$, namely $d = A^{-1} b$.

Since your parameters look as if they'll be real numbers, the chances that there's a generic nice form for $A^{-1}$ is small; instead, why not just use a numerical solver, like Matlab's d = A \ b;?\

Alternatively, writing $a$ for $\alpha$ and $b$ for $\beta$, and $Q$ for $e^{AL}$ and $R$ for $e^{BL}$, your matrix is

$$ M = \pmatrix{1 & 1 & 1 & 1 \\ a & -a & b & -b\\ Q & 1/Q & R & 1/R \\ aQ & -a/Q & bR& -b/R } $$ which is amenable to Gaussian elimination to make it upper triangular, and thus easy to work with. Subtract $a$ times first from second and $a$ times third from 4th to get $$ M_1 = \pmatrix{1 & 1 & 1 & 1 \\ 0 & -2a & b-a & -b-a\\ Q & 1/Q & R & 1/R \\ 0 & -2a/Q & (b-a)R& -(b+a)/R } $$ Subtract $Q$ times first from third to get $$ M_2 = \pmatrix{1 & 1 & 1 & 1 \\ 0 & -2a & b-a & -b-a\\ 0 & 1/Q-Q & R-Q & 1/R-Q \\ 0 & -2a/Q & (b-a)R& -(b+a)/R } $$ Subtract $1/Q$ times second from fourth to get $$ M_3 = \pmatrix{1 & 1 & 1 & 1 \\ 0 & -2a & b-a & -b-a\\ 0 & 1/Q-Q & R-Q & 1/R-Q \\ 0 & 0 & (b-a)R- (b-a)/Q& -(b+a)/R - (b+a)/Q } $$

Continue like this until you get something upper triangular (albeit messy); then back-substitution will give you an answer.