0
$\begingroup$

I have the following values:

α = 1/2; 
θ = 1/2; 
μ = 1/4; 
a[0] = 0.0001^α/Gamma[2 - α]; 
A = MatrixForm[{{10., 0.9950371902099893, 0.4993761694389223, 0, 
     1}, {0.9950371902099893, 10., 0.9950371902099893, 1, 1}, 
         {0.4993761694389223, 0.9950371902099893, 10., 2, 1}, {0, 1, 
     2, 0, 0}, {1, 1, 1, 0, 0}}]; 
B = MatrixForm[{{0, 0, 0, 0, 
     0}, {1.9411077428858723, -999.9999999999999, 1.9411077428858723, 
     0, 0}, {0, 0, 0, 0, 0}, 
         {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}}]; 
Λ[0] = 
  MatrixForm[{{-0.01458648343841371}, {0.02917296687682741}, \
{-0.014586483438413714}, {0.4546487134128409}, 
         {0.124120789617989}}]; 
w[0, 0] = Sqrt[2]/3; 
w[0, 1] = 2*(1/(3*Sqrt[2]) + Sqrt[2]/3);

I want to gain Λ[1] of the following equation:

eq = A*a[0]*Λ[1] - B*θ*(μ + w[0, 0])*Λ[1] - (B*(1 - θ)*μ*Λ[0] + A*a[0]*Λ[0] + B*(1 - θ)*w[0, 0]*Λ[0])

Any suggestions?

$\endgroup$
2
  • 2
    $\begingroup$ Suggestions? Yes. Don't wrap quantities that you are going to use for further calculations in MatrixForm. MatrixForm is a formatting tag for displaying output. It interferes with calculations. $\endgroup$
    – m_goldberg
    Commented Dec 25, 2016 at 16:24
  • 1
    $\begingroup$ You are multiplying matrix and vector af they were numbers (you should use Dot). And BTW, I am not sure Mathematica likes the notation $\Lambda[0]$ $\endgroup$
    – mattiav27
    Commented Dec 25, 2016 at 16:57

1 Answer 1

3
$\begingroup$

THIS IS AN EXTENDED COMMENT AND NOT AN ANSWER.

α = 1/2;
θ = 1/2;
μ = 1/4;
a[0] = 0.0001^α/Gamma[2 - α];

Do not include the wrapper MatrixForm in the definition of a matrix. MatrixForm is used for display only. When displaying a matrix at the time of its definition, use parentheses to isolate the definition from the display. For example,

(A = {{10., 0.9950371902099893, 0.4993761694389223, 0, 1}, {0.9950371902099893, 10., 0.9950371902099893, 1, 1}, {0.4993761694389223, 0.9950371902099893, 10., 2, 1}, {0, 1, 2, 0, 0}, {1, 1, 1, 0, 0}}) // MatrixForm

enter image description here

B = {{0, 0, 0, 0, 0}, {1.9411077428858723, -999.9999999999999, 
    1.9411077428858723, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 
    0}};

You should not have List brackets around the individual elements of Λ[0]. "The Wolfram Language represents vectors as lists, and never needs to distinguish between row and column cases." See Operations on Vectors

Λ[0] = {-0.01458648343841371, 
   0.02917296687682741, -0.014586483438413714, 0.4546487134128409, 
   0.124120789617989};

w[0, 0] = Sqrt[2]/3;
w[0, 1] = 2*(1/(3*Sqrt[2]) + Sqrt[2]/3);

Your eq is a matrix, not an equation.

(eq = A*a[0]*Λ[1] - 
    B*θ*(μ + w[0, 0])*Λ[
      1] - (B*(1 - θ)*μ*Λ[0] + 
      A*a[0]*Λ[0] + 
      B*(1 - θ)*w[0, 0]*Λ[0])) // MatrixForm

enter image description here

It is not clear what you are trying to do. Is Λ[1] supposed to be a scalar or a matrix? And to what is this matrix to be equated?

$\endgroup$
2
  • $\begingroup$ Many thanks. Λ[1] is a matrix with 5 row and 1 column. $\endgroup$
    – user45459
    Commented Dec 25, 2016 at 19:16
  • $\begingroup$ {\[Lambda][1, 1], \[Lambda][1, 2], \[Lambda][1, 3], \[Lambda][1, 4], \[Lambda][1, 5]} $\endgroup$
    – user45459
    Commented Dec 25, 2016 at 19:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.