Plotting polynomial function in Python

--

what is polynomial functions ?

Polynomial functions are among the simplest, most important, and most commonly used mathematical functions. These functions consist of one or more terms of variables with whole number exponents

A polynomial function is a function such as a quadratic, a cubic, a quartic, and so on, involving only non-negative integer powers of x. We can give a general definition of a polynomial, and define its degree

for an example

f(x) = 4x³ — 3x² + 2

this function called as cubic polynomial because polynomial of degree 3,as 3 is the highest power of x formula

f(x) = 4x²− 2x− 4

This is called as a quadratic.which is a polynomial of degree 2, as 2 is the highest power of x.

lets plot simple function using python

ex : f(x) = x ² — 2x + 5

prerequisite

● numy

● matplotlib

code

this how the graph shows for this function

Lets see another complex polynomial function

ex : f(x) = x ³— 3x³ — 35x²+39x + 70

this how the graph shows for this function

This is how basic plotting polynomial using python lets see another artical for advance polynomial functions

source : http://www.mathcentre.ac.uk/resources/uploaded/mc-ty-polynomial-2009-1.pdf

--

--

Responses (2)