z3 - Questions about using Z3Py online to apply the Routh-Hurwitz Theorem -


example 1:

enter image description here

we apply rh theorem using following code

k = real('k') print simplify(and(12 - 3*k >0 , 20 + 0.25*k >0)) 

and output is:

¬(k ≥ 4) ∧ ¬(k ≤ -80) 

example 2:

enter image description here

we apply rh theorem using following code

k, a1, a2, a3 = reals('k a1 a2 a3') a1 = 20 + 1.5*k a2 = 4 a3 = 4*k -100 print simplify(and(a1 > 0 , a3 > 0, a1*a2 > a3)) 

and output is

¬(k ≤ -40/3) ∧ ¬(k ≤ 25) ∧ ¬(k ≤ -90) 

example 3:

enter image description here

we apply rh theorem using following code

k = real('k') a1 = 10 a2 = 30 - 2.4*k a3 =  2 a4 = 100 + 5*k print simplify(and(a4 > 0, a1*a2*a3 > a3**2 + a4*a1**2)) 

and output is

¬(k ≤ -20) ∧ ¬(k ≥ -2351/137) 

example 4:

enter image description here

we apply rh theorem using following code

u, s, d, g, n, b , = reals('u s d g n b a') c1 = 2*u + s + d + g prove(implies(and(u > 0, s > 0, d >0, g >0), c1 > 0)) c2 = u*g + u**2 + s*u + 2*d*u + s*d + s*g + d*g c3 = d*u**2 - n*a*b*s + d*u*g + s*d*u + s*d*g prove(implies(and(u > 0, s > 0, d >0, g >0, >0, b > 0, n >0), c1*c2 > c3)) 

and output is:

proved proved 

the remanent rh condition : c3 > 0 leads to

enter image description here

example 5:

enter image description here

we apply rh theorem using following code

u, s1, s2, d, g, n, b , = reals('u s1 s2 d g n b a') c1 = d + 3*u + s1 + g + s2 prove(implies(and(u > 0, s1 > 0, s2 > 0, d >0, g >0), c1 > 0)) c2 = s2*g + 3*d*u + d*g + d*s1+ s1*s2 + 3*u**2 + 2*s2*u + 2*s1*u+ s1*g + 2*u*g + d*s2  c3 = 2*d*u*g + s1*u*g + 2*d*s2*u + 3*d*u**2 + d*g*s1 + s1*s2*g + u**3 + u*s2*g +  2*d*s1*u + s1*s2*u + g*u**2 + d*g*s2 + s1*u**2 + d*s1*s2 + s2*u**2 prove(implies(and(u > 0, s1 > 0, s2 >0, d >0, g >0, >0, b > 0, n >0), c3 > 0)) c4 = d*g*u**2 + d*s2*u**2 + s1*d*u*g + s1*d*s2*u + s1*d*s2*g - n*a*b*s1*s2 + d*u**3 +  s1*d*u**2 + d*u*s2*g prove(implies(and(u > 0, s1 > 0, s2 >0, d >0, g >0, >0, b > 0, n >0), c1*c2*c3 >  c3**2 + c4*c1**2)) 

and output is:

proved proved proved 

it can try online here.

the remanent rh condition : c4 > 0 leads to

enter image description here

questions:

  1. please let me know if know more efficient code kind of problems

  2. how simplify outputs examples 1, 2 , 3.

  3. for exampple 4, how solve c3 > 0 respect b using z3py , obtain formula ro

  4. for exampple 5, how solve c4 > 0 respect b using z3py , obtain formula ro

many thanks.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -