Вопрос

I update the OP so that the original question can be solved by solving the following equations.

 integral_from_0_N of (x * f(x))  dx  =  constant  // here , constant > 0 , N > 0

where

f(x) = g(j,k) * (x/k)^(j-1) * exp(-x/k)   // here,  k > 0 , j > 0 

Here, g(j,k) = j / [ k* g1 (1+j, constant1/k) - k* g1 (1+j, constant2/k) + exp(-constant2/k) * k^(1-j) * constant2^j - exp(-constant1/k) * k^(1-j) * constant1^j ] constant1 >= 0 , constant 2 > 0
Where

     g1( p, q) = integral_from_q_to_inf of (t^(p-1) * exp(-t)) dt

I need to find solutions for k and j .


I need to solve a mathematical optimization model with integral as constraints.

Min.   | s1 - k1 | + | s2- k2 |
s.t.    
    integral_from_0_to_M of  f(x) = 1

    s1 = integral_from_0_to_M of  x * f(x) 
    s2 = integral_from_0_to_M of  x^2 * f(x) 
    M, k1 and k2 are positive numbers
    f(x) is a probability density function of x with arguments of  
       (alpha, beta, 0, M)
    f(x) = G * (x * beta)^(alpha -1) *  e^(-x * beta)
    G = alpha * beta / [( gamma(alpha, 0) - gamma(alpha, M) + e^(-M*beta) *    beat^(1-alpha) * M^alpha] 

 Decision variables:
      alpha > 0, beta > 0 

Any help would be appreciated.

Это было полезно?

Решение

In order to apply the usual fmincon to any problem you should define your objective function (Min. | s1 - k1 | + | s2- k2 |) and your constraints as numerical functions. So, the point is how to define a function as definite integral function. You can do that using the matlab function quadv.

However, I have to say that your problem MAY be not correctly formulated. Note that if f(x) is a distribution function defined on a support [0,M] (it seems to be the gamma function or some variation of it) integral_from_0_to_M of f(x) is always equal to 1. If it is not defined on the support [0,M], integral_from_0_to_M of f(x) will never be equal to 1. So maybe this constraint is not necessary or never satisfied. I didnt check carefully your case, but be sure that the choice of alpha and beta by themselves ensure that this constraint is satisfied.

Furthermore, this is a very unusual way to define a distribution function with parameters ExpectedValue=k1 and Variance=k2. Is it not possible analytically to redefine a the Gamma function in the support [0,M] i.e. a truncated Gamma function? See how people do that with truncated normal distributions...

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top