# Revision history [back]

### Solve for variable but variable is still in answer

I try to solve for variable P3. Sage gives me an answer for P3 but it still contains P3 on the right hand side?

sage: A1, A2, A3, P1, P2, P3, u1, u2, u3, r1, r2, r3, g, C, M1, M2, M3 = var('A1 A2 A3 P1 P2 P3 u1 u2 u3 r1 r2 r3 g C M1 M2 M3') sage: eq1=A3(P1-P3)==A3r3u3^2-(A2r2u2^2+A1r1u1^2) sage: eq5a=solve([eq2],r3) sage: eq5b=u3^2+2g/(g-1)(P3/(eq5a[0].rhs()))-2C==0 sage: eq6=solve([eq5b],u3) sage: eq7a=eq1/A3 sage: eq7b=eq7a.subs(-A3r3u3^2 == -(A2u2r2+A1r1u1)u3) sage: eq7b P1 - P3 == -(A1r1u1^2 + A2r2u2^2 + (A3P3g + sqrt(A3^2P3^2g^2 + 2((g^2 - 2g + 1)A1^2r1^2u1^2 + 2(g^2 - 2g + 1)A1A2r1r2u1u2 + (g^2 - 2g + 1)A2^2r2^2u2^2)C))(A1r1u1 + A2r2u2)/(A1(g - 1)r1u1 + A2(g - 1)r2u2))/A3

sage: eq7c=eq7b.subs(u3==eq6[0].rhs()) #this equation should have multiple answers+_, but it does not have multiple sage: eq7=solve([eq7c],P3)

sage: eq7 [P3 == (A1r1u1^2 + A2r2u2^2 + A3P1 - (A1r1u1^2 + A2r2u2^2 + A3P1)g - sqrt(A3^2P3^2g^2 + 2((g^2 - 2g + 1)A1^2r1^2u1^2 + 2(g^2 - 2g + 1)A1A2r1r2u1u2 + (g^2 - 2g + 1)A2^2r2^2u2^2)*C))/A3]

### Solve for variable but variable is still in answer

I try to solve for variable P3. Sage gives me an answer for P3 but it still contains P3 on the right hand side?

sage: A1, A2, A3, P1, P2, P3, u1, u2, u3, r1, r2, r3, g, C, M1, M2, M3 = var('A1 A2 A3 P1 P2 P3 u1 u2 u3 r1 r2 r3 g C M1 M2 M3')
sage: eq1=A3(P1-P3)==A3r3u3^2-(A2r2u2^2+A1r1u1^2)
eq1=A3*(P1-P3)==A3*r3*u3^2-(A2*r2*u2^2+A1*r1*u1^2)
sage: eq5a=solve([eq2],r3)
sage: eq5b=u3^2+2g/(g-1)(P3/(eq5a[0].rhs()))-2C==0
eq5b=u3^2+2*g/(g-1)*(P3/(eq5a[0].rhs()))-2*C==0
sage: eq6=solve([eq5b],u3)
sage: eq7a=eq1/A3
sage: eq7b=eq7a.subs(-A3r3u3^2 eq7b=eq7a.subs(-A3*r3*u3^2 == -(A2u2r2+A1r1u1)u3)
-(A2*u2*r2+A1*r1*u1)*u3)
sage: eq7b
P1 - P3 == -(A1r1u1^2 -(A1*r1*u1^2 + A2r2u2^2 A2*r2*u2^2 + (A3P3g (A3*P3*g + sqrt(A3^2P3^2g^2 sqrt(A3^2*P3^2*g^2 + 2((g^2 2*((g^2 - 2g 2*g + 1)A1^2r1^2u1^2 1)*A1^2*r1^2*u1^2 + 2(g^2 2*(g^2 - 2g 2*g + 1)A1A2r1r2u1u2 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2g 2*g + 1)A2^2r2^2u2^2)C))(A1r1u1 1)*A2^2*r2^2*u2^2)*C))*(A1*r1*u1 + A2r2u2)/(A1(g A2*r2*u2)/(A1*(g - 1)r1u1 1)*r1*u1 + A2(g A2*(g - 1)r2u2))/A31)*r2*u2))/A3
sage: eq7c=eq7b.subs(u3==eq6[0].rhs()) #this equation should have multiple answers+_, but it does not have multiple
sage: eq7=solve([eq7c],P3)eq7=solve([eq7c],P3)
sage: eq7
[P3 == (A1r1u1^2 (A1*r1*u1^2 + A2r2u2^2 A2*r2*u2^2 + A3P1 A3*P1 - (A1r1u1^2 (A1*r1*u1^2 + A2r2u2^2 A2*r2*u2^2 + A3P1)g A3*P1)*g - sqrt(A3^2P3^2g^2 sqrt(A3^2***P3**^2*g^2 + 2((g^2 2*((g^2 - 2g 2*g + 1)A1^2r1^2u1^2 1)*A1^2*r1^2*u1^2 + 2(g^2 2*(g^2 - 2g 2*g + 1)A1A2r1r2u1u2 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2g 2*g + 1)A2^2r2^2u2^2)*C))/A3]1)*A2^2*r2^2*u2^2)*C))/A3]


### Solve for variable but variable is still in answer

I try to solve for variable P3. Sage gives me an answer for P3 but it still contains P3 on the right hand side?

sage: A1, A2, A3, P1, P2, P3, u1, u2, u3, r1, r2, r3, g, C, M1, M2, M3 = var('A1 A2 A3 P1 P2 P3 u1 u2 u3 r1 r2 r3 g C M1 M2 M3')
sage: eq1=A3*(P1-P3)==A3*r3*u3^2-(A2*r2*u2^2+A1*r1*u1^2)
sage: eq5a=solve([eq2],r3)
sage: eq5b=u3^2+2*g/(g-1)*(P3/(eq5a[0].rhs()))-2*C==0
sage: eq6=solve([eq5b],u3)
sage: eq7a=eq1/A3
sage: eq7b=eq7a.subs(-A3*r3*u3^2 == -(A2*u2*r2+A1*r1*u1)*u3)
sage: eq7b
P1 - P3 == -(A1*r1*u1^2 + A2*r2*u2^2 + (A3*P3*g + sqrt(A3^2*P3^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))*(A1*r1*u1 + A2*r2*u2)/(A1*(g - 1)*r1*u1 + A2*(g - 1)*r2*u2))/A3

sage: eq7c=eq7b.subs(u3==eq6[0].rhs()) #this equation should have multiple answers+_, but it does not have multiple
sage: eq7=solve([eq7c],P3)
sage: eq7
[P3 == (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1 - (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1)*g - sqrt(A3^2***P3**^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))/A3]


### Solve for variable but variable is still in answer

I try to solve for variable P3. Sage gives me an answer for P3 but it still contains P3 on the right hand side?

sage: A1, A2, A3, P1, P2, P3, u1, u2, u3, r1, r2, r3, g, C, M1, M2, M3 = var('A1 A2 A3 P1 P2 P3 u1 u2 u3 r1 r2 r3 g C M1 M2 M3')
sage: eq1=A3*(P1-P3)==A3*r3*u3^2-(A2*r2*u2^2+A1*r1*u1^2)
sage: eq5a=solve([eq2],r3)
sage: eq5b=u3^2+2*g/(g-1)*(P3/(eq5a[0].rhs()))-2*C==0
sage: eq6=solve([eq5b],u3)
sage: eq7a=eq1/A3
sage: eq7b=eq7a.subs(-A3*r3*u3^2 == -(A2*u2*r2+A1*r1*u1)*u3)
sage: eq7b
P1 - P3 == -(A1*r1*u1^2 + A2*r2*u2^2 + (A3*P3*g + sqrt(A3^2*P3^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))*(A1*r1*u1 + A2*r2*u2)/(A1*(g - 1)*r1*u1 + A2*(g - 1)*r2*u2))/A3

sage: eq7c=eq7b.subs(u3==eq6[0].rhs())
sage: eq7=solve([eq7c],P3)
sage: eq7
[P3 == (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1 - (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1)*g - sqrt(A3^2***P3**^2*g^2 sqrt(A3^2*P3^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))/A3]


### Solve for variable but variable is still in answer

I try to solve for variable P3. Sage gives me an answer for P3 but it still contains P3 on the right hand side?side (see last equation after the solve in the beginning of sqrt?

sage: A1, A2, A3, P1, P2, P3, u1, u2, u3, r1, r2, r3, g, C, M1, M2, M3 = var('A1 A2 A3 P1 P2 P3 u1 u2 u3 r1 r2 r3 g C M1 M2 M3')
sage: eq1=A3*(P1-P3)==A3*r3*u3^2-(A2*r2*u2^2+A1*r1*u1^2)
sage: eq5a=solve([eq2],r3)
sage: eq5b=u3^2+2*g/(g-1)*(P3/(eq5a[0].rhs()))-2*C==0
sage: eq6=solve([eq5b],u3)
sage: eq7a=eq1/A3
sage: eq7b=eq7a.subs(-A3*r3*u3^2 == -(A2*u2*r2+A1*r1*u1)*u3)
sage: eq7b
P1 - P3 == -(A1*r1*u1^2 + A2*r2*u2^2 + (A3*P3*g + sqrt(A3^2*P3^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))*(A1*r1*u1 + A2*r2*u2)/(A1*(g - 1)*r1*u1 + A2*(g - 1)*r2*u2))/A3

sage: eq7c=eq7b.subs(u3==eq6[0].rhs())
sage: eq7=solve([eq7c],P3)
sage: eq7
[P3 == (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1 - (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1)*g - sqrt(A3^2*P3^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))/A3]


### Solve for variable but variable is still in answer

I try to solve for variable P3. Sage gives me an answer for P3 but it still contains P3 on the right hand side (see last equation after the solve in the beginning of sqrt?

sage: A1, A2, A3, P1, P2, P3, u1, u2, u3, r1, r2, r3, g, C, M1, M2, M3 = var('A1 A2 A3 P1 P2 P3 u1 u2 u3 r1 r2 r3 g C M1 M2 M3')
sage: eq1=A3*(P1-P3)==A3*r3*u3^2-(A2*r2*u2^2+A1*r1*u1^2)
sage: eq2=A3*u3*r3==A2*u2*r2+A1*r1*u1
sage: eq5a=solve([eq2],r3)
sage: eq5b=u3^2+2*g/(g-1)*(P3/(eq5a[0].rhs()))-2*C==0
sage: eq6=solve([eq5b],u3)
sage: eq7a=eq1/A3
sage: eq7b=eq7a.subs(-A3*r3*u3^2 == -(A2*u2*r2+A1*r1*u1)*u3)
sage: eq7b
P1 - P3 == -(A1*r1*u1^2 + A2*r2*u2^2 + (A3*P3*g + sqrt(A3^2*P3^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))*(A1*r1*u1 + A2*r2*u2)/(A1*(g - 1)*r1*u1 + A2*(g - 1)*r2*u2))/A3

sage: eq7c=eq7b.subs(u3==eq6[0].rhs())
sage: eq7=solve([eq7c],P3)
sage: eq7
[P3 == (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1 - (A1*r1*u1^2 + A2*r2*u2^2 + A3*P1)*g - sqrt(A3^2*P3^2*g^2 + 2*((g^2 - 2*g + 1)*A1^2*r1^2*u1^2 + 2*(g^2 - 2*g + 1)*A1*A2*r1*r2*u1*u2 + (g^2 - 2*g + 1)*A2^2*r2^2*u2^2)*C))/A3]