per 4 Lavi, Shayan

181 days ago by slavi

First Semester: Functions (Part One)

    • Function: I believe that a function is an associated set of inputs to outputs. 

  • Domain: A domain is a set of values for which a function is defined. The domain is also commonly noted as the input! The domain would be considered the X.

  • Range: A range is a set of all of the output values in a function. The range would be considered the Y.

  • Composition: The composition of a function is basically a process through which you substitute an entire function into another funciton. These are most commonly used with (f) and (g).

  • Inverse: The inverse of a function is simply reversing the X's and Y's. It is known for "undoing" the function.

 
       

Function

I believe that a function is an associated set of inputs to outputs. 

Examples:

[factorial (x) for x in [0..10]] 
       
[1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]
[1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]
f(x) = x^2 + 30*x + 15 [f(x) for x in [0..10]] 
       
[15, 46, 79, 114, 151, 190, 231, 274, 319, 366, 415]
[15, 46, 79, 114, 151, 190, 231, 274, 319, 366, 415]

Domain

A domain is a set of values for which a function is defined. The domain is also commonly noted as the input! The domain would be considered the X.

Examples:

domain = [-15..15] [f(x) for x in domain] 
       
[-210, -209, -206, -201, -194, -185, -174, -161, -146, -129, -110, -89,
-66, -41, -14, 15, 46, 79, 114, 151, 190, 231, 274, 319, 366, 415, 466,
519, 574, 631, 690]
[-210, -209, -206, -201, -194, -185, -174, -161, -146, -129, -110, -89, -66, -41, -14, 15, 46, 79, 114, 151, 190, 231, 274, 319, 366, 415, 466, 519, 574, 631, 690]
[(x,f(x)) for x in domain] 
       
[(-15, -210), (-14, -209), (-13, -206), (-12, -201), (-11, -194), (-10,
-185), (-9, -174), (-8, -161), (-7, -146), (-6, -129), (-5, -110), (-4,
-89), (-3, -66), (-2, -41), (-1, -14), (0, 15), (1, 46), (2, 79), (3,
114), (4, 151), (5, 190), (6, 231), (7, 274), (8, 319), (9, 366), (10,
415), (11, 466), (12, 519), (13, 574), (14, 631), (15, 690)]
[(-15, -210), (-14, -209), (-13, -206), (-12, -201), (-11, -194), (-10, -185), (-9, -174), (-8, -161), (-7, -146), (-6, -129), (-5, -110), (-4, -89), (-3, -66), (-2, -41), (-1, -14), (0, 15), (1, 46), (2, 79), (3, 114), (4, 151), (5, 190), (6, 231), (7, 274), (8, 319), (9, 366), (10, 415), (11, 466), (12, 519), (13, 574), (14, 631), (15, 690)]
points([(x,f(x)) for x in domain]) 
       

 

Range

 A range is a set of all of the output values in a function. The range would be considered the Y.

 

Examples:

range = [-15..15] [f(x) for y in range] 
       
[690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690,
690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690,
690, 690, 690]
[690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, 690]
[(x,f(x)) for y in range] 
       
[(15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15,
690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690),
(15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15,
690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690),
(15, 690), (15, 690), (15, 690), (15, 690), (15, 690)]
[(15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690), (15, 690)]
points([(x,f(x)) for y in range]) 
       

 

Composition

The composition of a function is basically a process through which you substitute an entire function into another funciton. These are most commonly used with (f) and (g)s 

Examples:

g(x) = 1/4*x - 3/10 g 
       
x |--> 1/4*x - 3/10
x |--> 1/4*x - 3/10
f(g(x)) 
       
1/400*(5*x - 6)^2 + 15/2*x + 6
1/400*(5*x - 6)^2 + 15/2*x + 6
g(f(x)) 
       
1/4*x^2 + 15/2*x + 69/20
1/4*x^2 + 15/2*x + 69/20
[f(x) for x in [0..5]] 
       
[15, 46, 79, 114, 151, 190]
[15, 46, 79, 114, 151, 190]
[g(x) for x in _] 
       
[69/20, 56/5, 389/20, 141/5, 749/20, 236/5]
[69/20, 56/5, 389/20, 141/5, 749/20, 236/5]

Inverse

The inverse of a function is simply reversing the X's and Y's. It is known for "undoing" the function.

Examples:

F = [(x,f(x)) for x in domain] [(y,x) for (x,y) in F] 
       
[(-210, -15), (-209, -14), (-206, -13), (-201, -12), (-194, -11), (-185,
-10), (-174, -9), (-161, -8), (-146, -7), (-129, -6), (-110, -5), (-89,
-4), (-66, -3), (-41, -2), (-14, -1), (15, 0), (46, 1), (79, 2), (114,
3), (151, 4), (190, 5), (231, 6), (274, 7), (319, 8), (366, 9), (415,
10), (466, 11), (519, 12), (574, 13), (631, 14), (690, 15)]
[(-210, -15), (-209, -14), (-206, -13), (-201, -12), (-194, -11), (-185, -10), (-174, -9), (-161, -8), (-146, -7), (-129, -6), (-110, -5), (-89, -4), (-66, -3), (-41, -2), (-14, -1), (15, 0), (46, 1), (79, 2), (114, 3), (151, 4), (190, 5), (231, 6), (274, 7), (319, 8), (366, 9), (415, 10), (466, 11), (519, 12), (574, 13), (631, 14), (690, 15)]
points([(y,x) for (x,y) in F])