Jump to content
  • Advertisement
Sign in to follow this  
JohnnyCode

Quadratic equations trouble

This topic is 1089 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have 3 quadratic equations in the following form:

 

(x-y)*(x-y) + (x-y)*(x-y) + (x-y)*(x-y)=2

(y-z)*(y-z) +(y-z)*(y-z) + (y-z)*(y-z)=2

(x-z)*(x-z) + (x-z)*(x-z) + (x-z)*(x-z)=2

(where before every x and y and z written is arbitrary multiplier, such as 2.1*x)

 

I wonder wheather the fact that in each of the equations are mentioned only two of the unknowns, not all three, is a problem for finding a solution.

 

What would be some numericaly stable method of finding the solution?

Share this post


Link to post
Share on other sites
Advertisement

You are gonna want to expand the (x-y)^2's in all the equations, you should have no problem solving the equations and then substituting them if you do that.

Edited by mousetail

Share this post


Link to post
Share on other sites

Are you sure those equations are correct? All 3 terms in each line are the same, so the first line is actually equivalent to 3 * (x - y)^2 = 2.

 

Besides that, I think it might be easier to let

 

a = x - y

b = y - z

c = a + b

 

Then

 

3a^2 = 2

3b^2 = 2

3(a + b)^2 = 2

 

So it doesn't have any solutions, since a, b = +/- sqrt(2 / 3), but these don't solve the 3rd equation.

Edited by quasar3d

Share this post


Link to post
Share on other sites

Are you sure those equations are correct? All 3 terms in each line are the same, so the first line is actually equivalent to 3 * (x - y)^2 = 2.

 

 

He left out the co-efficients (for some reason). As he said in his post:

 

 

 

(where before every x and y and z written is arbitrary multiplier, such as 2.1*x)

 

Share this post


Link to post
Share on other sites

Thanks for substitution idea, though it is not doable particulary like that  since you didn't notice the multiplier note.

 

 

3a^2 = 2

3b^2 = 2

3(a + b)^2 = 2

 

So it doesn't have any solutions, since a, b = +/- sqrt(2 / 3), but these don't solve the 3rd equation.

 

In case of all multipliers being 1.0, or equal, to make construct that the equations describe make sense, the solution is only with zeros on the right side.

 

 

You are gonna want to expand the (x-y)^2's in all the equations, you should have no problem solving the equations and then substituting them if you do that.

 

The thing with this is, that I will recieve x,y,xy,x^2,y^2 and I have big doubts particulary about the xy uknown. But are those equations of x,y,z actualy solvable? With 2,2,2 right side, and with any possible R multipliers where values differ (the 9 multipliers would actualy describe any three 3d vectors where at least one is not parallel ).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!