Search code examples
matlabequation-solving

How can I find an explicit solution to this equation?


In the field in which I work there's a kind of score called a SEDI:

SEDI

I've been asked to solve this equation for F. I've been informed by a generally reliable source that there should be an analytic solution. Generally I use MATLAB for such problems, and so I tried

syms SEDI H F
solve(SEDI == ((log(F)-log(H)-log(1-F)+log(1-H)) / (log(F)+log(H)+log(1-F)+log(1-H))),F)

This gives the error message Warning: Cannot find explicit solution. I then tried rearranging to

solve(SEDI*(log(F) + log(H) + log(1-F) + log(1-H)) == log(F) - log(H) - log(1-F) + log(1-H),F)

but just got the same error message. I'm wondering what's going on. Some possibilities:

  1. There an analytic solution. MATLAB can't find it, but some other software could.

  2. There is an analytic solution. MATLAB could solve it if I asked it in a different way, perhaps by rearranging the equation? Or, by giving more information to MATLAB - I know that F and H can only range from 0 to 1, and SEDI can only range from -1 to +1.

  3. There no analytic solution.


Solution

  • At best there is no simple explicit solution. With the restrictions that 0<f<1 and 0<h<1, one can find solutions for various values of sedi and h. Consider sedi=0. Then f=h.

    Suppose sedi=1/2. Then f is Equation for sedi equal one-half

    If sedi=1/3, then f is

    Result for f when sedi is one-third

    One can play with this using Mathematica with the following code:

    sedi = 1/3;
    h =.;
    ToRadicals[
     Solve[(sedi (Log[f] + Log[h] + Log[1 - f] + Log[1 - h]) == 
         Log[f] - Log[h] - Log[1 - f] + Log[1 - h]) && 0 < f < 1 && 
       0 < h < 1, f]]
    

    In addition, consider the contours for values of SEDI:

    ContourPlot[(Log[f] - Log[h] - Log[1 - f] + Log[1 - h])/(Log[f] + Log[h] + Log[1 - f] + Log[1 - h]),
     {f, 0.001, 0.999}, {h, 0.001, 0.999}, ContourLabels -> True,
     Contours -> {-0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0,
        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9},
     FrameLabel -> (Style[#, Bold, Large] &) /@ {"f", "h", 
        "Contours of SEDI"}, ContourShading -> None, ContourStyle -> Gray]
    

    enter image description here