0
$\begingroup$

I'm trying to compute a double sum...

For scalars, it seems to be working fine. Here is an example:

 Sum[ρ^(h - 1)/
 Sum[ρ^x, {x, 0, h - 1}], {h, 1, ∞}] /. {λ -> 
 0.5, μ -> 2.0, ρ -> 0.5}

But for matrices, similar code does not work.

Subscript[I, 2] = IdentityMatrix[2];
e = ({{1, 1}})
p = ({{1, 0}})
B = ( {{μ, -μ}, {0, μ}} )
Q = Transpose[e].p
V = Inverse[B];
EX = p.V.Transpose[e] /. {μ -> 2.0}
A = Subscript[I, 2] + 1/λ B - Q
U = Inverse[A]

Sum[p.MatrixPower[U, h - 1].Transpose[e]/
Sum[p.MatrixPower[U, x].Transpose[e], {x, 0, h - 1}], {h, 
 1, ∞}] /. {λ -> 0.5, μ -> 2.0, ρ -> 0.5}

I am unclear what I am doing wrong. Any help would be appreciated.

Thanks

$\endgroup$
  • $\begingroup$ Is there a reason why you want to do the sum symbolically and then assign values for Lambda etc..? If you could assign them values in the beginning it would be better. $\endgroup$ – Lotus Feb 27 at 10:12
0
$\begingroup$

Continuation of my comment: I meant have:

λ = 0.5; μ = 2.0; ρ = 0.5;

The sum value evaluates to

{{1.59413}}

Also please use i instead of I

=========

Here is the full code:

In[12]:= λ = 0.5; μ = 2.0; ρ = 0.5;

In[13]:= Subscript[i, 2] = IdentityMatrix[2];
e = ({{1, 1}});
p = ({{1, 0}});
B = ({{μ, -μ}, {0, μ}});
Q = Transpose[e].p;
V = Inverse[B];
EX = p.V.Transpose[e] /. {μ -> 2.0};
A = Subscript[i, 2] + 1/λ B - Q;
U = Inverse[A];

N@Sum[p.MatrixPower[U, h - 1].Transpose[e]/
   Sum[p.MatrixPower[U, x].Transpose[e], {x, 0, h - 1}], {h, 
   1, ∞}]

Out[22]= {{1.59413}}
|improve this answer|||||
$\endgroup$
  • $\begingroup$ How did you get the sum? I keep on getting an error of some sort... $\endgroup$ – PiE Feb 27 at 10:39
  • $\begingroup$ My answer looks like this: \!( *UnderoverscriptBox[([Sum]), (h = 1), ([Infinity])]((7.374511920474766*^30\ \*SuperscriptBox[\(9.1072613*^7), (1.\ h\)]\ \ \((\(-0.5914103126634984)\ *SuperscriptBox[(0.1524029491994481\), \(\(-1\) + h\)] + 1.5914103126634984\ *SuperscriptBox[(0.4100970508005519`), ((-1) + h)])))))... $\endgroup$ – PiE Feb 27 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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