I need to define a table where the definition of the elements differs if the indices $i$ and $j$ are equal or different. In particular I have to implement the following formula $$(K_1^{(1)}(m_1,m_2))_{ij} = \begin{cases} \frac{M_{ij}^{(1)}}{a_i-a_j}\left[\left(\frac{\alpha_s(m_2)}{\alpha_s(m_1)}\right)^{a_j}-\left(\frac{\alpha_s(m_2)}{\alpha_s(m_1)}\right)^{a_i}\right]&i\neq j\\ M_{ii}^{(1)}\left(\frac{\alpha_s(m_2)}{\alpha_s(m_1)}\right)^{a_i}\log\frac{\alpha_s(m_1)}{\alpha_s(m_2)} &i=j \end{cases}$$
All the relevant matrices have been defined as table and I need to define $K_1^{(1)}$. What I have done is as follows
K1 = Table[If[i == j, M15[[i, i]] (αsΛ/αsμ)^a5[[i]] Log[αsμ/αsΛ], M15[[i, j]]/(a5[[i]] - a5[[j]]) ((αsΛ/αsμ)^a5[[j]] - (αsΛ/αsμ)^a5[[i]])], {i, 1, 10}, {j, 1, 10}] // Chop
And what I get is various error of the form "Power: Infinite expression 1/0. encountered." and "Infinity: Indeterminate expression 0 ComplexInfinity encountered." which I imagine they would come from the program trying to evaluate the first expression even when $i=j$.
How do I solve this problem?
Dimensions[M15]
andLength[a5]
? Or even these items, if possible. $\endgroup$MatrixForm
command onM15
anda5
in your notebook prior to using these in the computation? It would be helpful to include these items in your post. $\endgroup$