Ask Your Question

Revision history [back]

Trouble with subs

I have this code:

var("L E t c")
D=(1-c)*(L+3*E)
Dt=D-t*E
Dt_E=Dt*E;
Dt_E=Dt_E.expand()
print(Dt_E.subs(E*L==1/2, E*E==-1/6, L*L==-1/2, E*L*c==c*1/2))

I get:

-E*L*c + 1/2*c + 1/6*t

I get the same if I drop the last equality. What do I have to do for ELc to be replaced by c/2?