Results 1 to 20 of 20

Thread: Solving Equations

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Solving Equations

    Would someone mind giving me a hand in solving some equations?
    I have three equations and three unknowns. The unknowns are x2,x3 &x4.

    I've attached the equations in MSWord.
    Even the first equation...how would I rearrange that to be able to substitute it into the others?
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Solving Equations

    You have to isolate one of the variables in the expression to be able to substitute it in another.

    For example, the first equation.
    First get rid of the fractions. Multiply both sides with (x2 + x3).
    Then multiply out all the brackets on the right.

    You should get something like:
    x2 = x4*x2/(...) - x5*x4/(...) + (..)/(..)

    You can then get every term that has an x2 in it to the left again, you end up with something like:
    x2 - x4*x2/(...) + x5*x2/(...) = (known vars)/(other known vars)

    Finally you can factor out x2:
    x2 * [1 - x4/(...) + x5/(...)] = ...

    And then divide by everything between the [ ] brackets:
    x2 = (...) / [1 - x4/(...) + x5/(...)]

    You have now isolated x2 and can substitute it in the other equations.
    It's quite a messy equation but if you keep doing it without making mistakes you will get it.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    Ripper. Thankyou. I've got X2 now. Then last two are going to be painful.

  4. #4
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Solving Equations

    Is this some homework problem or something? Or is it something you genuinely need solved for some practical purpose?
    Just so you know, there are lots of math programs out there who solve things like this in a second...

    If it's just some howework problem or something however just solve them yourself, it's a very good algebra excercise.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    It's for an application I'm trying to create. If you've got a suggestion of an application I can use or if you can help me out I'd be grateful. What I posted there is about page 4 of the calculations so I don't even know if what I have is correct.

    It's getting VERY messy with those last two formulas. It's a one off thing so I don't want to pay for software if I don't have to.

  6. #6
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Solving Equations

    There are tons of programs which (probably) all have free trial versions available:
    Matlab
    Maple
    Mathcad

    Maybe even excel? Don't know about that...

  7. #7
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Solving Equations

    What you have is a set of simultaneous non-linear equations. If all you are looking for is a quick and dirty numerical solution (as opposed to an algebraic one), then I'd try the "Didactic Optimization Tool for EXCEL" at this site:

    http://digilander.libero.it/foxes/SoftwareDownload.htm

    Just scroll down the page until you see it. It's an EXCEL add-in that's free. I use it frequently. Since you have only a few variables, it should work. Try the Downhill Simplex method if you have a reasonable estimate of the solution, or the random method with a wide range of limits if you have no idea. You may have to play with things a while.

    Or, if you really want to have some fun, solve the problem w/ Excel using Netwon's Method by calculating the partial derivatives of each function with respect the the unknowns (i.e. forming the Jacobian) and iteratively solve with the built-in linear solver. The following link describes the technique:

    http://www.physicsforums.com/showthread.php?t=95580

    P.S. How's the post tensioned cable business?
    Last edited by VBAhack; May 2nd, 2008 at 08:37 PM.

  8. #8
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Solving Equations

    I don't think Matlab would be able to solve these symbolically. As far as I know it works entirely in concrete numbers. Mathematica, however, would be very happy to solve these, and there most definitely is a trial version with a short period available.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    I do need to solve the equations algebraically. I've got a vb application in which I need the formulaes.

    I'm still stuck. X2 and X4 in the attached two equations are still unknown. I'm now sure that these two equations are correct.

    Would Mathematica really be able to take these two equations, combine them and reorder everything to find a simplified answers to the unknows? If someone's got time can they feed these two through it to get a result in terms of X2 and X4?
    Attached Files Attached Files
    Last edited by sgrya1; May 4th, 2008 at 09:38 AM.

  10. #10
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Solving Equations

    Just a little help here, the whole right-hand-side of the first equation can be simplified as:

    - [ (-x3 + x4) * x3^2 * (x5 - x4) ] / [ (x5-x3)^2 ]

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    Damn.

    Nick, I forgot to replace X2 on the left hands side which is why there's too many variables to solve it.

    If you or anyone's still interested in trying to solve it attached are the equations.

    Nick. Thanks very much for that. I'll see if I can work out how you've simplified it that far.

    X3 and X4 are the only unknowns so basically I need two equations as equating these values. Spent hours on it but it is solvable.
    Sadly above me.
    Attached Files Attached Files
    Last edited by sgrya1; May 4th, 2008 at 04:17 PM.

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    I just edited that last post.

  13. #13
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Solving Equations

    If you can tell me what ' RoC(y1-y3) ' stands for I might be able to let maple solve it.

  14. #14
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Solving Equations

    Well I tried to use Maple to solve the equations (the ones in your very first post), regarding the RoC things as constants, but what I got was complete garbage...
    If printed out the result is probably like 5 pages long... I can't make anything out of it...

    Maybe your best bet is to try to solve it numerically with some approximations. You'll have to give us some numbers for that though...
    Also I'm not sure how to do that...

  15. #15
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Solving Equations

    I too tried entering those into Mathematica, and it solved the equations assuming RoC(y1-y3)=RoC(y3-y5)=R for some constant R; those assumptions are probably not true but I don't know what else RoC could mean besides radius of convergence, and even then I'd need context.

    Regardless, like Nick said the result was pages and pages long full of nested radicals and awful exponentials. Yes, technically you could code the formula it gives, but your application is insanely complicated if you really can't find any way around that. Unless the true nature of RoC simplifies things greatly, I would start looking into numerical methods for solving this instead of solving it exactly. Iterative numerical methods, assuming you find one that converges for your purposes, would give you arbitrarily high accuracy (more than a computer can reasonably store if you like) and be simpler in the end. You also wouldn't need to change much if your underlying equations turn out to be slightly different than you think right now.

    If you want I'll post the output, but only as a series of screenshots since anything else is too error-prone.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    I must have made a mistake somewhere along the way. After about 8 hours of fiddling with the equation and simplifying and checking previous equations I've taken out one more variable.
    Down to the last one and it's just getting harder. Would someone mind having a look at this one?
    I need to solve it in terms of X4.
    RoC is a single variable. It's the radius of curvature. Good guess Jemidiah.
    Attached Files Attached Files
    Last edited by sgrya1; May 5th, 2008 at 11:43 PM.

  17. #17
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Solving Equations

    If programs like Maple and Mathematica come up with a 5 page solution, I doubt you are going to find a correct solution by hand.
    Although Maple could be wrong, (I have learned not to trust those programs all the way every time), it is more probable that you made a slight mistake somewhere.

    As we said, your best bet might be to solve it numerically. If you have any good guesses for what x2, x3 and x4 could be (for example between 1 and 3 or something like that) than I am sure you can solve it numerically. (I have no idea how though).

    If the assignment is to solve it algebraically then I don't know why Maple comes up with 5 pages worth of complicated formulas, I don't see anyone doing that by hand...

  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    I've just put that formula into excel with known test values and ran a goal seek. It didn't give me the right answer the first time until I guessed that there might be more than one solution.
    When I put in a start value for x4 which was closer to what I expected it did goal seek to the expected answer.
    I'm writing to the person who's done it before asking for a hint. I'll let you know if I get a response. He might want to keep it to himself though.

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    Thanks all for your help. Get back to you soon!

  20. #20

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Solving Equations

    Appears that the person who has done it doesn't want to give out any secrets. I've realised that I am able to iterate a solution from the equation and I can only guess he has done the same. The itteration completes in about 7 passes of the 12 equations to the accuracy I need so it's unnoticable.
    Thanks again everyone for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width