|
||||||||||||||||
![]() ![]() |
||||||||||||||||
| | | | | | | | | | ||||||||||||
| | | | | | | | | | ||||||||||||
| | | | | | | | | | ||||||||||||
Equations and systems of equations |
||||||||||||||||||||||||||||||||
wiris uses the most advanced techniques available to solve linear and non-linear equations and systems of equations. It can also use some numerical methods to approximate solutions to equations and systems. Additionally, wiris can solve inequalities and ordinary differential equations.
solve is the command used to solve equations and systems of equations. The section, Mathematical Objects explains how to build equations. wiris first attempts to find all solutions to the equation or system of equations using exact procedures. If it is not successful in finding an exact solution, it can always attempt to find the numerical solution using the command numerical_solve. wiris returns the solutions found in list format. If it cannot find a solution by exact means or by numerical procedures, wiris returns an empty list. Equation To solve an equation, enter it as the first argument in the solve command, followed by the variable to be isolated. If this variable is not specified, wiris assumes that the user wishes to use all the variables that appear in the equation and isolate one as a function of the others. Use the
Whether or not the variable to be isolated is specified or not, it is possible to add the
System of Equations A system of equations is a list of equations. The simplest way to build a system of equations is to use vertical lists, which can be created using the icon As with the solving of equations, if the variables to be isolated are not specified, wirisconsiders all the system variables, and if necessary, it returns a parametric solution. To specify the variables to be isolated, enter these as the second argument of the solve command within a list.
Given a linear system in matrix form A·xT=bT , where A is the matrix for the system, x is the vector of unknowns and b is the vector of independent terms, the system can be solved using the command solve(A,b). The elements of matrix A and vector b can be any mathematical expression. The results from this command vary according to the type of system:
wiris uses different numerical methods to solve equations. In each case it chooses the most appropriate and tries to find a solution starting from an initial point or interval. The command to solve equations using these methods is numerical_solve. wiris chooses the most appropriate method for each case, so it is not necessary for the user to understand the different methods available and the advantages of each one. Note that the act of searching for a unique solution to the equation means that the results obtained are different in nature from those obtained by the command solve.
The numerical_solve command can also be applied to a system of equations, but keep in mind that this only returns one solution to the system.
The solution of an equation or system of equations is a list of lists. The outermost list is necessary when the equation has more than one solution. The inside list is comprised of pairs x=a where x is a variable of the equation or system and a is its value for the given solution. To work with the solutions, we can obtain the values for these solutions in a number of ways:
wiris has a way to solve ordinary differential equations. Notice that when entering the derived function, the
wiris is also capable of solving inequalities and systems of inequalities, with a single variable, using exact methods or numerical procedures to obtain an approximate solution. In a similar way to the previous cases, the solve_inequation command can be called without specifying the variable to be isolated, or the variable can be specified as a second parameter after the equation or system.
Notice that if the inequality or system does not have a solution or alternatively if it is true for all variable values wiris returns false or true, respectively. This particular behaviour is due to the common use of inequalities for control of flow in programming languages (and specifically in wiris). To learn more about this, see the section on WIRIS ++. |
|
||
![]() |
powered by WIRIS
©2003 maths for more sl. All rights reserved. Legal notice |