Skip to main content

Function

Function

A function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output.
Representation-
Cartesian product of 2 sets is mapping every element to every element of other set. It is generally represented as X A={"a","b"}, B={"y","z"} then A X B= {("a","y"),("a","z"),(b,y),(b,z)} Relation: A Relation R from a non-empty set A to a non empty set B is a subset of cartesian product A X B. n(A)= number of element in set A. n(B)= number of element in set B. Let 's say n(A)=p, n(B)=q n(A X B)=pq then no of relations possible from A to B is 2^pq A relation f from a set A to a set B is said to function if every element of set A has one and only one image in set B. Relation: A function f is X to Y then f: X->Y X is called domain set, Y is called range function. Functions are generally represented as f(x)
Let , f(x)=x3
It is said as f of x is equal to x cube.
Functions can also be represented by g(), t(),… etc.
Lets Work Out-
Example- Find the output of the function g(t)=6t2+5 at
(i) t = 0
(ii) t = 2
Solution- The given function is g(t)=6t2+5
(i) At t = 0, g(0)=6(0)2+5
    = 5
(ii) At t = 2, g(2)=6(2)2+5
    = 29
Types of Functions-
One-to-One function – It signifies that one element of a set is related to one element of the other set.
One-to-One Function
Many-to-One-function- It signifies that many elements of a set is related to one element of the other set.
Many-to-One Function
Note :
One-to-Many- A function cannot have a one to many relation ie. one element of a set cannot be related to more than one element of the other set.
One-to-Many Function
Vertical Line Test-
Vertical line test is used to determine whether a curve is a  function or not.
If any curve cuts a vertical line at more than one points then the curve is not a function.
 Vertical Line Test
Types of Functions-

Polynomial function-

A polynomial function can be expressed as :
f(x)=anxn+an−1xn−1+…..+a1x1+a0
The highest power in the expression is known as the degree of the polynomial function. The different types of polynomial functions based on the degree are:
  1. The polynomial function is called as Constant function if the degree is zero.
  2. The polynomial function is called as Linear if the degree is one.
  3. The polynomial function is Quadratic if the degree is two.
  4. The polynomial function is Cubic if the degree is three.

Constant Polynomial Functions

The polynomial of 0th degree where f(x) = f(0) = a0=c. Regardless of the input, the output always result in constant value. The graph for this is a horizontal line.
Constant Function

Linear Polynomial Functions

A linear polynomial function is a first degree polynomial where the input needs to be multiplied by m and added to c. It can be expressed by f(x) = mx + c.
For example, f(x) = 2x + 1 at x = 1
f(1) = 2.1 + 1 = 3
f(1) = 3
Linear Function

Quadratic Polynomial Functions

A Quadratic polynomial function is a second degree polynomial and it can be expressed as;
F(x) = ax 2 + bx + c, and a is not equal to zero.
Where a, b, c are constant and x is a variable.
Example, f(x) = 2x 2 + x – 1 at x = 2
If x = 2, f(2) = 2.2 2 + 2 – 1 = 9
Quadratic Function

Cubic Polynomial Function

A cubic polynomial function is a polynomial of degree three and can be expressed as;
F(x) = ax 3 + bx 2 + cx + d and a is not equal to zero.
Cubic Function

Algebraic Functions

A function that consists of a finite number of terms involving powers and roots of independent variable x and fundamental operations such as addition, subtraction, multiplication, and division is known as an algebraic equation.
For Example-
f(x)=5x3−2x2+3x+6, g(x)=3x+4√(x−1)2..
Rational functions, irrational functions and Polynomials functions are examples of algebraic functions.

Comments

Popular posts from this blog

OFFSET in Computer Science

OFFSET in Computer Science In the post, We will understand what is the meaning of OFFSET in computer science with an example. In computer science offset comes picture at may place like packing a data structure, encoding the data etc in some standard protocol so that other parties can deserialise it and understand the data. We will understand its important how does it work with example. suppose we have a data structure for a student like { name:string[20] roll: int[4] course: string[25] batch: int[4] } We want to serialise below student data  { name:"Amit Gupta" roll: 1234 course:Computer Science" batch: 2018 } Our protocol follow the rule that we will insert a value and if space will remain empty we will fill it with $ for example length of "Amit Gupta" is 10 but standard size is 20 so will fill 10 $ after "Amit Gupta". So serialisation of above data will be Amit Gupta$$$$$$$$$$1234Computer Sc...

Pointer In C Programming Language

Pointer In C Programming Language In this post, We will learn about pointer in C programming language. Introduction Pointers in C programming language is a variable that stores the memory address of another variable. A pointer in C is used to allocate memory dynamically i.e. at runtime. The pointer variable might be belonging to any of the data types such as int, float, char, double, short etc. Important Points About Pointer in C: Pointer stores the address of a variable whereas a normal variable stores the value.   The content of the C pointer always be a whole number i.e. address. Default C pointer is initialized to null, i.e. int *p = null. The value of the null pointer is 0. & symbol is used to get the address of the variable. * symbol is used to get the value of the variable that the pointer is pointing to. If a pointer in C is assigned to NULL, it means it is pointing to nothing. Two pointers can be subtracted to know how many elements are available...

Convert String To Byte Array in Python

Convert String To Byte Array in Python In this post, We will learn how to convert a string into a byte array in python programming language. def string_to_byte_array(string): byteArray = [] for c in string: byteArray = byteArray.append(ascii(c)) print (string_to_byte_array("Rozgardesh")) Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.