1 | initial version |

I'm not completely sure what you ask for, but here is my best guess:

```
f,q,r,h,i,g = var('f q r h i g')
for t in solve( 4 * f^2* q + 5 * f^2 * r - 4 * q^2 + 5*f*r - 3*q*r == 0, f ):
eq = (-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)).subs({f:t.rhs()})
print( solve(eq==0, g) )
```

Does it answer your question?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.