Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to make solve to use certain variables on the right side

if I have

I1, IR1, IR2, U1, R1, R2 = var('I1 IR1 IR2 U1 R1 R2')
equations = [
I1 == IR1 + IR2,
IR1 == U1/R1,
IR2 == U1/R2
]

how can I make solve to return

I == (R1 + R2)*U1/(R1*R2)

?

solve(equations, I)

now returns just an empty list

How to make solve to use certain variables on the right side

if I have

I1, IR1, IR2, U1, R1, R2 = var('I1 IR1 IR2 U1 R1 R2')
equations = [
I1 == IR1 + IR2,
IR1 == U1/R1,
IR2 == U1/R2
]

how can I make solve to return

I == (R1 + R2)*U1/(R1*R2)

?

solve(equations, I)

now returns just an empty list

or similait problem is with

I1, IC1, IC2, U1d, U2d, C1, C2 = var('I1, IC1, IC2, U1d, U2d, C1, C2')
equations = [
I1 == IC1 + IC2,
IC1 == C1*U1d,
IC2 == C2*U1d
]

and desired result is

I1 == (C1 + C2)*IC2/C2