solve - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Factorization and Solving Equations : solve : solve

solve

solve one or more equations

 

Calling Sequence

Parameters

Basic Information

Examples

Details

Calling Sequence

solve(equations, variables)

Parameters

equations

-

equation or inequality, or set or list of equations or inequalities

variables

-

(optional) name or set or list of names; unknown(s) for which to solve

Basic Information

Description

• 

The solve command solves one or more equations or inequalities for their unknowns.

Output

• 

If the second argument is a name or a set of names, then the solutions to a single equation are returned as an expression sequence. If the second argument is a list, then the solutions are returned as a list.

• 

If the second argument is a name or a set of names, then the solutions to a set or list of equations are returned as sets of equation sequences. If the second argument is a list, then the solutions are returned as a sorted listlist of equations.

• 

If the solve command does not find any solutions, then if the second argument is a name or set of names, then the empty sequence (NULL) is returned; if the second argument is a list, then the empty list is returned. This means that there are no solutions, or the solve command cannot find the solutions. In the second case, a warning is issued, and the global variable _SolutionsMayBeLost is set to true.

• 

If the output of the solve command is a piecewise-defined expression, then the assuming command can be used to isolate the desired solution(s). If the output is not piecewise-defined, in particular, if the output is constant, assumptions on the independent variables may be ignored. If there are parameters in the input equations, the solve command will use those assumptions in its computations. See examples below.

• 

For higher degree polynomial equations, Maple returns implicit solutions in terms of RootOf.

Examples

Solve an implicit function

  

In this example, solve is used to express an implicit function in an explicit form

solve2x=3,x

32

(1)
  

The second example illustrates the use of solve to get solution as an equation

solvef=ma,a

fm

(2)

Solve a quadratic equation

solvex23x+2=0,x

1,2

(3)

Specifying variables

  

To ignore parameters, specify the variables for which to solve.

solvea2c24b2b=a6b4a3b,c

c=ba32a,c=ba32a

(4)

Solving linear systems

  

The solve command can solve linear systems.

solvex+y+z=2,2x+y=3,z=1,x,y,z

x=2,y=1,z=1

(5)

Solving inequations

  

The solve command can solve inequations.

solvex&plus;y<10&comma;x2&equals;9&comma;x&comma;y

x&equals;3&comma;y<13&comma;x&equals;3&comma;y<7

(6)

Using the assuming command to isolate a solution

  

Assumptions on parameters can be used to get more specific solutions.  Note also, the form of the output changes when variables are given in a list.

solvex2&equals;a&comma;xassuminga::negative

x&equals;Ia&comma;x&equals;Ia

(7)

solveb<ax&comma;xassuming1<a

ba<x

(8)

Using RootOf expressions as placeholders to solutions of  high-degree polynomials

  

The explicit solutions to high-degree polynomials can be very large, so Maple may return a solution using RootOf expressions as placeholders.

solvex4x3&plus;1&comma;x

RootOf_Z4_Z3&plus;1&comma;index&equals;1&comma;RootOf_Z4_Z3&plus;1&comma;index&equals;2&comma;RootOf_Z4_Z3&plus;1&comma;index&equals;3&comma;RootOf_Z4_Z3&plus;1&comma;index&equals;4

(9)
  

Maple may also use RootOf expressions as placeholders when it cannot find an explicit form for the solution of a non-algebraic equation in one variable.

solvecosx2&equals;2cosx&plus;x&comma;x

RootOf2cos_Zcos_Z2&plus;_Z

(10)

No solutions found

  

In the following example, solve does not find a solution to the set of equations, and as mentioned above in the Description section, if the second argument variables is a set, the empty sequence is returned.

solvex&plus;y&equals;1&comma;2x&plus;2y&equals;4&comma;x&comma;y

  

Here, solve does not find a solution to the list of equations. Since more than one variable is received in a list, the empty list is returned.

solvex&plus;y&equals;1&comma;2x&plus;2y&equals;4&comma;x&comma;y

(11)

Details

  

For detailed information including:

• 

Complete description of all parameters

• 

Complete description of functionality

• 

Complete description of output

• 

Shortcuts for specifying equations and unknowns

• 

Controlling the form and number of solutions returned

  

see the solve/details help page.

See Also

dsolve

eliminate

fsolve

intsolve

LinearAlgebra[LinearSolve]

pdsolve

RealDomain

RootOf

singular

solve/details

SolveTools

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam