At the VERY least, you have chosen to MULTIPLY the two terms, instead of dividing them. Assuming you really wanted to form a ratio there, surely that should be a red flag. That little * instead of a division operator should be an issue. ;-) Or, maybe you really did want to multiply them, and you just showed a formula in your question with a ratio. ;-)
Anyway, is your code correct to do the integrations? I'll check the denominator term first.
This is a double integral, but the inner integral has 1 as the kernel. So we just take the DIFFERENCE of the two limits, to get.
1 - max(t * b, m)
ans = as the inner integral of the denominator. In there, we see something about a NaN appear. Perhaps this is where your question arises. Remember that you told MATLAB only that a,b,m and t were just some symbolic variables. They can take on any value at all. The omitnan flag there is not truly important, apprently having gotten auto-generated from the call to max.
Next, you would integrate that from m to 1.
int(max(t * b, m) - 1,b,m,1)
ans =
Of couse here, we see that MATLAB did not succeed in the integration. Perhaps it would be better to deal with the max function, as instead a piecewise function. That is, as a function of b, what is max(m,b*t)? We know that t is non-negative, as are a, b, and m. We might put that information directly into the syms call.
syms a b m t real positive
Kdenom = 1 - max(t * b, m)
Kdenom = And even there, MATLAB did not resolve the max, as a function of b. Again, we know that a,b,m,t are all positive. And we know that 0<t<1. We can write that max call as a piecewise function of b instead. Sometimes it helps to give syms a little push in the right direction.
Kdenom = 1 - piecewise(b < m/t,m,b >= m/t, b*t)
Kdenom =
Now, integrate that from m to 1.
This yields a bit of a mess, because MATLAB is worried about various conditions on what if t is greater than 1, etc? Only now might we recognize that we never told MATLAB that t is strictly between 0 and 1. Does that help?
int(Kdenom,b,[m,1])
ans =
And that definitely reduces things. Even here though, there are still issues about m. What if m < t? m==t? What if m > 1?
What is the value of m? Hmm. It appears you said that m is a random variable, uniformly distributed on some interval. But your statement about m is somewhat unclear. Is it true that m is presumed to be uniformly distributed on the open interval (0,1)?
int(Kdenom,b,[m,1])
ans =
It would appear that case 3 is the one that would apply, IF we know that m < t, and 0<m<1.
And we have not even looked at the numerator term. That will likely be more of the same. And ince this so very much looks like a homework assignment, I will stop here.