I give matlab a a system of two equations with two unknowns: $e_1$ and $e_2$. It solves it but in return gives two expressions, each as an $6x1$ sym, of the following form:
$ e_1 = \begin{array}{c} \frac{c_2 \,e_2 \,{\left(c_1 +\mathrm{root}\left(\sigma_1 ,z,1\right)\,c_2 \,2\right)}\,\mathrm{root}\left(\sigma_1 ,z,1\right)}{{c_1 }^2 }\\ \frac{c_2 \,e_2 \,{\left(c_1 +\mathrm{root}\left(\sigma_1 ,z,2\right)\,c_2 \,2\right)}\,\mathrm{root}\left(\sigma_1 ,z,2\right)}{{c_1 }^2 }\\ \frac{c_2 \,e_2 \,{\left(c_1 +\mathrm{root}\left(\sigma_1 ,z,3\right)\,c_2 \,2\right)}\,\mathrm{root}\left(\sigma_1 ,z,3\right)}{{c_1 }^2 }\\ \frac{c_2 \,e_2 \,{\left(c_1 +\mathrm{root}\left(\sigma_1 ,z,4\right)\,c_2 \,2\right)}\,\mathrm{root}\left(\sigma_1 ,z,4\right)}{{c_1 }^2 }\\ \frac{c_2 \,e_2 \,{\left(c_1 +\mathrm{root}\left(\sigma_1 ,z,5\right)\,c_2 \,2\right)}\,\mathrm{root}\left(\sigma_1 ,z,5\right)}{{c_1 }^2 }\\ \frac{c_2 \,e_2 \,{\left(c_1 +\mathrm{root}\left(\sigma_1 ,z,6\right)\,c_2 \,2\right)}\,\mathrm{root}\left(\sigma_1 ,z,6\right)}{{c_1 }^2 } \end{array}$
$ e_2 =(\begin{array}{c} \mathrm{root}\left(\sigma_1 ,z,1\right)\\ \mathrm{root}\left(\sigma_1 ,z,2\right)\\ \mathrm{root}\left(\sigma_1 ,z,3\right)\\ \mathrm{root}\left(\sigma_1 ,z,4\right)\\ \mathrm{root}\left(\sigma_1 ,z,5\right)\\ \mathrm{root}\left(\sigma_1 ,z,6\right) \end{array}$
where it also defines $\sigma_1$ as a symbolic variable. I have two problems: First, why it gives a tabular expression with 6 different variables, what is z? Why can't I get a symbolic solution? Second, I already solve for $e_1$ and $e_2$, but still it gives $e_1$ in terms of $e_2$, there must be a problem. My matlab prompt is as follows:
syms e_1 e_2 c_1 c_2 k V_u V_d p1_1_0_f p2_1_0_f ep1_1_1_f ep2_1_1_f
ep1_1_1_f = (k^2 * (c_2)^2 * V_u - 2 * k * c_1 * c_2 * V_d - (c_1)^2 * V_d) / ((c_1 + k * c_2)^2)
ep2_1_1_f = ((c_1)^2 * V_u - 2 * k * c_1 * c_2 * V_d - (c_2)^2 * k^2 * V_d) / ((c_1 + k * c_2)^2)
p1_1_0_f = ((e_1)/(e_1 + e_2)) * V_u + ((e_2)/(e_1 + e_2)) * ep1_1_1_f - c_1 * e_1
p2_1_0_f = ((e_2)/(e_1 + e_2)) * ep2_1_1_f - ((e_1)/(e_1 + e_2)) * V_d - k * c_2 * e_2
var = diff(p1_1_0_f,e_1)
var2 = diff(p1_1_0_f,e_1)
[sole_1, sole_2] = solve(var == 0, var2 == 0)
sole_1 = simplify(sole_1)
sole_2 = simplify(sole_2)
So you may copy this and see the result for yourself. I am new to matlab and I really cannot do the calculations by myself, the expressions are far too lenghy, so any help is greatly appreciated.
Did you compare the results for
varandvar2? They are equal: so the operationdoesn't make sense.