Solve - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


PDEtools

  

Solve

  

unified command to compute exact, series, or numerical solutions, possibly independent of indicated variables, for systems of algebraic or differential equations, possibly including inequations, initial values, or boundary conditions

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Solve(sys, solving_variables, options=value)

Parameters

sys

-

algebraic and/or differential equation, or a set of list of them possibly containing inequations and initial or boundary conditions

solving_variables

-

name or a function or a set or list (indicates solving ordering) of them that could include both names and functions, possibly ranked in sublists, altogether indicating the solving variables

algebraically = ...

-

(optional) true or false (default value); indicates that the solving variables and their derivatives are to be considered objects independent of each other when solving for the variables

independentof = ...

-

(optional) name or a set or list of them indicating that the solutions computed must be independent of these names

implicit

-

(optional) to return solutions when they are in implicit form - by default these solutions are discarded and only explicit solutions are returned

overridefunctiondependency = ...

-

(optional) true (default value) or false, to override the dependency of a solving function with respect to variables indicated in independentof = ...

simplifier = ..

-

(optional) can be any valid Maple object or procedure; its default value is simplify

solver = ..

-

(optional) can be solve, dsolve, pdsolve, fsolve, or any of the PDEtools commands FunctionFieldSolutions, InvariantSolutions, PolynomialSolutions or SimilaritySolutions.

..other..

-

(optional) numeric or series or any of the optional arguments accepted by solve, dsolve, pdsolve, fsolve, or the solver specified with the option solver = ...

Description

• 

The Solve command computes the value of solving_variables that solves a system of equations sys. The system being solved can involve algebraic or differential equations, or both. You can request an exact (default), numeric, or series solution (respectively use the option numeric or series). In this sense, Solve is a unified command that understands when to call solve, fsolve, dsolve, or pdsolve according to your input, also facilitating the analysis of different types of solutions by just adding the keywords series or numeric.

• 

In addition of being a single interface with unified syntax for various Maple solvers, Solve permits computing exact, numeric, and series solutions that are independent of certain variables, indicated with the option independentof = ..., where the right-hand side can be a name, or a set or list of them. This is particularly useful when solving (typically non-polynomial) algebraic expressions with respect to some names and where the solutions desired shall not depend on some of the other names present in the system. The solutions returned are thus valid for arbitrary values of those other names. This option is also useful when computing solutions to partial differential equations and the solutions desired shall not depend on some of the variables of the problem.

• 

For all kinds of systems, algebraic, differential, or mixed, when the system can be solved, the output consists of a sequence of equations with the solving variable isolated in the left-hand side, when sys is one equation and solving_variables one solving variable, and a sequence of sets of such equations when there is more than one solving variable or equation, or when any of them is passed as a set or list.

• 

As is the case of other solvers, for Solve the unknowns may or not be specified. When the unknowns are specified (as a name, function, or a set or list of them, possibly including nested sets or lists indicating solving rankings as explained in casesplit), only these ones specified are considered unknowns and any other function is considered arbitrary. The solution is then expected to be valid for arbitrary values of these arbitrary functions. On the other hand, when the unknowns are not specified, all functions - differentiated or not - are considered unknowns, and when there are no functions then all names that are not constants are taken as the unknowns.

• 

In all cases, when no solution is found or the solutions cannot be turned explicit, Solve returns NULL. To receive implicit solutions that some solvers can compute, for instance by dsolve, pdsolve, or solve, use the option implicit. Also, passing the optional argument parametric accepted by some solvers automatically turns ON the option implicit of Solve.

• 

When restricting the dependency of the solutions with the option independentof = ..., one may or may not want to override with that statement the dependency of the solving functions of the problem. For this purpose use the additional optional argument overridefunctiondependency = false. For example, that permits computing solutions with some unknowns independent of the independentof = ... variables while other unknowns do depend on them. The default behavior is overridefunctiondependency = true so that all the right-hand sides of the solutions returned will be independent of the indicated variables.

• 

It is sometimes necessary to solve a system with respect to some unknowns while considering derivatives of those unknowns as independent objects, for example: solve for yx the equation y'xyx to obtain yx=y'x instead of yx=_C1ⅇx. For these purposes use the option algebraically.

• 

You can override the solver to be used by optionally indicating solver = ... where the right-hand side can be any of solve, fsolve, dsolve, or pdsolve, or one of the PDEtools commands FunctionFieldSolutions, InvariantSolutions, PolynomialSolutions or SimilaritySolutions.

Examples

withPDEtools,Solve

Solve

(1)

Unified solver for computing exact, series, and numeric solutions

  

Solve solves systems of equations with respect to solving variables, automatically calling the appropriate solver for your input.

eq1ax2+bx+c=0

eq1ax2+bx+c=0

(2)

Solveeq1,x

x=b+4ac+b22a,x=b+4ac+b22a

(3)
  

A numeric solution for a,b,c independent of x

Solveeq1,a,b,c,independentof=x,numeric

a=0.,b=0.,c=0.

(4)
  

Exact and series solutions for an ODE

eq2diffyx,x=yx

eq2ⅆⅆxyx=yx

(5)

Solveeq2

yx=c__1ⅇx

(6)

Solveeq2,algebraically

yx=ⅆⅆxyx

(7)

Solveeq2,series

yx=y0+y0x+12y0x2+16y0x3+124y0x4+1120y0x5+Ox6

(8)
  

A PDE problem, also with boundary conditions

eq4diffux,t,t+cdiffux,t,x=λux,t

eq4tux,t+cxux,t=λux,t

(9)

Solveeq4

ux,t=f__1tcxcⅇλxc

(10)

bc4ux,0=φx

bc4ux,0=φx

(11)

sol5Solveeq4,bc4

sol5ux,t=φtc+xⅇλt

(12)
  

Numerical solution for a PDE with boundary conditions

eq5diffux,t,t=110diffux,t,x,x,ux,0=1,u0,t=0,D1u1,t=0

eq5tux,t=2x2ux,t10,ux,0=1,u0,t=0,D1u1,t=0

(13)

sol5PDEtools:-Solveeq5,numeric

sol5moduleexportplot,plot3d,animate,value,settings;...end module

(14)

sol5:-plot3dt=0..1,x=0..1,axes=boxed

  

A mixed algebraic and PDE system in four unknowns {a, b, f(x, y), g(x, y)},

eq6difffx,y,y,y,diffgx,y,y,y2difffx,y,x,y6difffx,y,yy,9difffx,y,yay212difffx,y,ya2y+2diffgx,y,x,ydifffx,y,x,x3gx,y3difffx,y,yb3difffx,y,xy,4gx,ya22difffx,y,xb+diffgx,y,yb3ydiffgx,y,x+diffgx,y,x,x6gx,yay6difffx,y,xay28difffx,y,xa2y+3diffgx,y,yay2+4diffgx,y,ya2y

eq62y2fx,y,2y2gx,y22xyfx,y6yfx,yy,9yfx,yay212yfx,ya2y+22xygx,y2x2fx,y3gx,y3yfx,yb3xfx,yy,4gx,ya22xfx,yb+ygx,yb3yxgx,y+2x2gx,y6gx,yay6xfx,yay28xfx,ya2y+3ygx,yay2+4ygx,ya2y

(15)

When the solving variables of a problem involve both functions and names, as in eq6, the solutions for the names (here a and b) will be independent of the dependency of the solving functions (here independent of x and y)

Solveeq6,a,b,f,g

a=c__1,b=c__13,fx,y=c__3c__1+ⅇc__1c__2+xc__1,gx,y=c__1+yⅇc__1c__2+x,a=a,b=b,fx,y=c__1,gx,y=0

(16)

In the first solution above we see that a and b are related, so the system can be solved with respect to three variables; also the second solution has lower dimension, so it is a singular solution. Solve this problem with respect to three variables, discard singular solutions, and use the DifferentialAlgebra package for the intermediate differential elimination computations (optional argument diffalg of pdsolve)

Solveeq6,b,f,g,singsol=false,diffalg

b=a3,fx,y=c__1+c__2ⅇax,gx,y=ⅇaxc__2aa+y

(17)

Exact, series, and numeric solutions independentof

  

In the examples of the previous section the advantage with regards to calling solve, fsolve, dsolve, and pdsolve is in using a single command and having a unified format for the input and output, that allows for computing exact, series, or numeric solutions. Solve, however, also provides additional functionality: it can compute solutions independent of indicated variables

eq7sinx=cosax+b

eq7sinx=cosax+b

(18)

Solveeq7,a,b,independentof=x

a=1,b=π2,a=−1,b=π2

(19)
  

The system being solved using independentof can also contain inequations

eq8kaca+bexpkdt2aexpktk+Qc+ax,a0

eq8kaca+bⅇkdt2aⅇktk+Qc+ax,a0

(20)

Solveeq8,a,b,c,d,independentof=t,x

a=a,b=a22a,c=a,d=1

(21)
  

Solutions that are independent of the specified variables can be computed as well for differential equations or systems of them; this is a PDE example

eq9difffx,y,xdiffgx,y,x+difffx,y,ydiffgx,y,y+gx,ydifffx,y,x,x+difffx,y,y,y=1

eq9xfx,yxgx,y+yfx,yygx,y+gx,y2x2fx,y+2y2fx,y=−1

(22)
  

The general solution of eq9 is

sol9Solveeq9

sol9fx,y=f__1y,gx,y=y+f__2xⅆⅆyf__1y

(23)

pdetestsol9,eq9

0

(24)
  

Here are solutions for eq9 that are independent of x and independent of y

Solveeq9,independentof=x

fx,y=f__1y,gx,y=y+c__1ⅆⅆyf__1y

(25)

sol9,xSolveeq9,independentof=y

sol9,xfx,y=f__1x,gx,y=x+c__1ⅆⅆxf__1x

(26)
  

Note that although the general solution sol9 depends on arbitrary functions, the solution for fx,y does not depend on x. On the other hand, in the solution sol9,x above, fx,y depends on x, although then the solution for gx,y does not depend on y. Verify this solution:

pdetestsol9,x,eq9

0

(27)

Compatibility

• 

The implicit and algebraically options were introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

dsolve

InvariantSolutions

SimilaritySolutions

PolynomialSolutions

PDEtools

pdsolve

solve