Skip navigation
16252 Views 28 Replies Latest reply: Sep 26, 2010 12:57 PM by jeanGiraud RSS
AlvaroDíaz Silver 895 posts since
Oct 5, 2001
Currently Being Moderated

Apr 27, 2009 12:00 AM

Cramer's rule

Cramer's rule in Mathcad.

Alvaro.
Attachments:
  • ptc-1368288 Copper 15,155 posts since
    Nov 15, 2007
    Currently Being Moderated
    Apr 27, 2009 12:00 AM (in response to AlvaroDíaz)
    Cramer's rule
    On 4/27/2009 9:24:19 AM, adiaz wrote:
    >Cramer's rule in Mathcad.
    >
    >Alvaro.
    __________________________

    Past a certain size of the system, the solving is by Cholesky decomposition. But I don't know about at what size it starts. Cramer is for the first year algebra class ! The Gauss decomposition was well used at the times of TI-59 but the memory was the limit, may be close to 10 equations ?

    Jean



    Attachments:
  • PhilipOakley Silver 2,084 posts since
    Feb 20, 2007
    Currently Being Moderated
    Apr 28, 2009 12:00 AM (in response to Narlin)
    Cramer's rule
    On 4/28/2009 9:45:37 AM, Narlin wrote:
    >Gaussian elimination is pretty
    >good for most scientific and
    >engineering calculation. I
    >have had to program it into
    >dozens of languages over the
    >years - somewhat surprisingly
    >MCad is one of the more
    >difficult ones.

    I found that too. And the various speed up versions that select the best row element to diagonalise.

    I posted a thread some wher about it. If I remember I wanted an inner for loop which had an i<>j exclusion in it...

    Philip Oakley
    • TomGutman Silver 10,537 posts since
      Oct 22, 2006
      Currently Being Moderated
      Apr 28, 2009 12:00 AM (in response to PhilipOakley)
      Cramer's rule
      >>If I remember I wanted an inner for loop which had an i<>j exclusion in it...<<

      That's a continue statement.
      __________________
      � � � � Tom Gutman
      • PhilipOakley Silver 2,084 posts since
        Feb 20, 2007
        Currently Being Moderated
        Apr 28, 2009 12:00 AM (in response to TomGutman)
        Cramer's rule
        On 4/28/2009 3:56:21 PM, Tom_Gutman wrote:
        >>>If I remember I wanted an inner for loop which had an i<>j exclusion in it...<<
        >
        >That's a continue statement.
        >__________________
        >� � � � Tom Gutman

        Just looked up my old notes (2006) - it was the partial pivoting / Scaled partial pivoting method for LU/Gaussian elimination that I was looking at.

        I'll try to remember the "continue" statement, which I rarely use :-(

        Somehow it doesn't feel right to have that "skip" style command. (it's almost like a GOTO End !)

        Philip Oakley
  • ptc-1368288 Copper 15,155 posts since
    Nov 15, 2007
    Currently Being Moderated
    Apr 28, 2009 12:00 AM (in response to Narlin)
    Cramer's rule
    It shouldn't be more difficult programing Gauss elimination in Mathcad than it was in TI-59, should it ?

    jmG
  • TomGutman Silver 10,537 posts since
    Oct 22, 2006
    Currently Being Moderated
    Apr 28, 2009 12:00 AM (in response to AlvaroDíaz)
    Cramer's rule
    Cramer is almost never a good option. To use it you need to calculate the determinant of the matrix. Getting the entire solution is only slightly more work than simply calculating the determinant. A lot less than the two determinants which is the minimum for Cramer's rule (solving for only one variable).
    __________________
    � � � � Tom Gutman
  • Narlin Copper 158 posts since
    May 20, 2001
    Currently Being Moderated
    Apr 28, 2009 12:00 AM (in response to AlvaroDíaz)
    Cramer's rule
    Cramer's Rule is useful for teaching purposes but not so great for calculation as has been shown in these posts.
    Gaussian elimination is pretty good for most scientific and engineering calculation. I have had to program it into dozens of languages over the years - somewhat surprisingly MCad is one of the more difficult ones.
    Anyway, many students find Gaussian elimination boring and tedious to follow. Long ago i found a flowchart in textbook (reference lost) that showed how to program a set of simultaneous equations as a square matrix of coefficients plus a right hand column of constant values, to untangle it all and get a diagonal matrix of "1"s and the value of each unknown down the right hand column.
    I have attached both the flowchart and a MathCad example.
    However, the real use of the flowchart is for stupid languages like javascript or php, so that you can do live math on a web site.

    Regards,
    narlin
    Attachments:
  • ptc-1368288 Copper 15,155 posts since
    Nov 15, 2007
    Currently Being Moderated
    Oct 12, 2009 12:00 AM (in response to lvl107)
    Cramer's rule
    On 10/12/2009 9:09:17 PM, lvl107 wrote:
    > ...There's an error...
    ________________________

    Cramer has no use in real modern maths. The other thing you may be doing no use either. Matrix operations are essentially based on Cholesky. So, just use Mathcad matrix operations from Mathcad native numerical algos. In other words: there is nothing to program with "Cramer museum".

    jmG



    • ptc-1368288 Copper 15,155 posts since
      Nov 15, 2007
      Currently Being Moderated
      Oct 13, 2009 12:00 AM (in response to ptc-1368288)
      Cramer's rule
      Didn't realised the subject is an old vintage and was already commented.

      >Gaussian elimination is pretty good for most scientific and engineering calculation. I have had to program it into dozens of languages over the years - somewhat surprisingly MCad is one of the more difficult ones.< [Narlin]

      ==> not sure how to interpret:
      ==> programming environments/languages ?
      ==> or "Pocket Calculators"
      ==> what would be the use of either programming environment or language not doing the minimum linear algebra.

      When it is applicable, the Cholesky decomposition is roughly twice as efficient as the LU decomposition for solving systems of linear equations.[1]

      jmG

  • ptc-1368288 Copper 15,155 posts since
    Nov 15, 2007
    Currently Being Moderated
    Oct 13, 2009 12:00 AM (in response to AlvaroDíaz)
    Cramer's rule
    On 10/13/2009 2:31:36 AM, adiaz wrote:
    >On 10/12/2009 9:09:17 PM, lvl107
    >wrote:
    > ...There's an error...

    Check
    >please if this fix all the
    >cases.
    Regards. Alvaro.
    ___________________________

    Elementary Row Operations on Matrices (Mathsoft Matrix treasury).

    jmG



    Attachments:
    • TomGutman Silver 10,537 posts since
      Oct 22, 2006
      Currently Being Moderated
      Oct 13, 2009 12:00 AM (in response to AlvaroDíaz)
      Cramer's rule
      I don't understand your point. I didn't question this post in the collaboratory, nor the placement in this particular section. I questioned the placement of this post, dealing with an error in a particular implementation of a reduction to echelon for, in an established thread dealing with Cramer's rule. It is a quite different issue, and should start its own thread.

      As to the point of the post, well, what is it? The post merely states that there is an error, borne out by the sheet. Is this just a complaint about the particular implementation (source unknown)? Or is it a statement that the echelon form solution doesn't work in general?

      If indeed intended as commentary of some sort in the particular implemention, what is wanted? The identification of where the error occurs (a lot of users seem to have never learned to use the error trace facility)? A patch type fix for this particular routine? A general discussion of how to do gaussian elimination in a robust way?
      __________________
      � � � � Tom Gutman

More Like This

  • Retrieving data ...

Bookmarked By (0)