Functions defined by parts

A function defined by parts is a function whose analytic expression is not unique but rather it depends on the value of the independent variable.

Example

The function f(x)={x1 if x33 if 1<x<1x2 if x1={x1 if x(,3]3 if x(1,1)x2 if x[1,+] It is a function defined by parts.

To find the image of an element x we need to take into account at what interval it belongs to and replace it in the analytic expression corresponding to this interval.

Example

In the previous case for example,

  • if x=4, we substitute in f(x)=x1 and obtain f(4)=3
  • if x=2, the image is not defined since 2 does not belong to any interval of the function.
  • if x=0.5, we substitute in f(x)=3 obtaining f(0.5)=3
  • if we x=1 substitute in f(X)=x2 obtaining f(1)=1

Since each of the expressions of the parts are defined in some domain, the domain of the function f(x) is the union of the intervals of the parts of the function. Dom(f)=(,3](1,1)[1,+)=(,3](1,+) If we look now at the graph of the previous function, we can observe that Im(f)=[1,+):

imagen

Let's see some examples of functions defined by parts:

Example

Consider the function f(x)={1 if x22 if x>2.

Its graph is the union of the graphs of the functions f(x)=1 for x2 and f(x)=2 for x>2.

The graphic representation would be:

imagen

Example

Consider the function f(x)={x if x1x2 if 1<x<1x if x1

This time its graph will be the union of a straight line, a parable and another straight line, with each one defined where it is indicated in the definition of the function.

imagen

Example

f(x)={2x1 if x<1x+3 if x>1

and if we want to evaluate at x=1 in this example we will obtain:f(1)=f1(1)=2(1)=2(1)1=21=3

Example

f(x)={x1 if x<3x2+1 if 3≤<03 if 0x100ln(x+ex) if x>100

and if we want to evaluate at x=1 in this example we will obtain: f(1)=f2(1)=(1)2+1=1+1=2

Example

The following example is not a function by parts since the sets of the definition are not disjoint: f(x)={x if x<0x+1 if 1<x<23 if x2

since for points in (1,0) it would be necessary to evaluate the function at f1(x)=x and at f2(x)=x+1, and thus we would obtain two different values for only one point and this would not be a function.