Questions tagged [polynomials]

In mathematics, a polynomial is an expression consisting of variables (or indeterminates) and coefficients, that involves only the operations of addition, subtraction, multiplication, and non-negative integer exponents.

In mathematics, a polynomial is an expression consisting of variables (or indeterminates) and coefficients, that involves only the operations of addition, subtraction, multiplication, and non-negative integer exponents.

An example of a polynomial of a single indeterminate (or variable), x, is x2 − 4x + 7, which is a quadratic polynomial.

Polynomials appear in a wide variety of areas of mathematics and science. For example, they are used to form polynomial equations, which encode a wide range of problems, from elementary word problems to complicated problems in the sciences; they are used to define polynomial functions, which appear in settings ranging from basic chemistry and physics to economics and social science; they are used in calculus and numerical analysis to approximate other functions. In advanced mathematics, polynomials are used to construct polynomial rings and algebraic varieties, central concepts in algebra and algebraic geometry.

Wikipedia: http://en.wikipedia.org/wiki/Polynomial

782 questions
57
votes
1 answer

In R formulas, why do I have to use the I() function on power terms, like y ~ I(x^3)

I'm trying to get my head around the use of the tilde operator, and associated functions. My 1st question is why does I() need to be used to specify arithmetic operators? For example, these 2 plots generate different results (the former having a…
ChrisW
  • 4,641
  • 6
  • 48
  • 82
28
votes
2 answers

What does the capital letter "I" in R linear regression formula mean?

I haven't been able to find an answer to this question, largely because googling anything with a standalone letter (like "I") causes issues. What does the "I" do in a model like this? data(rock) lm(area~I(peri - mean(peri)), data =…
Nancy
  • 3,849
  • 4
  • 24
  • 47
15
votes
5 answers

Cannot understand with sklearn's PolynomialFeatures

Need help in sklearn's Polynomial Features. It works quite well with one feature but whenever I add multiple features, it also outputs some values in the array besides the values raised to the power of the degrees. For ex: For this…
TechieBoy101
  • 192
  • 1
  • 1
  • 13
13
votes
2 answers

Fast factorization of polynomial with integers coefficients

I want to fast decompose polynomial over ring of integers (original polynomial has integer coefficients and all of factors have integer coefficients). For example I want to decompose 4*x^6 + 20*x^5 + 29*x^4 - 14*x^3 - 71*x^2 - 48*x as (2*x^4 + 7*x^3…
petRUShka
  • 9,231
  • 12
  • 54
  • 86
11
votes
2 answers

Roots of a polynomial mod a prime

I'm looking for a speedy algorithm to find the roots of a univariate polynomial in a prime finite field. That is, if f = a0 + a1x + a2x2 + ... + anxn (n > 0) then an algorithm that finds all r < p satisfying f(r) = 0 mod p, for a given prime p. I…
Kevin Johnson
  • 710
  • 7
  • 23
10
votes
1 answer

How to rewrite an expression in terms of an other expression in sympy

EDIT: I am not asking how to solve an equation in terms of a given variable (as in this supposed duplicated question), but how to represent an expression in terms of an other one, as specified in the question. I believe it is the "duplicated"…
Antonello
  • 3,974
  • 2
  • 20
  • 44
10
votes
2 answers

Ratio of polynomials approximation

I am trying to fit a polynomial to my dataset, which looks like that (full dataset is at the end of the post): The theory predicts that the formulation of the curve is: which looks like this (for x between 0 and 1): When I try to make a linear…
marco11
  • 225
  • 2
  • 8
10
votes
4 answers

Map which allows to provide the equals-comparator and the hashing function separately

While trying to model polynomials, in particular their multiplication, I run into the following problem. During the multiplication, the individual monomials of the two polynomials are multiplied and of course in can happen that I have (3x^2 y + 5x…
Harald
  • 3,632
  • 1
  • 26
  • 55
10
votes
2 answers

Sympy: Drop higher order terms in polynomial

Using Sympy, say we have an expression f, which is a polynomial of the Symbol "x" (and of potentially other symbols). I would like to know what if there is an efficient way to drop all terms in f of order greater than some integer n. As a special…
9
votes
2 answers

Color calibration with color checker using using Root-Polynomial Regression not giving correct results

For a quantification project, I am in need of colour corrected images which produce the same result over and over again irrespective of lighting conditions. Every image includes a X-Rite color-checker of which the colors are known in matrix…
Rivered
  • 325
  • 1
  • 11
9
votes
1 answer

SymPy polynomials over finite fields

import sympy as S F = S.FiniteField(101) When I call f = S.poly(y ** 2 - x ** 3 - x - 1,F) I get the following error: 'FiniteField' object has no attribute 'is_commutative' But finite fields are commutative by definition! So I'm not really sure…
Kevin Johnson
  • 710
  • 7
  • 23
8
votes
2 answers

Fitting a polynomial using np.polyfit in 3 dimensions

I have an array of data, with dimensions (N,3) for some integer N, that specifies the trajectory of a particle in 3D space, i.e. each row entry is the (x,y,z) coordinates of the particle. This trajectory is smooth and uncomplicated and I want to be…
user1887919
  • 647
  • 1
  • 8
  • 18
8
votes
2 answers

Python equivalent to R poly() function?

I'm trying to understand how to replicate the poly() function in R using scikit-learn (or other module). For example, let's say I have a vector in R: a <- c(1:10) And I want to generate 3rd degree polynomial: polynomial <- poly(a, 3) I get the…
8
votes
1 answer

A few questions about CRC basics

I am an electronic engineer and have not found it important to consider CRC from a purely mathematical perspective. However, I have the following questions: Why do we add n zeros to the message when we calculate the CRC, were n is the degree of the…
quantum231
  • 1,927
  • 3
  • 24
  • 45
8
votes
1 answer

Bairstow's method initial quadratic approximations

Bairstow's root finding method needs very good initial approximations for the quadratic factors in order to converge. I tried various constants, random numbers, fractions out of the trailing coefficient (-a1/a2, -a0/a2; by Lin?) to no avail. Please,…
Ecir Hana
  • 9,122
  • 13
  • 58
  • 105
1
2 3
52 53