# Sketching graphs

## Homework Statement

Suppose we define {x} to be the distance from x to the nearest integer.

a) Sketch the graph of f(x) = {x}
b) " g(x) = {2x}
c) " h(x) = {x} + 1/2{x}
d) " all points (x,y) which satisfy {x} + {y} = 1
e) " all points (x,y) which satisfy |x| + |y| = 1

n/a

## The Attempt at a Solution

I'm not sure how to begin this...

I don't understand when it says "{x} to be the distance from x to the nearest integer". (I'm not very good at English, I am an international student...)

Can anyone clarify what this is saying and provide some hints?

Related Precalculus Mathematics Homework Help News on Phys.org
Let x, be the a real variable. You know the graph of f(x)=x.
Define [x] to be the greatest integer function,ie, the greatest integer less than or equal to x. the function p(x)=[x] would come out as staircase like graph , try it and you'll get it.

then the graph for g(x)=f(x)-p(x)={x} should be simple. I worked it out and confirmed it.

HallsofIvy
Homework Helper
If x= 3.122 then the "nearest integer" is 3 and the "distance to the nearest integer" 3.122- 3= .122.

If x= 3.512 then the "nearest integer" is 4 and the "distance to the nearest integer" is 4- 3.512= 0.498.

Do you see why the "nearest integer" is one case is "3" and in the other is "4"?

ahhh... sorry, my mistake.

this calls upon the entire bandwagon of step functions. the greatest integer function, the least integer dunction and the fraction-part function. its still easy though.. the graphs can be found on google easy. only the function would now have some conditions.

sorry to have missed tht out.

HallsofIvy
Homework Helper
I am assuming that skeeterrr does is not familiar with 'step functions' to begin with.

Skeeterrr, just calculate values of f(x) for different values of x, plot the points on the graph and draw the graph from there.

What is the nearest integer to 1? Is it 0 and 2?
Or 1?

Last edited:
Does the graph look like a bunch of triangles on the x-axis???

yeah