Plotting using ImplicitEquations

There is a small bug that is being addressed in v1.0.4 (being tagged now). Until then, the use of

cond1 = (λ1, λ2) -> I2(λ1, λ2)/I1(λ1, λ2) - 0.762 * I1(λ1, λ2) + 9.22 >= 0

and later cond1 ⩵ 0 should just be:

cond1 = (λ1, λ2) -> I2(λ1, λ2)/I1(λ1, λ2) - 0.762 * I1(λ1, λ2) + 9.22

and then cond1 ⩵ 0, as then both or would work as you want:

using Plots, LaTeXStrings
using ImplicitEquations #v1.0.4

I1 = (λ1, λ2) -> λ1^2 + λ2^2 + 1/(λ2^2 * λ1^2 )
I2 = (λ1, λ2) -> 0.5 * (I1(λ1, λ2)^2 - (λ1^4 + λ2^2 + 1/(λ2^4 * λ1^4 )))
cond1 = (λ1, λ2) -> I2(λ1, λ2)/I1(λ1, λ2) - 0.762 * I1(λ1, λ2) + 9.22 
cond2 = (λ1, λ2) -> I2(λ1, λ2)/I1(λ1, λ2)^2 + 0.0129 * I1(λ1, λ2) - 0.42 
cond3 = (λ1, λ2) -> I2(λ1, λ2)/I1(λ1, λ2) - 0.2515 * I1(λ1, λ2) + 0.1477 

l2l1 = (λ1, λ2) -> λ2 - λ1
l1l2 = (λ1, λ2) -> λ2 - λ1^(-0.5)
result = (cond1 ⩵ 0) & (cond2 ⩵ 0)  & (l2l1 ⩵ 0) & (l1l2 ⩵ 0) | (cond3 ⩵ 0)
result = (((cond1 ≫ 0) & (cond2 ≪ 0)) | (cond3 ≫ 0)) & (l2l1 ≪ 0) & (l1l2 ≫ 0)
plot(result, xlims=(1, 6), ylims=(0, 6))
5 Likes