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

978 questions
-1
votes
1 answer

Python Sklearn - Adding PolynomialFeatures to my LinearRegression Model. Is this correct?

I have a LinearRegression model which does a moderate job at predicting total applications received for college courses prior to them starting. I felt the accuracy could be improved by adding PolynomialFeatures as often the rate of applications per…
-1
votes
1 answer

Build polynomial function from a set of intervals denoting y >= 0

I have a set of ordered, non-overlapping intervals that do not share boundaries, e.g.: long[][] intervals = new long[][]{ new long[]{ 2, 3 }, new long[]{ 5, 10 }, new long[]{ 25, 1200 }, ... } Currently I use a binary search…
Sebastian Barth
  • 4,079
  • 7
  • 40
  • 59
-1
votes
1 answer

While coding addition of two polynomials in c++ , I could compute the addition when no and order of terms are same . It shows error when its diff,why?

Here I have tried to code addition of two single variable polynomials in c++ . The code runs fine when both the inputs are in sync with the other . But when it ain't it shows some crazy stuff happening and prints complete gibberish . I am pasting my…
Quenti_20
  • 1
  • 3
-1
votes
1 answer

Destructor crashing program with arrays c++

I'm learning cpp and I've tried to always allocate memory correctly but now after adding deconstructor, it crashes with HEAP CORRUPTION DETECTED. I want to be able to have W1 smaller than W2. Right now, program works (without destructor ofc) if W1…
RektLeft
  • 93
  • 1
  • 8
-1
votes
1 answer

C, help continue..? in while loop - polynomial ADT

When the coef is 0, I used continue to not print, but only printTerm(a) comes out and the printTerm(b) part does not come out. When I delete the (if & continue) statement, both printTerm(a) and printTerm(b) appear, so it seems that there is a…
sion
  • 1
-1
votes
1 answer

Polynomial approximation with intercept on point 0, 0

I need help with calculation of polynomial approximation function with intercept at 0, 0 point. I have few points in Excel like this: Point with chart As you can see i make chart of this point then add trend line with equation. Now i add intercep at…
-1
votes
1 answer

Classifying NP Completeness and Hardness

Choose the correct statement(s): (A) If X is an NP-complete problem, then X is an NP problem (B) If X is an NP-complete problem, then X is an NP-hard (C) Let X be an NP-complete problem. If X can polynomial reduce to a problem Y, then Y is an…
-1
votes
1 answer

What's wrong with my code for the toString() method?

please note that I'm a complete beginner to programming and have found learning Java quite hard. I have a school task that requires me to write a code for a toString() method and I've blindly followed what my teacher has been writing/teaching in…
ratalata
  • 1
  • 3
-1
votes
1 answer

How do I make this class accept list/tuple of ints as arguments?

I tried turning the variable that I get from input(which is (x,y,z) as ints) into a tuple and a list successfully, but I cant seem to get the Polynomial() to work with them. from tkinter import * class Polynomial: def __init__(self,…
confestim
  • 3
  • 4
-1
votes
1 answer

Struggling with piecewise polynomial interpolation in python

So I have this task, where im supposed to interpolate a function with polynomials. The entire interval is divided into N subintervals, and the polynomial interpolating in each subinterval is of order k. I generet all my interpolating points, but I…
Tettidesa
  • 1
  • 1
-1
votes
1 answer

splitting terms in a polynomial expression without external libraries like sympy

Say i inputted "1+2x+3x^2" or "1-2x+3x^2" How do i make a function that splits and makes a list of each term like [1, 2x, 3x^2] or [1, -2x, 3x^2]. I have been stumped at this for a while, for now the function im using currently, seperates only at…
user13392187
-1
votes
3 answers

Polynomial Evaluation using python

Evaluate a polynomial given a value for x. The input is a list of coefficients and value for x . The output is the polynomial sum evaluated at x.
user13198673
-1
votes
1 answer

Polynomial Function Expansion in R

I am currently reviewing this question on SO and see that the OP stated that by adding more for loops you can expand the polynomials. How exactly would you do so? I am trying to expand to polyorder 5. Polynomial feature expansion in R Here is the…
AW27
  • 481
  • 3
  • 15
-1
votes
2 answers

Identifying different regressions (Linear, Polynomial) from a graph and fit regression model accordingly

I am working with different machine learning algorithms for my dataset. I am using python. I am a beginner in machine learning. This is the visualization of my dataset. It is understandable there linear regression won't perform well for the whole…
-1
votes
2 answers

I am not able to print my polynomial expression using linked list

void create(struct node *head); //declaring functions void display(struct node *head); struct node //creating a struct datatype for nodes { int coeff; int power; struct node*…
SKumar
  • 43
  • 7