1
$\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$
2
  • $\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, 2020 at 10:12
  • $\begingroup$ The question is still ill posed. In the first part there in only a dependency on $\rho$, not on $\lambda$ or $\mu$! The first sum is not a double sum. It is an infinite sum $\sum _{h=1}^{\infty } \frac{(\rho -1) \rho ^{h-1}}{\rho ^h-1}$! If that should be reproduced in the matrix version the complete summands have to be of the first sum form. $\endgroup$ May 13, 2023 at 19:09

1 Answer 1

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:

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

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, ∞}]

{{1.59413}}
$\endgroup$
2
  • $\begingroup$ How did you get the sum? I keep on getting an error of some sort... $\endgroup$
    – PiE
    Feb 27, 2020 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, 2020 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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