Solve[(-f0 \[Pi]^2 wi^4 + \[Pi]^2 wi^4 z + f0^2 z \[Lambda]^2)/(
   f0 wi Sqrt[((z^2 + (\[Pi]^2 wi^4 (f0 - z)^2)/(
       f0^2 \[Lambda]^2)) \[Lambda]^2)/wi^2]) == 0 && z > 0 && 
  wi > 0 && f0 > 0, z, Reals]

This returns a conditional expression with the same assumptions that I have provided:

{{z -> ConditionalExpression[(
    f0 \[Pi]^2 wi^4)/(\[Pi]^2 wi^4 + f0^2 \[Lambda]^2), 
    wi > 0 && f0 > 0]}}

I know that I can simplify my conditional expression using some assumptions to get rid of this conditional expression wrapper, but this feels inelegant to me because it's not seeing the assumptions that I gave it in Solve[].

How do I get Mathematica to recognize the assumptions I gave it in Solve[]?

  • $\begingroup$ Oddly, Assuming[wi>0, Solve[...]] gets rid of the wi>0 in the conditional, but Assuming[wi>0 && f0>0, Solve[...]] doesn't get rid of the f0>0 $\endgroup$
    – Bill
    Commented Jul 8, 2021 at 20:43

1 Answer 1


The use of a new option Assumptions for Solve does the job:

Solve[(-f0 \[Pi]^2 wi^4 + \[Pi]^2 wi^4 z + 
f0^2 z \[Lambda]^2)/(f0 wi Sqrt[((z^2 + (\[Pi]^2 wi^4 (f0 - 
z)^2)/(f0^2 \[Lambda]^2)) \[Lambda]^2)/wi^2]) == 0 &&
z > 0, z, Reals, Assumptions -> wi > 0 && f0 > 0]

{{z -> (f0 \[Pi]^2 wi^4)/(\[Pi]^2 wi^4 + f0^2 \[Lambda]^2)}}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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