FANDOM


Solve takes a system of equations and attempts to solve it for the given symbol(s). Solve only attempts to find exact/analytic solutions (i.e. no approximations). To find numerical/approximate solutions to a system of equations, use NSolve. Also, Solve is not designed to solve differential equations (as these are handled by DSolve). 

Introduction (L0) Edit

At the very least, Solve takes two arguments and returns a list of replacement rules

Argument 1: The system of equationsEdit

To describe the system of interest, the user passes a list of equations descrbing the system. Each equation consists of a left-hand-side (LHS), an inequality, and a right-hand-side (RHS).

LHS inequality RHS

Conventionally, the LHS is a collection of numbers and symbols, the "inequality" is actually equality (==) , and the RHS is a number/constant (however, being a "convention", Mathemtica will know what to do if you stray from it).

x^2-x-1 == 0

Each equation describing the system is an item in the list, and there is no limit to the number of equations one can supply (hence there is no limit to the length of the list). However, the list must have only one level (i.e. the list is like a vector, comma seperated items enclosed by brackets, but with no other sets of brackets inside the main set). 

RIGHT: {eq1, eq2, eq3, ..., eqN}
WRONG: {{eq1, eq2}, eq3, ..., eqN}

! Common Mistake: Wrong equals sign !Edit

Most equations use the standard mathemtical equals sign (=) rather than inequalities (>, <, etc.). This denotes the equality of the LHS and RHS of the equation (i.e. they always have the same value). However, in Mathemtica the standard equals sign is used for assignment (=), to assign a value to a symbol, while equality is expressed through the double equals sign (==). Thus, if one has written an equation on a piece of paper using an equals sign, when inputting that equation into Mathematica they must use the double equals sign. 

RIGHT: x^2-x-1 == 0
WRONG: x^2-x-1 = 0

Using the single equals sign will attempt to assign the value of the RHS to the LHS, treating the LHS as a symbolMathemtica will not view it as an equation and Solve will not work properly. 

Argument 2: The symbols to be solved forEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.