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
3 answers

Program freezes when trying to analyse a string

I am writing on a method which should analyse a polynomial given by the user (as String) and do different stuff with it in the future. At the moment, I was trying to test the code I have so far but whenever I execute the program, it freezes and…
-1
votes
1 answer

C++ Polynomial Output is 50% accurate and 50% memory address

I'm writing a program that implements sparse polynomials, with two global structs defined as follows: //Global structs to represent a polynomial struct Term { int coeff; int degree; }; struct Node { Term *term; Node *next; }; the class…
coopwatts
  • 670
  • 1
  • 8
  • 31
-1
votes
2 answers

C++: How to compute an integral with interval bounds?

I am both tired, new to C++ and real bad at dealing with polynomials. That's a bad combo for my assignment. Nevertheless I am trying to solve it. Please note that I might have misunderstood certain parts both mathematically and language-wise. Maybe…
Treeline
  • 475
  • 1
  • 8
  • 23
-1
votes
1 answer

polynomial fitting on spectral data

I want to fit a polynomial function (max. 3rd order) on each raster cell over all my spectral bands (Landsat 1-7) creating a new raster(stack) representing the coefficients. I got my data (including NA values) in a stack with 6 Layer (Landsat Band…
user2978751
  • 57
  • 1
  • 10
-1
votes
1 answer

Can't decode a polynomial properly

#include #include #define TRUE 1 #define FALSE 0 typedef struct polynomial{ int coeff; char var; int exp; struct polynomial *link; } poly; poly* decode(char*); main() { char polynomial[100]; poly *first,…
Ashish Tomer
  • 55
  • 1
  • 8
-1
votes
1 answer

Normalizing a Polynom

I need to read in a Polynom and transform it into normalized form. For example I read in 4*x * (x^2 + 4x + 3) and it has to be transformed to 4*x^3 + 16*x^2 + 12*x. Is there some tricky algorithm for it or do I have to think of something myself.…
-1
votes
1 answer

Recursive C program to differentiation a polynomial until it stops

#include #include #include void main() { int a[10],i,n,d[10],power; float in[10]; clrscr(); printf("Enter the order ofthe polynomial\n"); scanf("%d",&n); …
junior
  • 15
  • 1
  • 5
-2
votes
1 answer

inAlgError("SVD did not converge in Linear Least Squares")

I wrote a python program but I got below error code: import pandas as pd import numpy import io from sklearn.model_selection import train_test_split from google.colab import files iodf2 =…
-2
votes
1 answer

Add Two Polynomials Java Program

I am working on this simple program that adds two polynomials. However, I am getting wrong results and could not spot the mistake. import java.util.LinkedList; public class Polynomial { private LinkedList terms = new…
metsys
  • 3
  • 4
-2
votes
1 answer

Polynominal with doubly linked list - pointer problem

I made some polynomial code with a doubly-linked list. for example, if you write 1 and 2 then 1 is a degree and 2 is coefficient. 1x^2 insert to doubly linked list. the problem is that when I check my code, the Node head->degree is changing. if I…
YongHoon
  • 71
  • 3
-2
votes
1 answer

Need help resizing dynamic array - Heap corruption detected

I am having trouble dynamically resizing an array in one of my C++ classes. I am specifically having trouble inside the setCoefficient function of my code, where I need to resize a dynamic array. Currently, I am running into an error of HEAP…
-2
votes
1 answer

How do I read many polynomials and how do I print the ones that have common roots and the roots also?

I have to make a program using a console menu that reads "m" polynomials with integer coefficients and shows the pairs that have at least one common root, showing for each pair the common roots.I have to make a method that checks if two polynomials…
-2
votes
1 answer

Simplified Polynomials

I'm trying to print out the Lagrange Interpolation Form. double x0 = x[0]; double x1 = x[1]; double x2 = x[2]; double x3 = x[3]; double z0 = z[0]; double z1 = z[1]; double z2 = z[2]; double z3 = z[3]; if (size == 2) …
John Han
  • 11
  • 1
  • 1
  • 5
-2
votes
1 answer

How to find all the terms of a polynomial that contain a specific variable in Matlab?

Let say that we have the polynomial f=a^2*b+b^2*c+c*d. I would like to know if, in Matlab, I could find all the terms of f that contain specific polynomials of variables a, b, c and d. For example, if I have a polynomial of variable c, that is…
Vassilis Chasiotis
  • 427
  • 1
  • 3
  • 15
-2
votes
1 answer

Condensing ArrayList NullPointer

So I am making a program that takes in polynomial functions and does different things with it. Right now, I am trying to make a method that checks the Polynomial that is input, which is stored as an ArrayList, and condensing it so everything with…
brent_mb
  • 337
  • 1
  • 2
  • 14