Revision history [back]

Use a symbolic solved variable in another later equation

So I just started using sage but I can't find this (or I don't know how to formulate it).

I have an equation that I solved and I want to use that solved variable in a new equation:

a, b, c, d = var('a b c d') eq1=a+b==d eq2=solve([eq1],b) eq3=c/eq2

but this doesn't work and of course I can do c/b but then it just gives me c/b and I want c/(d-a) as an answer.

 2 No.2 Revision tmonteil 24838 ●29 ●176 ●462 http://wiki.sagemath.o...

Use a symbolic solved variable in another later equation

So I just started using sage but I can't find this (or I don't know how to formulate it).

I have an equation that I solved and I want to use that solved variable in a new equation:

a, b, c, d = var('a b c d')
eq1=a+b==d
eq2=solve([eq1],b)
eq3=c/eq2eq3=c/eq2


but this doesn't work and of course I can do c/b but then it just gives me c/b and I want c/(d-a) as an answer.