Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
1

Graphing inequality on a number line?

asked 10 years ago

I can certainly get the solution set for x290, but how do I get this solution set visualized on a number line?

Preview: (hide)

Comments

1-d plots are not implemented - see http://trac.sagemath.org/ticket/9793

kcrisman gravatar imagekcrisman ( 10 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 10 years ago

tmonteil gravatar image

updated 10 years ago

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')
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 10 years ago

Seen: 670 times

Last updated: Aug 19 '14