Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Simplify to real and positive numbers

eng8 = [solve(eng==(k-1)*md*Vm1^2/(2*Patm*Vs*((Pc-(P2*s6))-(Pc-(P2*s6))^(1/k))),Vm1) for s6 in srange(r9,r10,s5,include_endpoint=1)]
v4=[v[0].rhs().n() for v in eng8]
v5=[v for v in v4 if v >= 0]

I can't seem to get v5 to output both real and positive numbers, only an empty list. All the inputs are positive, and I know the square root of the squared gives both positive and negative output. Any help?