cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Gaussian Elimination for a system of equations

Gilgamesh
4-Participant

Gaussian Elimination for a system of equations

Hello guys,

I'm new into Mathcad Prime and this community, so please bear with me.

I'm trying to make a template to solve systems of linear equations with the Gaussion Elimination method.

I would like to know, if anyone in this community has a template to solve any kind equation systems with Gaussian Elimination?

I have attached a file with a system of equations, that I would like to solve with such template.

Thank you!

PS: I use Mathcad Prime 3.1

Udklip.JPG

8 REPLIES 8
Werner_E
25-Diamond I
(To:Gilgamesh)


I have attached a file

No, you didn't. All we see is the picture. At the time being you are not allowed to attach Mathcad or Prime files directly - you have to put them in an archive first (zip, rar, ..)

 

So you are not interested in the simple solution of such system, right? There would be a lot of different ways you could achieve that in Mathcad. You want Mathcad to show you step by step how to do it manually using the Gauß algorithm, right?

Mathcad is not made for showing you the calculation steps but rather will give you the final result only. I gues with some programming it would be possible to achieve what you are looking for, but then - why? There are websites which will do exctly that, no need to reinvent the wheel, I guess. E.g. a German one is http://www.arndt-bruenner.de/mathe/scripts/gleichungssysteme.htm A possible outout of that site is in the attached file.

 

Gilgamesh
4-Participant
(To:Werner_E)

Thank you for your answer. Let me clarify my request with the following simple example: In the attached picture, I have set up a template to solve a system of linear equations with Cramers Rule. I can fill the matrice, and the results pops up, but the important thing is, that it shows the steps necessary to calculate the the solution.

 

I had something similar in mind for solving systems of linear equations with Gaussion Elimination, but I couldn't establish a general rule to solve them that way.

I hope that clarifies it.Udklip22.JPG

Werner_E
25-Diamond I
(To:Gilgamesh)

I already guessed that you would like a sheet which shows you the single steps of the Guaß solution as on the web page I linked you to.

It would require some programming to generate the various matrices until you arrive at the upper triangular matrix.

You would have to decide which variant of Gauß you'd like to use (with or without pivoting, Gauß-Jordan, ..) and also find a way to deal with systems which don't have a unique solution (either no solution at all or an infinite number of solutions depending on one ore more parameters).

So this would be quite some work and I doubt that anybody here would be willing to this for you. But if you want to give it a try and experience problems you sure will find a helpful hand here.

 

Your Cramer sheet (better: the pic you posted) does in no way show the calculation steps necessary. We son't see the determinant filled with numbers, we dont see the values of the determiants. All we see is the method how to calculate the results using determinants. Furthermore your sheet will work only with 3 equations in 3 variables and will throw an error if the solution is not uniqe (determinant of coefficients = 0) without distinguishing between the two different cases whoch can lead to that error.

Gauß is not a method that rigid as Cramer - the single steps would depend on the concrete values used. Especially when you implement pivoting. Thats why programming will be required.

 

BTW - whats the reason for your wish to have that kind of sheet. What will the purpose of it be?

 

Gilgamesh
4-Participant
(To:Werner_E)

Yeah, it definitely has some limits.

My reason for seeking such template, is for my math exam.

I've seen that some people have tried to make such template with programming (they made a for-loop, i think), but I have no experience with programming, so I will just avoid that solution.

 

But it seems like there's no simple way to create such document, so I'll just forget it.

Thank you for your replies and time 🙂

Werner_E
25-Diamond I
(To:Gilgamesh)

Why don't you just use one of the websites which as it seems provide exactly what you need?

I am sure the German one I linked to is not the only one and you will find ones in other languages, too.

 

As for Mathcadm Gauß and programming - you might find those links interesting. It sure would be necessary to change the programs to give you a full list of the matrices in the various states, but it may be a starting point:

http://www.math-tech.at/beispiel.asp?id=101

https://www.coursehero.com/file/10751007/Mathcad-Gauss-elimination-generates-LU-factors/

Both deal with older version of Mathcad, but that should not be that big a problem.

 

Gilgamesh
4-Participant
(To:Werner_E)

Oh, I've found several online calculator to do the job, but internet is prohibited during exams 🙂

I will into the links you've providede, thank you 🙂

Werner_E
25-Diamond I
(To:Gilgamesh)


@Gilgamesh wrote:

Oh, I've found several online calculator to do the job, but internet is prohibited during exams 🙂


And computers with Mathcad are allowed!? Surprising!

Good luck!

 

P.S.: You may also search this forum for "Gauss elimination". You should get a lot of hits - maybe some are useful for you.

Werner_E
25-Diamond I
(To:Gilgamesh)

In case you don't know how to solve linear (and also non-linear) systems in Prime, here are four ways to solve your system:

GLS.png

Prime file (format 3.0, you should be able to open in with P31) is attached.

Announcements

Top Tags