Calcpad icon indicating copy to clipboard operation
Calcpad copied to clipboard

Multiple equations solver

Open jgagnonNT opened this issue 2 years ago • 2 comments

Hello, is there a way to solve a system of multiple equations with multiple unknowns? If not I beleive it would be a great addition to the software.

jgagnonNT avatar Dec 20 '23 00:12 jgagnonNT

Hi! Yes, it is possible to some extent.

But, if you mean large systems of linear and non-linear equations, they will be implemented in effective and easy-to-use way, after we add vectors and matrices to Calcpad.

For small systems, you can apply the current $root and $find methods subsequentially for each equation. Bellow is an example for solving a system of two nonlinear equations:

"System of two nonlinear equations
f_1(x; y) = x^2 + y^2 - 4'= 0 - equation 1
f_2(x; y) = e^x - y - 1'= 0 - equation 2
a = 0', 'b = 2
c = 1', 'd = 2
'Find "x" from equation 1
x_0(y) = $Find{f_1(x; y) @ x = a : b}
'Find "y" from equation 2
y_0 = $Find{f_2(x_0(y); y) @ y = c : d}
x_0 = x_0(y_0)
'Check the roots
f_1(x_0; y_0)
f_2(x_0; y_0)

image

In a similar way, systems with three, four and five equations can be solved. I believe that for larger systems, this method will become too ineffective.

Proektsoftbg avatar Dec 21 '23 23:12 Proektsoftbg

Thank you! That is a neat workaround! It requires a bit more of thinking. I am looking forward to the solver for the systems of equation.

jgagnonNT avatar Dec 22 '23 18:12 jgagnonNT