0
$\begingroup$

I have an implicit function $F(e,w,a,b,i,n)=0$ where $0\leq e \leq 1 $, $w \geq 0 $, $0\leq a \leq 1 $, $0\leq i \leq 1 $, $0\leq b \leq 1 $, $n > 0 $. My goal is to find $e$ as an explicit function of $w$ and $a$ by assigning some values for the other variables. Below is my code.

Clear["Global`*"]
n = 1; b=1/2; i=1/10;
Solve[-(1/((1 - e)^2 w)) == - ((-((-a (i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - n e (w/(b e^b))^(1/(b - 1)))) + (-1 + a^2) (-1 + e)^2 w - a (-1 + e) (i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - n e (w/(b e^b))^(1/(b - 1)))) w^2)/(a (-1 + e) i (1 - e + i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - n e (w/(b e^b))^(1/(b - 1)))) w))) - (-((-a ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - n e (w/(b e^b))^(1/(b - 1))) + (-1 + a^2) (-1 + e) (-1 + e - i) w - a (-1 + e) ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - n e (w/(b e^b))^(1/(b - 1)))w^2)/(a (-1 + e) i (1 - e + i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - n e (w/(b e^b))^(1/(b - 1)))) w)))), e]

And I get a weird result as follows. Do you know what it means?

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ It gives solution instantly for me. But you need to first change n = 1, b=0.5, i=0.1 to n = 1; b=0.5; i=0.1 or better, use exact values n = 1; b=1/2, i=1/10. In both cases, Solve returns right away. $\endgroup$
    – Nasser
    Commented Feb 13, 2023 at 16:49
  • $\begingroup$ @Nasser, thanks. I followed your suggestion and this time I got some result which I added, which however looks weird. Do you get the same thing? Do you know what it means? $\endgroup$
    – ppp
    Commented Feb 13, 2023 at 17:05
  • $\begingroup$ It's simply a formatting of the result that elides long parts. If you want to see it in full detail either click the "Show all" button or use InputForm around the Solve[...]. $\endgroup$ Commented Feb 14, 2023 at 0:39

2 Answers 2

1
$\begingroup$

Try to simpify your expression before solving for e:

Clear["Global`*"]
n = 1; b = 1/2; i = 1/10;
sol = Solve[-(1/((1 - 
            e)^2 w)) == -((-((-a (i + ((1 - 
                    e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                   n e (w/(b e^b))^(1/(b - 1)))) + (-1 + 
                a^2) (-1 + e)^2 w - 
             a (-1 + e) (i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                   n e (w/(b e^b))^(1/(b - 1)))) w^2)/(a (-1 + 
               e) i (1 - e + 
               i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                  n e (w/(b e^b))^(1/(b - 1)))) w))) - (-((-a ((1 - 
                   e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                 n e (w/(b e^b))^(1/(b - 1))) + (-1 + a^2) (-1 + 
                e) (-1 + e - i) w - 
             a (-1 + e) ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                 n e (w/(b e^b))^(1/(b - 1))) w^2)/(a (-1 + e) i (1 - 
               e + i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                  n e (w/(b e^b))^(1/(b - 1)))) w)))) // Simplify, e]

enter image description here

sol /. {w -> 4, a -> 2} // N // Chop

(* {{e -> -8.00568}, {e -> 8.00694}, {e -> 0.757559}, {e -> 1.} *)
$\endgroup$
1
$\begingroup$
$Version

(* "13.2.1 for Mac OS X ARM (64-bit) (January 27, 2023)" *)

Clear["Global`*"]

n = 1; b = 1/2; i = 1/10;

FullSimplify the equation

eqn = -(1/((1 - 
           e)^2 w)) == -((-((-a (i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                  n e (w/(b e^b))^(1/(b - 1)))) + (-1 + a^2) (-1 + e)^2 w - 
            a (-1 + e) (i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                  n e (w/(b e^b))^(1/(b - 1)))) w^2)/(a (-1 + e) i (1 - e + 
              i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                 n e (w/(b e^b))^(1/(b - 1)))) w))) - (-((-a ((1 - 
                  e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                n e (w/(b e^b))^(1/(b - 1))) + (-1 + a^2) (-1 + e) (-1 + e - 
               i) w - a (-1 + 
               e) ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                n e (w/(b e^b))^(1/(b - 1))) w^2)/(a (-1 + e) i (1 - e + 
              i + ((1 - e) n (w/(b e^b))^(1/(b - 1)))/(1 - 
                 n e (w/(b e^b))^(1/(b - 1)))) w)))) // 
  FullSimplify[#, {0 <= a <= 1, 0 <= e <= 1, w >= 0}] &

(* (-1 - (10 (-1 + e) (e^2 - 4 w^2) (a - (-1 + a^2) (-1 + e) w + 
     a (-1 + e) w^2))/(
  a e (10 + e (-21 + 10 e)) + 4 a (11 - 10 e) w^2))/((-1 + e)^2 w) == 0 *)

Include known constraints in the Solve

sol = Solve[{eqn, 0 <= a <= 1, 0 <= e <= 1, w >= 0}, e]

enter image description here

The solution is given as Root expressions which are more compact than the equivalent radical form.

sol // ToRadicals // Short[#, 10] &

enter image description here

The Root expressions evaluate the same as any expression.

EDIT: Corrected AxesLabel (labels were reversed)

Plot3D[Evaluate[e /. sol], {w, 0, 4}, {a, 0, 1}, 
 AxesLabel -> (Style[#, 14] & /@ {w, a, e}),
 PlotPoints -> 50, MaxRecursion -> 4]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.