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

Printing the polynomial using linked list data structure

I have written the following code to print the 2 polynomial using linked list.When i run this program it prints nothing in the output.And also please tell if i pass the value from main() in this way then, when again the function is called will my…
Ayush Mishra
  • 49
  • 1
  • 7
-1
votes
2 answers

creating polynomial using linked list and adding them

I have been encountering so many codes in polynomial which creates the polynomial using double pointers as arguments and in the following code I have a question that why a new node is created for the next pointer of type Node. If possible can…
Ayush Mishra
  • 49
  • 1
  • 7
-1
votes
4 answers

Function multiplying two polynomials gives wrong result

I want to create a function called multipoly(x,y) which takes two lists as input, multiplies the lists and returns the answers. Polynomial is represented as follows: for instance x^4+2X^3 is represented as [(1,4),(2,3)]. Here is something I get but…
-1
votes
1 answer

Generate random polynom for random input

I am currently looking into the polyfit lib for python. I do have a specific input value A and a desired output value B. I want to generate a randomized polynom with a comlexity 5 <= n <= 10, that, when given A as input has B as solution. What would…
Kyu96
  • 1,159
  • 2
  • 17
  • 35
-1
votes
1 answer

Wrong polynomial value after multiplication by using numpy

In the following script, I multiply many polynomials together and try to get its correct value by setting x=1855. The answer has to be zero because one of the equation in the multiplication is x-1855 but the answer is way much more than zero after…
-1
votes
1 answer

numpy fit coefficients to linear combination of polynomials

I have data that I want to fit with polynomials. I have 200,000 data points, so I want an efficient algorithm. I want to use the numpy.polynomial package so that I can try different families and degrees of polynomials. Is there some way I can…
kilojoules
  • 9,768
  • 18
  • 77
  • 149
-1
votes
3 answers

Evaluate polynomials by reading it from a file

I would like to read and evaluate a polynomial from a txt file that is given in the following format, 3x^3-4x^1+5 So the above equation should be evaulated by the program as follows, Coefficients: [3,0,-4,5] So far I could able to parse the string…
odd
  • 131
  • 1
  • 3
  • 9
-1
votes
2 answers

Java- adding and subtracting polynmials

So I am doing this project and its done but i have one problem which is the output.This project involves adding and subtracting polynomials using arrays with exponents,linkedlist, and storting why I am getting nulls for my second and fourth test.…
Mo_Hakim
  • 1
  • 2
-1
votes
1 answer

polynomial pointer program error, scanner skipping inputs

i wrote this program which calculates 8 polynomial degrees at value of x inputted by the user. the program runs, however once i enter the 8 polynomials it should allow me to enter the value of x however it skips, and shows me the output. i tried…
corvo
  • 11
  • 1
  • 5
-1
votes
1 answer

Solve polynomial equation to find the constant, Are my result correct or not?

I have written this code and I think is give me not correct answer. Could anyone please help me to discover my mistake? I'm trying to solve polynomial equation to find the constant which is W - Wr = a (W – 1) +b(W – 1)^2 +c(W – 1)^3 My code is…
Ismail
  • 39
  • 1
  • 6
-1
votes
1 answer

How can I optimize my code?

I have an equation which includes continued fraction. I want to find particular root of this equation for all R which is a parameter of the equation. For this I: input this continued fraction as a polynomial expression into MATLAB simplify this…
-1
votes
1 answer

Addition of two Polynomials using LinkedList in Java

I was tasked to make a program that adds two Polynomial using the LinkedList data structure, so far I've written the codes for adding and accepting two Polynomials. My problem is that after the user enters their Polynomial the addition should…
Helquin
  • 188
  • 1
  • 13
-1
votes
2 answers

Add and Multiplication of Polynomials in Python

I want to add and multiply two polynomials. A function takes two arguments like add([(4,3),(3,0)],[(-4,3),(2,1)]).So, the polynomial looks like 4x^3 + 3 and -4x^3 + 2x I want to add and multiply both these two polynomials without using any…
Avijit Majhi
  • 508
  • 9
  • 15
-1
votes
1 answer

C++ "No Matching Function for call to" Error

I'm expanding off of code given to us. I have to finish creating a program that can add two polynomials together. When I try and compile though, I get these build messages. Line 17: error: no matching function for call to 'Term::Term()' Line 10:…
CabooseMSG
  • 51
  • 10
-1
votes
4 answers

Polynomial functions in python

I am very new in writing Python code. I have to represent polynomial like this, 4x^230+7x^96+1 testP = [[4,512],[7,256],[1,0]] def printPoly2(P): for i in range(len(P)): if P[i] != 0: print("%s x^%s + "%(P[i], i)), …
tani
  • 17
  • 8