1 | initial version |
If you look at the documentation of solve
function:
sage: solve?
you will see e few options, in particular to_poly_solve
.
If you do :
sage: S = solve(UU_I==0, I, to_poly_solve=True) ; S
[I == (7/3)]
Now, to extract the 7/3 value, you should beter get a list of dictionnaries than a list of expressions:
sage: S = solve(UU_I==0, I, to_poly_solve=True, solution_dict=True) ; S
[{I: 7/3}]
Now it is easy to extract the solution:
sage: S[0][I]
7/3
And to evaluate UU
on this value :
sage: UU(S[0][I])
2.14087209644419
Which looks consistent with the plot:
sage: plot(UU,I,-10,10)
2 | No.2 Revision |
If you look at the documentation of solve
function:
sage: solve?
you will see e few options, in particular to_poly_solve
.
If you do :
sage: S = solve(UU_I==0, I, to_poly_solve=True) ; S
[I == (7/3)]
Now, to extract the 7/3 value, you should beter get a list of dictionnaries than a list of expressions:
sage: S = solve(UU_I==0, I, to_poly_solve=True, solution_dict=True) ; S
[{I: 7/3}]
Now it is easy to extract the solution:
sage: S[0][I]
7/3
7/3
And to evaluate UU
on this value :
sage: UU(S[0][I])
2.14087209644419
Which looks consistent with the plot:
sage: plot(UU,I,-10,10)
3 | No.3 Revision |
If you look at the documentation of solve
function:
sage: solve?
you will see e few options, in particular to_poly_solve
.
If you do :
sage: S = solve(UU_I==0, I, to_poly_solve=True) ; S
[I == (7/3)]
Now, to extract the 7/3 value, you should beter get a list of dictionnaries than a list of expressions:
sage: S = solve(UU_I==0, I, to_poly_solve=True, solution_dict=True) ; S
[{I: 7/3}]
Now it is easy to extract the solution:
sage: S[0][I]
7/3
And to evaluate UU
on this value :
sage: UU(S[0][I])
2.14087209644419
Which looks consistent with the plot:
sage: plot(UU,I,-10,10)
By the way, instead of defining U= X^.5
you should better directly use the sqrt
function.