The output is a list of lists of rules. Each sublist represents a possible value of x. To look at the first solution as a rule, we can run:
The symbol is
x, and its value is
- 2 - Sqrt. The ReplaceAll command ( /. ) replaces every instance of the symbol with a value according to a rule. For example, if we want to replace all instances of
x in the polynomial
x^2 + 4 x - 1 with the first root of the polynomial above, we could write:
This results in an expression that is equal to zero.
If we want to get the second root of the polynomial and assign it to a new variable called secondRoot, we could evaluate:
Please see the tutorial on using rules for more examples and information on how to use them.
For some functions, such as NDSolve, an equivalent “Value” function exists (e.g., NDSolveValue ) that returns a value or function instead of rules.
Whether you have a question about billing, activation or something more technical, we are ready to help you.
1-800-WOLFRAM (+1-217-398-0700 for international callers)
8am–5pm US Central Time
- Product registration or activation
- Pre-sales information and ordering
- Help with installation and first launch
Advanced Technical Support (for eligible customers)
8am–7pm US Central Time
8:30–10am & 11am–5pm US Central Time
- Priority technical support
- Product assistance from Wolfram experts
- Help with Wolfram Language programming
- Advanced installation support