Write the equation of a function with domain and range given, how to do that?

The domain is #{-5<= x <= 5}#
The range is #{0<= y <= 5}#
How to do I determine the equation with these two things given?

1 Answer
Mar 16, 2016

#f(x) = sqrt(25-x^2)#

Explanation:

One method is to construct a semicircle of radius #5#, centered at the origin.

The equation for a circle centered at #(x_0, y_0)# with radius #r# is given by #(x-x_0)^2+(y-y_0)^2=r^2#.
Substituting in #(0,0)# and #r=5# we obtain #x^2+y^2=25# or #y^2 = 25-x^2#
Taking the principal root of both sides gives #y = sqrt(25-x^2)#, which fulfills the desired conditions.

graph{sqrt(25-x^2) [-10.29, 9.71, -2.84, 7.16]}


Note that the above only has a domain of #[-5,5]# if we restrict ourselves to the real numbers #RR#. If we allow for complex numbers #CC#, the domain becomes all of #CC#.

By the same token, however, we can simply define a function with the restricted domain #[-5,5]# and in that manner create infinitely many functions which fulfill the given conditions.

For example, we can define #f# as a function from #[-5,5]# to #RR# where #f(x) = 1/2x+5/2#. Then the domain of #f# is, by definition, #[-5,5]# and the range is #[0,5]#

If we are allowed to restrict our domain, then with a little manipulation, we can construct polynomials of degree #n#, exponential functions, logarithmic functions, trigonometric functions, and others which do not fall into any of those categories, all of which have domain #[-5,5]# and range #[0,5]#