Questions tagged [polynomial-math]

Polynomial Math is a subset of mathematics dealing with mathematical expressions constructed from variables and constants using only the operations of addition, subtraction, multiplication, and non-negative integer exponents. Any polynomial math question should be programming related.

630 questions
-1
votes
1 answer

Java program to solve given polynomial equation with replacing given value of "x"

Suppose a java program which gets a polynomial equation like "3x^2 - 4x^3 + 3x^3" as a string input from user then gets another number as "x" then solve the given equation with given x and print result. If you have any idea or solution, I would be…
-1
votes
2 answers

Octave Coding - I need help coding coefficients of polynomial

This question fairly easy doing it manually however, I am struggling to have this written in code. There is a quartic polynomial: P(x)=ax^4+bx^3+cx^2+dx+e There is also a given matrix M: 5 0 -1 2 9 -2 -1 0 1 2 Which the first row gives P(x) and…
i9-9980XE
  • 11
  • 5
-1
votes
1 answer

Polynomial creation

I'm having problems with an exercise in python, I have to create a function that based on a list will give me a certain polynomial equation for example if given [1,2,3] generates x^2 + 2x + 3 and if given [2,2] generates 2x + 2. My idea was to make…
LValentim
  • 17
  • 1
-1
votes
2 answers

Lower Bound Time Complexity of Log Equations

Here's the equation: Upper Bound: Without the log i understand the Upper bound on this would be O(n^2), but with the log will the upper bound be O(log n^2)? Or is the log negated? Lower Bound: If we assume that this is only run once, then shouldn't…
bagofmilk
  • 1,492
  • 8
  • 34
  • 69
-1
votes
1 answer

I/O Loop in Haskell

I am currently working on this Haskell problem and I seem to be stuck. Write a function, evalpoly, that will ask a user for the degree of a single variable polynomial, then read in the coefficients for the polynomial (from highest power to lowest),…
JMV12
  • 965
  • 1
  • 20
  • 52
-1
votes
2 answers

Sort Polynomial based on Symbol and Exponent

I'm writing writing polynomial arithmetic in lisp, and currently working on addition. I need help sorting a polynomial by the exponent and symbol. My polynomials are represented as follows: ((3 ((1 x)(1 y))) (1 ((3 y)))) ; == 3xy + 1y^3 The…
Josh Horton
  • 77
  • 1
  • 1
  • 7
-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

Recursive definition of positive real Number

The following is a recursive definition of positive real numbers from book "Computer Theory" by I. Cohen. 1 is in positive R If x and y are in R, then so x+y, xy, and x/y but the author said that it does define some set, but it is not the set of…
-1
votes
1 answer

Real roots of a system of 8 polynomial equations of degree 3

I would like to obtain ALL the real roots of a system of 8 polynomial equations in 8 variables, where the maximum degree of each equation is 3. Is this doable? What is the best software to do this?
James
  • 383
  • 1
  • 4
  • 15
-1
votes
1 answer

derivative and value of a polynomial having symbolic coefficients

![enter image description here][1]I have an unknown equation of a curve y = a0 + a1*x + a2*x^2 +....+ a9*x^9 where coefficients are symbolic. I want to find its derivative and its values on particular xi. xi = 0:01:10; syms a0 a1 a2 a3 a4 a5 a6…
Ankush
  • 235
  • 3
  • 14
-1
votes
2 answers

Computation of polynomial coefficients

I need math library to solve simple system of 3 equations like (ax2 + bx + c = y) and get a, b, c, where I know 3 couples (x,y). I searching for something but I didn't find anything useful for me.
Denis
  • 503
  • 8
  • 32
-1
votes
1 answer

Pseudo-polynomial time dynamic programming subsets from two sets with limitations

I´ve read at wiki http://en.wikipedia.org/wiki/Subset_sum_problem#Pseudo-polynomial_time_dynamic_programming_solution about the sumsubsetproblem and wonder if i can adapt it to the following problem: I need all possible subsets ss1, ss2 restricted…
user2792876
  • 31
  • 1
  • 5
-1
votes
1 answer

find polynomial equation from array with matlab

I've some x.mat and y.mat. And I would like to find the polynomial equation from this. I've tried p = polyfit(x,y,3); with y2 = p(1)*x.^3 + p(2)*x.^2 + p(3)*x but my y2 is not equal to the original y . What is wrong ? Thanks you
-1
votes
1 answer

Cheking a Zero Polynomial

Can anyone explain me in below algorithm how the "ISZERO" function checking whether the polynomial is zero or not. Here "REM(P,e)" function removes all the values with exponent "e". what i don't able to understand is the significance of "if…
Abhishek
  • 1,585
  • 2
  • 12
  • 15
-1
votes
2 answers

Adding polynomials

I need some help. I am doing test-driven development. These are the tests: @Test public void add01() throws TError { assertEquals(new Term(10,5), new Term(4,5).add(new Term(6,5))); } @Test public void add02() throws TError { assertEquals(new…
Lax
  • 19
  • 4