full screen background image

sosto.net blog - montagne del ticino
sosto.net blog - montagne del ticino
#linux

Solving linear equation systems in Linux

A few days ago, while working at an exercise paper for the lecture Information Theory, Gionni, Micheal and I were confronted with the need to solve the following equation system:

clem's blog image

After a fruitless Google search, I recalled that some time in the past I had heard about a tool called maxima.
And, I found out, Maxima is indeed a very powerful scientific calculator.

The following code allowed us to solve the equation system:

linsolve ([x+y+z=1,
y=(18/109)*x+(131/160)*y+(10/23)*z,
z=(15/218)*x+(1/16)*y+(4/23)*z],
[x, y, z]);


producing the following, exact result:

x = 98318/250043
y = 133440/250043
z = 18285/250043


Further, it is possible to get an approximated result by using the function float:

float(linsolve ([x+y+z=1,
y=(18/109)*x+(131/160)*y+(10/23)*z,
z=(15/218)*x+(1/16)*y+(4/23)*z],
[x, y, z]));


and here is the corresponding output:

x = 0.39320436884856
y = 0.53366820906804
z = 0.073127422083402


This page provides several links to Maxima Documentation. I found A Maxima Guide for Calculus Students very helpful!


Update (11/05/2007)
The previous equation system is used to solve the exercise 1.2 of the exercise paper attached to this post.

Update (15/06/2007)
The following code is used to define a function:

define('(log2(x)), (log(x) / log(2)) );

sosto.net tombstone

coshomments
Laisse-nous un commentaire.


nom* (20 caractères maximum)

adresse e-mail* (ne sera pas publié)

commetaire*

hastags

Voir tous les hashtags.

rechercher


links sosto.net

Instagram

Pixelfed

clemspace.ch


archive

aprile (0)
marzo (1)
febbraio (2)

Archives

les plus lus

Da Bosco Gurin alla Val Bedretto, via Basodino

Gazzirola e Camoghè

Via alta della Val Carassina

settings

A–   A+

italiano
français
english

sosto.net - top of the page


cross cross cross sandwich fullscreen fullscreen resize resize fullscreen fullscreen fullscreen fullscreen fullscreen fullscreen fullscreen