Hi,
I am trying to solve this problem:
p_i=max(0,(-1+sqrt(1-4*c_i*d_i+4*(c_i-d_i)*c_i*d_i/(x*a_i))/2*c_i*d_i) if c_i>d_i
and p_i=0 otherwise. p_i, c_i,d_i are diagonal elements of matrices P, C, D and A. I need to find x and after that to calculate p_i, but I do not know how to implement max because at first x is a symbolic variable.
I would appreciate if anyone could help me.
Maya
I am trying to solve this problem:
p_i=max(0,(-1+sqrt(1-4*c_i*d_i+4*(c_i-d_i)*c_i*d_i/(x*a_i))/2*c_i*d_i) if c_i>d_i
and p_i=0 otherwise. p_i, c_i,d_i are diagonal elements of matrices P, C, D and A. I need to find x and after that to calculate p_i, but I do not know how to implement max because at first x is a symbolic variable.
I would appreciate if anyone could help me.
Maya