1 | initial version |
You can get the characteristic function of the solution set as follows:
sage: s = solve(x^2 - 9 >= 0, x)
sage: f = lambda t : min(1, sum([bool(i[0](t)) for i in s]))
and the plot it to see the solution set:
sage: plot(f,-10,10)
2 | No.2 Revision |
You can get the characteristic function of the solution set (which is a list of lists of symbolic elements) as follows:
sage: s = solve(x^2 - 9 >= 0, x)
sage: f = lambda t : min(1, sum([bool(i[0](t)) for i in s]))
and the plot it to see the solution set:
sage: plot(f,-10,10)
3 | No.3 Revision |
You can get the characteristic function of the solution set (which is a list of lists of symbolic elements) as follows:
sage: s = solve(x^2 - 9 >= 0, x)
sage: f = lambda t : min(1, sum([bool(i[0](t)) for i in s]))
and the then plot it to see the solution set:
sage: plot(f,-10,10)
4 | No.4 Revision |
You can get the characteristic function of the solution set (which is a list of lists of symbolic elements) as follows:
sage: s = solve(x^2 - 9 >= 0, x)
sage: f = lambda t : min(1, sum([bool(i[0](t)) for i in s]))
and then plot it to see the solution set:
sage: plot(f,-10,10)
or even:
sage: plot(f,-10,10, fill='axis')