| 1 | initial version |
Assuming that eq1 is E1[0,0].expr().expand() == 0, what about
sage: eq1.subs({diff(a.expr(),t): h*a.expr()})
3*h^2 - Lambda + 3*k/a(t)^2 == 0
Alternatively, you may want to keep h being a function of t:
sage: eq1.subs({diff(a.expr(),t): function('h')(t)*a.expr()})
3*h(t)^2 - Lambda + 3*k/a(t)^2 == 0
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.