1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simultaneous Equations

  1. May 21, 2009 #1


    User Avatar
    Homework Helper

    I have had quite a bit of experience solving simultaneous equations from highschool (haven't learnt matrices) by various - but mostly - rearranging one variable and substituting it into another equation, but recently I was attempting to remove a surd upon another surd (lack of a better word) and came up with quite a toughy ~





    I know from experience that attempting to solve simultaneous equations that are more difficult than 3 linear equations in 3 variables will just lead to a big mess and lead me down the path of major frustration and book throwing escapades.
    What would be the best approach for such a problem? Should I start chugging at it and just hope I have the solutions before I forget why I even attempted this in the first place?

    Thanks for any advice.
    Last edited: May 22, 2009
  2. jcsd
  3. May 21, 2009 #2


    User Avatar
    Homework Helper
    Education Advisor
    Gold Member

    Is your example taken from a specific course? On the surface, without really trying to solve that system, the last three equations could possibly be solved to the extent of relating two variables in one equation. You might then perform a substitution to the first equation (the one containing the square terms). The approach might be too simple minded, but on first inspection seems to be the general way to use.
  4. May 21, 2009 #3
    A completely mindless approach for algebraic equations is to use Grobner Basis, if you have access to computer algebra/symbolic computing software such as Maple, although you might not need to use this to solve the equations. If the system of equations has finite number of solutions, an appropriate use of Grobner Basis will give you a equivalent system of algebraic equations that are easier to solve, with one of them a polynomial in one variable that you first solve and successively solving for the other variables using the solutions of the first variable. A four by four system like this probably is not too bad for Grobner Basis to handle in terms of resources (memory and time) needed.
    Of course you can use more clever approach to solve the equations, but you will have to do some more work to look for pattern and it would not be mindless, and there is no guarantee that your effort will pay off.
  5. May 22, 2009 #4


    User Avatar
    Homework Helper

    I think I might explain where this problem came from: (yes I know it might seem pointless and a waste of energy, but it's an itch I'd like to scratch).

    In class, studying polynomials, I derived to the conclusion that


    Not liking surds inside other surds, I went about trying to express this result as a string of irrationals that weren't one inside another.

    I found that [tex]\sqrt{2+\sqrt{3}}=\frac{\sqrt{6}+\sqrt{2}}{2}[/tex]

    So then I had: [tex]cos{\frac{\pi}{24}}=\frac{1}{2}\sqrt{1+\frac{\sqrt{6}+\sqrt{2}}{2}}=\frac{\sqrt{2}}{4}\sqrt{4+\sqrt{2}+\sqrt{6}}[/tex]

    To simplify the new irrationals within another irrational, I let:


    Squaring both sides" [tex](A+B\sqrt{2}+C\sqrt{3}+D\sqrt{6})^2=4+\sqrt{2}+\sqrt{6}[/tex]

    Expanding the left side, collecting like terms and equating coefficients from the left and right side of the equation, I get:





    chingkui, I haven't checked Grobner Basis, but it sounds like a method that will give me numerical approximations, and I'm looking for solutions in exact form.

    Through some of the mindless equating and substituting into the 3 last simpler equations, I ended with:


    Which is a polynomial of 5th degree in C.
    So solving for C through this plug, chug, and rearrange method will require using a pentic formula which from what I have heard, doesn't exist. And I haven't even got to substituting my found values of A, B and C into an equation to find D (which I'm sure will result in a polynomial of even higher degree).

    I'll probably try to start looking for patterns as you guys have suggested.
    Last edited: May 22, 2009
  6. May 22, 2009 #5

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    If you haven't checked out what groebner bases are then don't dismiss them - they are not numerical approximations - they simply find 'good' bases of ideals in polynomial rings - it is not a numerical approximation at all.
  7. May 22, 2009 #6


    User Avatar
    Homework Helper

    I checked the wiki on the subject and this stuff is way out of my league. I cannot even begin to understand how to use the grobner bases.
  8. May 22, 2009 #7

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    You need to have magma installed. With that it's easy - create a poly ring, create an ideal (all in the manual), then ask for a reduced basis. Hopefully this will reduce the equations to ones that are more tractable to solve. Of course, there's no reason why it will work - finding points on varieties is not an easy thing to do.
  9. May 22, 2009 #8


    User Avatar
    Homework Helper

    I've attempted over the past 2 hours to try write the code in magma to give me what I want:- I utterly failed.
    Using the manual is just as hard :biggrin: I'm not even sure where to start looking for examples and help on my specific case. If you have any experience with using this software, could you lead me to the precise name that the magma manual uses for cases like the problem I have here?

    are you kidding me!? :bugeye:
  10. May 22, 2009 #9

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    One minute with the online magma help:

    I:=Ideal( { a^2-b^2, a^2+b^2});



    as you might guess.

    Want to see it solve simultaneous equations?


    clearly has solution a=1 b=1, let's try magma and GB:

    I:=Ideal( { a+b-2, a-b});

    a - 1,
    b - 1
  11. May 22, 2009 #10


    User Avatar
    Homework Helper

    I'm not sure what an ideal means so for the first command, I don't know what it meant by a^2, b^2.
    Amazingly enough, it gave us the results we wanted when solving the simultaneous equations in a and b! :smile:

    So I tried copying what you did and so this is what it returned:

    Code (Text):
    I:=Ideal( { a^2+2*b^2+3*c^2+6*d^2-4, a*b+3*c*d-1, 2*a*c+4*b*d-1, b*c+a*d});

        a + 8982222077952/1034975*d^15 - 10949022056448/1034975*d^13 +
            4449194459136/1034975*d^11 - 119383704576/206995*d^9 -
            5672313216/1034975*d^7 + 8223531216/1034975*d^5 - 661697992/1034975*d^3
            + 15630417/1034975*d,
        b + 22523110096896/1034975*d^15 - 29426163646464/1034975*d^13 +
            13778379583488/1034975*d^11 - 110641655808/41399*d^9 +
            259874262432/1034975*d^7 - 9518955072/1034975*d^5 + 9222874/1034975*d^3
            + 3402376/1034975*d,
        c + 6691757359104/1034975*d^15 - 8252336111616/1034975*d^13 +
            3510693384192/1034975*d^11 - 118147424256/206995*d^9 +
            44366244768/1034975*d^7 - 974946048/1034975*d^5 - 40240154/1034975*d^3 +
        d^16 - 4/3*d^14 + 187/288*d^12 - 41/288*d^10 + 5377/331776*d^8 -
            485/497664*d^6 + 1463/47775744*d^4 - 5/11943936*d^2 + 1/191102976
    At first it looked like a big load of garbage (mainly because of those long rationals), but under closer inspection I think it's trying to tell me that the values of a, b, c and d are being expressed as polynomials of 15th degree and irreducible into factored forms. Is this where I give up or can something more be done to possibly find the roots of all these displayed polynomials?
  12. May 24, 2009 #11
    Hi Mentallic, seems like you are assuming sqrt(4+sqrt(2)+sqrt(6)) can be expressed as a linear combination of 1, sqrt(2), sqrt(3) and sqrt(6) with rational coefficients, which is not necessarily a valid assumption. Maybe Matt or someone else could help you better on this as my field theory is getting rusty after almost 10 years of not touching it. Basically, is there a simple/fast way to show if sqrt(4+sqrt(2)+sqrt(6)) is in the field Q(sqrt(2),sqrt(6)) or not? i.e. does x^2-(4+sqrt(2)+sqrt(6)) split in Q(sqrt(2),sqrt(6))?

    If you are looking for rational solutions, you could also solve numerically the polynomial systems you got:
    First solve for d^2 from the last polynomial, which is a 8-degree in d^2. Assuming you are looking for a rational solution for d, then d^2 must be a positive number. If all eight solutions are either complex or negative real, then you know right away that d cannot be rational. If you find a positive real solution for d^2, things will be a bit more complicated, and you might have to use some field theory to show if there is a rational solution or not.

    As for finding all eight solutions numerically, that should not be a big problem if you have access to the right software. The symbolic math software MAPLE I mentioned could do that. But I am not sure what other software could do that same thing too.

    Good luck!
  13. May 25, 2009 #12

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    When you try to solve simultaneous equations by substitution you add and mutliply and subsitute in, etc. In short you're studying the ideal generated by the equations.

    Magma has attempted to manipulate the equations to find a nice form for them that has the same set of zeros. This is your introduction to algebraic geometry - there is a one to one correspondence between certain sets and ideals.

    Take the a+b-2 and a-b example. We've told magma to consider I to be the smallest subset of Q[a,b] that contains a+b-2 and a-b and has these two properties:

    f,g in I => f+g in I

    f in I and h in Q[a,b] => fh in I.

    Asking for a groebner basis returns polynomials that generate the same ideal but that are smaller in some metric (you can vary the metric) usually given by choosing a lexicographical ordering on the basis elements a and b. I.e. we think of the polys as tuples

    (x,y,z) <--> xa+yb+z

    So we started with (1,1,-2) and (1,-1,0) and it returned (1,0,-1) and (0,1,-1) both of which are lexicographically smaller.

    The crucial thing is that the zeros will be the same.

    This is not guaranteed to work, or to return an answer that is helpful.
  14. May 25, 2009 #13


    User Avatar
    Homework Helper

    It's the best assumption I can make here with the little I have :smile:
    I have some experience solving similar problems such as finding that [itex]\sqrt{2+\sqrt{3}}=\frac{1}{2}(\sqrt{2}+\sqrt{6})[/itex] and other such problems - the idea first originating for me when finding square-roots of complex numbers. Every time it has worked as I have guessed, but the only difference this time is that for the terms under the surd exist both a [itex]\sqrt{2}[/itex] and [itex]\sqrt{6}[/itex]. At first I assumed that


    but quickly found through the expansion of (RHS)2 that the simultaneous equations at first glance do not work out (one of the equations was something like [itex]AB=0[/itex] which quickly told me it wouldn't work.

    A [itex]\sqrt{6}[/itex] term kept popping up, so I thought throwing the last term [itex]D\sqrt{6}[/itex] would fix that. If my assumptions here are flawed then I'm probably endeavouring to find a solution that leads me nowhere :zzz:

    Remember that the ultimate goal for me here is for me to "simplify" the surd. If I find numerical approximations for the possible real values (I'm hoping) of the constants then I haven't done much to make the final result look any simpler than the previous result.

    And such a high degree polynomial - even with all your efforts to explain to me what I could attempt to do with it - won't do me any good since I have yet to finish highschool and the quadratics and simplified cubics and quartics that we are currently solving doesn't give me any more encouragement that I'll tackle this and succeed.

    Sorry I couldn't understand most of this (please don't feel like you've wasted your time - I do appreciate the attempts :smile:) but this has caught my attention:
    I was wondering that if magma has been able to express these equations as high degree polynomials in D, then is it possible that D can have multiple values, or would most/all factors probably be complex? I think I might just check to see if any numerical values appear for these polynomials.

    The zeros will be the same? Are you suggesting this polynomial's factors are non-distinct?
  15. May 25, 2009 #14

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Uh? The zeros of the new set of equations will be the same as the old set.

    Look at the simple examples

    {a^2-b^2,a^2+b^2} went to {a^2,b^2} (zero set a=0, b=0 in both cases)

    {a+b-2, a-b} went to {a-1,b-1} (zero set a=1,b=1 in both cases)

    That a=b is a coincidence in each case (because I chose simple examples). The point was that the zeros are preserved (better choice of words?) in each case.

    In your example, it is entirely possible that there will be multiple solutions, possibly even with multiplicities - in algebraic geometry it is important to preserve multiplicities. Just take the real line, R, and the equation x^2=0, the set of zeros of that should be treated differently from the set of zeros of x=0 because you want to remember the multiplicity.

    Perhaps it is easier to think about that in 2-dimensions, take the zero set of the equations

    {y=x^2, y=0}



    In both cases it is just the point (0,0), but in the first case the parabola y=x^2 meets the line y=0 tangentially and you should remember that.

    Sorry - if the previous stuff about geometry didn't mean much then a crash course intro to schemes isn't going to be useful.
    Last edited: May 25, 2009
  16. May 25, 2009 #15


    User Avatar
    Homework Helper

    Oh thanks yeah it was a better choice this way. I see where my flaw was now. I thought I could graph the equations to get some numerical approximations, but my computer graphing program isn't willing to expand into a 4th dimensional plane for me :biggrin:

    See, usually to solve these simpler equations you've shown I would go about solving simultaneously, but lets say these 2 variables are expressed in a much more complicated way, forcing me to find numerical approximations and using graphs instead, well then I could find the intersections. With my problem, I can't express it graphically...

    I still don't understand where you are headed with all of this, matt grime. I get the impression from putting all the thoughts in this thread together that it MIGHT be possible to solve my equations through some complicated high level maths, or have you been trying to explain that I'm completely stuck?

    Uhh... is there a program that could give me numerical approximations?
  17. May 26, 2009 #16

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    I don't know if you're stuck or not - all that Groebner bases do here is produce a set of equations with the same roots that are 'simpler' in some sense. That is not necessarily simple enough to solve non-numerically.
  18. May 26, 2009 #17


    User Avatar
    Homework Helper

    Ok thanks for making that clear. If I were to find numerical approximations, is it possible that I could find the possible irrational (assuming worst case scenario for the constants) that corresponds with the numerical value? Is there any field of maths that can do something to make this possible?
  19. May 27, 2009 #18
    First, when you solve x^2=3, you can't find a rational number solution and need to attach sqrt(3) to the set of rational numbers. Next, when you solve for x^2=2+sqrt(3), you find out that you can't express the solution as a combination of the rationals and sqrt(3) and need to attach sqrt(2) to express the solution. Now, you are trying to solve for x^2=4+sqrt(2)+sqrt(6), why would it be surprising if the solution can't be expressed by a combination of the rationals, sqrt(2) and sqrt(3)? The bottom line is, all the sets (more mathematically precise, fields) you considered so far are not algebraically closed, meaning that you are likely to keep on attaching more and more elements to express the solutions of polynomials. I am not saying that you definitely could not find a solution that is a rational linear combination of 1, sqrt(2), sqrt(3) and sqrt(6), I am just saying that it is very likely you could not.

    How would you know if your assumption is correct or not? One way is to solve for a, b, c and d to check if there is a rational solution. Hence, Grobner Basis. and you got a 16 degree polynomial in d (which is actually an 8 degree in d^2) which is very nice. Problem is, as you might already know, there is no general formula like the quadratic, cubic and quartic. To show that if the 8 degree polynomial has rational solution or not, you might be able to do that with some more advanced field theory. But I would avoid even trying that, since it is likely to be exceedingly complicated, if possible at all. That's why I told you to solve the polynomial numerically first, doing so might enable you to show that there is no rational solutions. In order that d has a rational solution, d^2 must be a positive rational number. If the solutions you find for d^2 are all complex or negative numbers, you know d can't be rational. But if you find even one positive root for d^2, then this approach would not help you to get any closer.

    Having said all these, if all these have not discouraged you, you might think about the following two "exercises":
    1) Suppose p, q, r and s are all rational number, can you find a polynomial in x with rational coefficients that has a root p+q*sqrt(2)+r*sqrt(3)+s*sqrt(6)? What is the degree of this polynomial?
    2) can you find a polynomial in x with rational coefficients that has a root sqrt(4+sqrt(2)+sqrt(6))? What is the degree of this polynomial?
    Think about them, you might find it worthwhile.
  20. May 28, 2009 #19


    User Avatar
    Homework Helper

    Your input was very worthwhile chingkui.
    I guess my assumption arose from trying to express it with the least amount of constants as possible, after realizing such a result could not be expressed with [itex]a+b\sqrt{2}+c\sqrt{3}[/itex] so I made my own conclusion that the last expression should be [itex]d\sqrt{6}[/tex] since it's the multiple of [itex]\sqrt{2}\sqrt{3}[/itex] and all other possible combinations of [itex]a,b\sqrt{2},c\sqrt{3},d\sqrt{6}[/itex] when squared are all able to be expressed as another set of constants with these irrational parts.

    Yeah, but I can't use a graphing tool since there are 4 variables, and I don't know of what programs could numerically solve this for me.

    As for 1)
    The degree of the polynomial is 4 and is: (hopefully I got all the algebra correct)

    For 2)
    The degree is 8, or 4 in x^2 (as opposed to the last polynomial):

    I'm not exactly sure, but are you trying to tell me that the coefficients of each degree of x must be equal?
  21. May 28, 2009 #20
    I am not going to check your algebra :devil:
    The point is, now that you know any root of the form p+q*sqrt(2)+r*sqrt(3)+s*sqrt(6) satisfies a 4-th degree polynomial with rational coefficients, do you think sqrt(4+sqrt(2)+sqrt(6)) can be expressed as p+q*sqrt(2)+r*sqrt(3)+s*sqrt(6)?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook