I have the following matrix form $[J]$:

$$ \begin{bmatrix} \{ v[3],p + v[2]\}\\ \{v[3], p + v[2], 2 p + v[1]\} \\ \{v[3], p + v[2],2 p + v[1], 3 p + v[0]\}\\ \{v[3], p + v[2],2 p + v[1], 3 p + v[0]\} \\ \vdots \end{bmatrix} $$

I need to operate the list of each row by Max and Integrate and then add them all together like this:

$H=\int\limits_{0}^{\infty} \max \{ v[3],p + v[2]\}dF(p)+\int\limits_{0}^{\infty} \max \{v[3], p + v[2], 2 p + v[1]\}dF(p)+\dots$

I would like to use matrix operations to do it instead of loops, but I can't find a way to make it work.

Any help is appreciated. Thanks

  • $\begingroup$ Do you know each v[i] values; Total[Integrate[Max[#], {p, 0, Infinity}] & /@ J] ? $\endgroup$ – OkkesDulgerci Mar 25 '18 at 16:25
  • $\begingroup$ all except the last one, from H I will solve the last value v[3] $\endgroup$ – Rodrigo Mar 25 '18 at 16:29
  • $\begingroup$ I see. Can you post actual vector values if it is not too long. What is the length of J? $\endgroup$ – OkkesDulgerci Mar 25 '18 at 16:34
  • $\begingroup$ I couldn't by pass the code formatting thing here is a link with a picture of J with n=10, at some point I would want to go for n=100 Matrix $\endgroup$ – Rodrigo Mar 25 '18 at 16:51

The line of Okkes works, this do the job

Total[Integrate[Max[#], {p, 0, Infinity}] & /@ J]



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.