Simultaneous equations are equations that involves two or more unknown variables. There must be as many equations as the number of unknown variables in order for us to solve the problem. There two types of simultaneous equations, the first is liner and the second is mixed. For linear simultaneous equations, please refer to linear simultaneous equations.In this example, we will show you how to design a program that can solve mixed simultaneous equations, that is , one linear equation and one quadratic equation.
Mixed simultaneous equations take the following forms:
Simultaneous equations can normally be solved by the substitution or elimination methods. In this program, we employed the substitution method. So, we obtained the following formulas:
x1 = (m a d + Sqr(m 2 a 2 d 2 - (b 2 c + a 2 d) (d m 2 - b 2 n))) / (b 2 c + a 2 d)
x2 = (m a d +-Sqr(m 2 a 2 d 2 - (b 2 c + a 2 d) (d m 2 - b 2 n))) / (b 2 c + a 2 d)
y1 = (m - a x1) / b
y2 = (m - a x2) / b
To limit the answers to two decimal places, I used the round function.
Private Sub Command1_Click()
Copyright ® 2008 Dr.Liew Voon Kiong . All rights reserved |Contact: firstname.lastname@example.org