Solving quadratic equations over polynomials

Ninjalord

New member
Joined
Jul 13, 2008
Messages
5
Hello

I hope someone can help me with this.

I have the following equation:

y^2 + xy = x^3 + a*x^2 + b

I want to solve it. I know what a and b are (3 and 5) but I do not know what x and y are.

If I let f(x) = x^3 + a*x^2 + b (i.e. the RHS) I can convert my equation to:

y^2 + xy + f(x) = 0

What is the simpiest way to solve this equation?

Do I have to just choose random x values and then brute force every possible y value?

Any help appreciated.

Thanks.
 
Ninjalord said:
Do I have to just choose random x values and then brute force every possible y value?
Since you have one equation in two variables, there will indeed be infinitely-many solutions. About the best you could do would be to solve the equation for one of the variables in terms of the other.

Eliz.
 
Re:

stapel said:
...the best you could do would be to solve the equation for one of the variables in terms of the other.
Could you explain what you mean in the above quote? I'm not sure I follow.

Thanks.
 
2 integer solutions: x,y = 4,9 and 4,-13

Equation in terms of y: y = [-x +- sqrt(4x^3 + 13x^2 + 20)] / 2

So infinite solutions.
 
As far as I am aware, there should be a maximum of two y values for every x value.

I am using a finite field, so there is a limited number of values I can use.

Would a brute force method of testing every possible x and y value work ok?

Note I am coding this in software, so it is possible to let the computer do the hard work...

Thanks
 
Ninjalord said:
As far as I am aware, there should be a maximum of two y values for every x value.
Yes - that is what the equation given by Denis shows (with the ± sign)
I am using a finite field, so there is a limited number of values I can use.
Are you looking for integer values only?

Is this a graphic program - where you are calculating pixel position?

Would a brute force method of testing every possible x and y value work ok?

Depends on what are you using these numbers for. For graphics - you may want to choose "near integer" numbers - as opposed to exact integers.

Note I am coding this in software, so it is possible to let the computer do the hard work...

Then let it ... use Denis's equation and choose your "suitable" numbers

Thanks
 
Top