It will be more fit to balance chemical equations

Solved

Posted on 2004-09-16

What is the concept behind solving simultaneous equations in visual basic? I want to make a prgram to balance chemical equations, and this is part of it. the maximum unknowns will probably be 5. but i am not sure how to do it. please help.

also, is there any good way of making this balancer? any suggestions are welcomed. thanks.

also, is there any good way of making this balancer? any suggestions are welcomed. thanks.

8 Comments

Here's a link to a page describing the technique:

http://mathworld.wolfram.com/GaussianElimination.html

Its a pretty similar idea apart from matricies go on a lot further as to solving more unknowns... its a big thing we did in a maths unit for degree level Computer Science

1) Matrix method

2) Determinant method (Cramer's rule)

3) By direct solving (As we do for 2 unknowns)

Among these most effecient method is 2).

But it is unfortunate that you should use a good algorithm to get the determinant of the matrices of any order. Because you have stated that the number of unknowns may be upto 5.

If you succeed in getting the Determinant then your problem is solved. Determinant can be found by using Recursion Technique.

For ex:

ax + by + cz = p

dx + ey + fz = q

gx + hy + iz = r

can be solved as

x = Δ1/Δ

y = Δ2/Δ

z = Δ3/Δ

where

| a b c | | p b c | | a p c | | a b p |

Δ = | d e f | Δ1 = | q e f | Δ2 = | d q f | Δ3 = | d e q |

| g h i | | r h i | | g r i | | g h r |

Good Luck!

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/_gdiplus_matrix_representation_of_transformations_about.asp

Also interesting:

http://www.euclideanspace.com/maths/algebra/matrix/

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Title | # Comments | Views | Activity |
---|---|---|---|

Exe program is not a valid Win 32 application | 15 | 103 | |

VB 6.0 printer how to align | 6 | 57 | |

how to send memory stream from ics Client To ics server ? | 11 | 79 | |

Controlled Assessment GCSE - desperate help needed | 4 | 75 |

Join the community of 500,000 technology professionals and ask your questions.

Connect with top rated Experts

**6** Experts available now in Live!