Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculation of simultaneous equations

  1. Jul 13, 2005 #1
    How are simultaneous equations calculated using a computer?
     
  2. jcsd
  3. Jul 13, 2005 #2

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    By a solver of some type.
    Be a bit more specific, please.
     
  4. Jul 13, 2005 #3
    There are lots of different methods. For example, numerically. Here is an analytical method I wrote using Cramer's rule to invert the matrix. Delphi source code included.
    http://www.geocities.com/peterbone3/LinearEquations.zip
    I assume you're familiar with the matrix representation of a set of linear equations.

    Peter Bone
     
  5. Jul 13, 2005 #4

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    I wouldn't disagree with there being a lot of methods, peterbone; we agree on that.
    I was sort of thinking what kinds of simultaneous equations OP had in mind, in particular if I needed to go into the whole mucky business of solvers involving non-linear loop structures and so on..:yuck:


    At the end, of course, since we really only can solve systems of linear equations, one ought perhaps to focus on solutions techniques for linear systems, as you did.
     
    Last edited: Jul 13, 2005
  6. Jul 13, 2005 #5
    Massive parallel processor supercomputers are typically used to effect simultaneous processing.
    Of course, the hard part is encoding correctly.
     
  7. Jul 13, 2005 #6

    berkeman

    User Avatar

    Staff: Mentor

    As long as the equations are linear, you can solve them by using Gaussian elimination on the augmented matrix. It's not the fastest way to do it, especially for larger systems of equations, but it's the most intuitive technique, IMO, and pretty simple to code up. Are you looking to write something for yourself to help you learn more about linear algebra?

    Or, as was stated earlier, if your systems of equations contain non-linear terms, things get a lot more complicated...
     
  8. Jul 13, 2005 #7

    PerennialII

    User Avatar
    Science Advisor
    Gold Member

    There are pretty efficient sparse solvers available in many codes (and the implementations aren't that many lines of code actually), when it gets bigger in many problems iterative solvers can produce a nice performance increase (and lessen e.g. storage requirements) .... lots of stuff available about this topic.
     
  9. Jul 13, 2005 #8

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    What do you mean by that?
     
  10. Jul 13, 2005 #9

    lurflurf

    User Avatar
    Homework Helper

    I hope you know the evils of cramer's rule. It is bad news.
     
  11. Jul 13, 2005 #10

    Probably that most nonlinear systems are "solved" by linearizing over and over and solving the linear systems.
     
  12. Jul 14, 2005 #11
  13. Jul 14, 2005 #12

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    As LeBrad mentioned, there aren't any standard, foolproof solution procedure for non-linear equations in general in the way there are for linear systems.

    I'm not saying that various types of iteration processes are "wrong".
    Most definitely, they are not.
     
  14. Jul 14, 2005 #13
    Thank you for all the replies.

    Actually I am looking forward to implementing the vortex panel method in Java. Thing is, methods like Gaussian elimination are fine, only I am finding it difficult how to encode the appropriate elementary row operations to convert the matrix to a triangular one.
     
  15. Jul 14, 2005 #14

    lurflurf

    User Avatar
    Homework Helper

    You just need to think of about Gaussian elimination in a systematic way. That is for an arbitrary matrix at an arbitrary stage in reduction what should be done next. A few whiles and fors and it is done. Other things to think about are if you need to solve multiple systems having the same matrix you might consider using a LU decomposition. To help with round off you might consider full or partial pivoting, or conbining iterative and direct methods.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Calculation of simultaneous equations
  1. Simultaneous Equations (Replies: 12)

  2. Simultaneous equations (Replies: 8)

  3. Simultaneous Equations (Replies: 21)

  4. Simultaneous equations (Replies: 11)

  5. Simultaneous equations (Replies: 7)

Loading...