How do I graph the function $\lceil x^2\rceil$ (this is ceiling not just brackets). Any explanation is appreciated so I can understand how to!
2 Answers
Note that $$x^2 < 1 \iff |x| < 1$$
and likewise, $$x^2 < 2 \iff |x| < \sqrt{2}$$
More generally, $x^2 < n \iff |x| < \sqrt{n}$. So the function is piecwise constant, taking on the value $n$ whenever $\sqrt{n - 1} < |x| \le \sqrt{n}$ (for $n > 0$).
So for example, it's equal to $1$ between $-1$ and $1$ (except at $0$, of course), equal to $2$ on $[-\sqrt{2}, -1) \cup (1, \sqrt{2}]$, and so on.
Remember that the ceiling function rounds a real number up to the next integer. So, the range of your function will only consist of integers.
Sketch the parabola $y = x^2$ (preferably on graph paper) and "push" points on the curve up to the next integer height. You end up with a parabolic staircase, where the "rise" between steps is always $\pm 1$, but the "run" gets shorter as you move away from the vertex of the parabola.
- 25,273
-
But how do I graph this? Rather than the vertex at 0,0 I move the vertex to 0,1? – tony Nov 07 '13 at 22:47
-
No. Since $f(0) = \lceil 0 \rceil = 0$, the origin is on the graph. Now for all $x > 0$ and $x \le 1$, $f(x) = \lceil x^2 \rceil = 1$. The graph consists of horizontal segments (the "steps") at integer heights. – Sammy Black Nov 07 '13 at 23:02
-
Look at the answer of T. Bongers. – Sammy Black Nov 07 '13 at 23:02
-
http://www.wolframalpha.com/input/?i=Plot%5BCeiling%5Bx%5E2%5D%2C+%7Bx%2C+-2%2C+2%7D%2C+%7By%2C+0%2C+4%7D%5D&x=7&y=10 – Sammy Black Nov 07 '13 at 23:10
-
Here's the graph with the two parabolas that bound the graph: http://m.wolframalpha.com/input/?i=Plot%5B%7BCeiling%5Bx%5E2%5D%2C+x%5E2%2C+x%5E2+%2B+1%7D%2C+%7Bx%2C+-2%2C+2%7D%2C+%7By%2C+0%2C+4%7D%5D&x=10&y=12 – Sammy Black Nov 07 '13 at 23:15
-
thank you that second graph made it clear for me! thanks! – tony Nov 08 '13 at 07:11
-
You can upvote the answer and select it if you like it. – Sammy Black Nov 08 '13 at 08:41