SolveNd

SolveNd

SolveNd[ {expr1, expr2}, {var1, var2} ] solves a set of equations, given a set of variables.

Usages

SolveNd[ {expr1, expr2}, {var1, var2} ]

SolveNd[ {expr1, expr2}, {var1, var2} ] solves a set of equations { expr1, expr2 } for variables { var1, var2 }.

Example in reduced
The solution for the set of equations {x^2=1, x-y=1}. SolveNd[{x^2=1, x-y=1}, {x,y}] { x=1, y=0 } or { x=-1, y=-2 }

SolveNd[ {expr1, expr2}, {var1, var2}, domain ]

SolveNd[ {expr1, expr2}, {var1, var2}, domain ] solves a set of equations { expr1, expr2 } for variables { var1, var2 }, taking a domain into account.

Example in reduced
The solution for the set of equations {x^2=1, x-y=1} for the domain x>0. SolveNd[{x^2=1, x-y=1}, {x,y}, x>0] { x=1, y=0 }
The solution for the set of equations {x^2=1, x-y=1} for the domain x+y>0 (so a relation between x and y in the domain). SolveNd[{x^2=1, x-y=1}, {x,y}, x+y>0] { x=1, y=0 }
The solution for the set of equations {x^2=1, x-y=1}, with multiple domain relations, the domains x>0 and y>0. SolveNd[{x^2=1, x-y=1}, {x,y}, {x>0,y>0}] no solution
Options

Method

Method selects one of the available methods for solving the system of equations. The available solution methods are 'Eliminate', 'Equate' and 'Substitute'. By default, the method is 'Eliminate'.

Syntax Example
SolveNd[{ expr1, expr2 }, { var1, var2 }, Method=>'method'] SolveNd[{x^2=1, x-y=1}, {x,y}, Method=>'Equate']

RestrictVariable

RestrictVariable restricts the variable we want to solve for. If set, the system of equations is only solved for var1, not for the other variables.

Syntax Example
SolveNd[{ expr1, expr2 }, { var1, var2 }, RestrictVariable=>var1~] SolveNd[ {2k-4= 2a,2-3k = -5a}, {k, a}, RestrictVariable=>k ]