# Revision history [back]

How can I enter the previous obtained value of f in the e3 to know the h?

f,q,r,h,i,g = var('f q r h i g') e1 = 4 * f^2* q + 5 * f^2 * r - 4 * q^2 + 5fr - 3qr e2 = -1/5(20f^2hq + 20f^2iq + 40fgq + 40fhq - 8fq^2 - 20hq^2 - 20iq^2 + 50fgr + 100fhr + 50fir - 4q^2 + 25gr + 25hr - 50qr - 25r^2) e3 = - 1/5(40fghq + 40fh^2q + 40fgiq + 40fhiq + 25fh^2r + 50fhir + 25fi^2r + 20g^2q + 40ghq + 20h^2q - 8gq^2 - 16hq^2 - 8iq^2 + 25g^2r + 100ghr + 75h^2r + 50gir + 50hir - 5fqr - 50hqr - 50iqr - 25r^2)

for u in solve( e2 == 0, g ): eq3 = (e3).subs({g:u.rhs()})

print( solve(eq3==0, h) )

Similarly, in a fourth equation e4, how can I enter the previous obtained values of f and g in order to know i? 2 No.2 Revision

How can I enter the previous obtained value of f in the e3 to know the h?

f,q,r,h,i,g = var('f q r h i g')
e1 = 4 * f^2* q + 5 * f^2 * r - 4 * q^2 + 5fr - 3qr
5*f*r - 3*q*r
e2 = -1/5(20f^2hq + 20f^2iq + 40fgq + 40fhq - 8fq^2 - 20hq^2 - 20iq^2 + 50fgr + 100fhr + 50fir - 4q^2 + 25gr + 25hr - 50qr - 25r^2)
-1/5*(20*f^2*h*q + 20*f^2*i*q + 40*f*g*q + 40*f*h*q - 8*f*q^2 - 20*h*q^2 - 20*i*q^2 + 50*f*g*r + 100*f*h*r + 50*f*i*r - 4*q^2 + 25*g*r + 25*h*r - 50*q*r - 25*r^2)
e3 = - 1/5(40fghq + 40fh^2q +  40fgiq + 40fhiq + 25fh^2r + 50fhir + 25fi^2r + 20g^2q + 40ghq + 20h^2q - 8gq^2  - 16hq^2  - 8iq^2  + 25g^2r + 100ghr + 75h^2r + 50gir + 50hir - 5fqr - 50hqr - 50iqr - 25r^2) 1/5*(40*f*g*h*q + 40*f*h^2*q +  40*f*g*i*q + 40*f*h*i*q + 25*f*h^2*r + 50*f*h*i*r + 25*f*i^2*r + 20*g^2*q + 40*g*h*q + 20*h^2*q - 8*g*q^2  - 16*h*q^2  - 8*i*q^2  + 25*g^2*r + 100*g*h*r + 75*h^2*r + 50*g*i*r + 50*h*i*r - 5*f*q*r - 50*h*q*r - 50*i*q*r - 25*r^2)

for u in solve( e2 == 0, g ):
eq3 = (e3).subs({g:u.rhs()}) (e3).subs({g:u.rhs()})

print( solve(eq3==0, h) ))


Similarly, in a fourth equation e4, how can I enter the previous obtained values of f and g in order to know i?