Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

I seem to be confused on how to properly calculate domain and range. Here are a few examples attached. Can someone break this down for me in simple terms? I have not done math for over 25 years and have forgotten most everything :( Thanks

Functions.PNG

Functions.PNG

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

One of the best ways to understand these problems is to sketch the function.

You might note that the first one goes on forever, positive and negative, x and y.

The second one gets weird at zero.

The third has problems with negative numbers and zero.

And so on .....

Are there any problematic values for x? Can you put in -100, 0, and +100? How about -1000000 and +1000000?

Are there any values of y that are not possible to generate?

When you answer those questions (for all four functions) you will know the domain and range.

The domain is the range of values for X that give valid results for the function. It should be obvious that it is easier to find what is NOT in the domain than what IS in the range. So figure out all of the invalid (undefined) results, figure out what values of X gave you those results, and the range is everything except those values of X.

I'm assuming that you are dealing in the real number system, so "everything except" is the real number system less those values that you found that yield invalid results.

The range is the set of results that you will get for all of the values in the domain. D-glitch makes a good suggestion to graph the function. This should let you see what sorts of results you can get for each function.

An example of the domain and range for a different function may be helpful.

Consider F(X)=X*X. Is there any value for X (in the real number system) for which X*X gives an undefined value? No. Therefore the domain is -infinity<=X<=+infinity.

What will the graph of this function look like? At -infinity the result is +infinity(squared). At +infinity the result is also +infinity(squared). At 0 the result is 0. The function will look somewhat like the letter U with the base at (0,0). The result never drops below 0, therefore the range is 0<=F(X)<=+infinity. (I'm considering +infinity(squared) to be the same as +infinity here.)

What is the range, R, of the function Image f(x) = x

------

|x|

So this tells me that the range should be all positive numbers but what is the domain?

For the range, Is there any way to get f(x)=2?

Can you think of any other numbers that are or are not in the range?

Try evaluating it at x = -2 -1 +1 +2 and +100.

And think about evaluating it x = 0

For positive x, |x| = x, so we have f(x) = x / x for x > 0

For negative x, |x| = -x, so we have f(x) = x / -x for x < 0

This leaves x=0, where |x| = 0, but you can't divide by 0, so 0 is not part of the domain of f(x)

So if you take all the possible values of x / x for x > 0, together with all the possible values of x / -x for x < 0

you will have all the possible values of f(x)

One method is what I suggested earlier.

f(X)=sqrt(X)

What values of X (in the real number system) don't give a valid answer for sqrt(X)? The domain is everything in the real number system excluding those values.

Once you get that answer, look at what sqrt(X) will equal for that domain. Try the lowest value of the domain, the largest value, and something inbetween and that will give you some clues.

"They are the numbers that I plugged in."

You plugged in 5/-20 for X/|X|. That is using X=5 on top and X=-20 on the bottom. X has to be the same in ALL places in the function.

That is:

f(5)=5/|5|

f(-20)=-20/|-20|

ozo made a VERY significant comment: "but you can't divide by 0". That is one example of how you would exclude a number from the domain. If a number would cause a function to have a divide by zero, that number is NOT in the domain!

That's not the only example, but a very significant one.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trialIf different values for the top and bottom were allowed, they would have been different variables, such as:

f(X,Y)=X/|Y|

You would then have a domain for X, a domain for Y, and a two-dimensional range for X,Y.

Math / Science

From novice to tech pro — start learning today.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

Range would be the possible values of f(x)