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
Solve(sys, solving_variables, options=value)
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 = ...
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 y⁡x the equation y'⁡x−y⁡x to obtain y⁡x=y'⁡x instead of y⁡x=_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.
with⁡PDEtools,Solve
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.
eq1≔a⁢x2+b⁢x+c=0
Solve⁡eq1,x
x=−b+−4⁢a⁢c+b22⁢a,x=−b+−4⁢a⁢c+b22⁢a
A numeric solution for a,b,c independent of x
Solve⁡eq1,a,b,c,independentof=x,numeric
a=0.,b=0.,c=0.
Exact and series solutions for an ODE
eq2≔diff⁡y⁡x,x=y⁡x
eq2≔ⅆⅆxy⁡x=y⁡x
Solve⁡eq2
y⁡x=c__1⁢ⅇx
Solve⁡eq2,algebraically
y⁡x=ⅆⅆxy⁡x
Solve⁡eq2,series
y⁡x=y⁡0+y⁡0⁢x+12⁢y⁡0⁢x2+16⁢y⁡0⁢x3+124⁢y⁡0⁢x4+1120⁢y⁡0⁢x5+O⁡x6
A PDE problem, also with boundary conditions
eq4≔diff⁡u⁡x,t,t+c⁢diff⁡u⁡x,t,x=−λ⁢u⁡x,t
eq4≔∂∂tu⁡x,t+c⁢∂∂xu⁡x,t=−λ⁢u⁡x,t
Solve⁡eq4
u⁡x,t=f__1⁡t⁢c−xc⁢ⅇ−λ⁢xc
bc4≔u⁡x,0=φ⁡x
sol5≔Solve⁡eq4,bc4
sol5≔u⁡x,t=φ⁡−t⁢c+x⁢ⅇ−λ⁢t
Numerical solution for a PDE with boundary conditions
eq5≔diff⁡u⁡x,t,t=110⁢diff⁡u⁡x,t,x,x,u⁡x,0=1,u⁡0,t=0,D1⁡u⁡1,t=0
eq5≔∂∂tu⁡x,t=∂2∂x2u⁡x,t10,u⁡x,0=1,u⁡0,t=0,D1⁡u⁡1,t=0
sol5≔PDEtools:-Solve⁡eq5,numeric
sol5 ≔ moduleexportplot,plot3d,animate,value,settings;...end module
sol5:-plot3d⁡t=0..1,x=0..1,axes=boxed
A mixed algebraic and PDE system in four unknowns {a, b, f(x, y), g(x, y)},
eq6≔diff⁡f⁡x,y,y,y,diff⁡g⁡x,y,y,y−2⁢diff⁡f⁡x,y,x,y−6⁢diff⁡f⁡x,y,y⁢y,−9⁢diff⁡f⁡x,y,y⁢a⁢y2−12⁢diff⁡f⁡x,y,y⁢a2⁢y+2⁢diff⁡g⁡x,y,x,y−diff⁡f⁡x,y,x,x−3⁢g⁡x,y−3⁢diff⁡f⁡x,y,y⁢b−3⁢diff⁡f⁡x,y,x⁢y,−4⁢g⁡x,y⁢a2−2⁢diff⁡f⁡x,y,x⁢b+diff⁡g⁡x,y,y⁢b−3⁢y⁢diff⁡g⁡x,y,x+diff⁡g⁡x,y,x,x−6⁢g⁡x,y⁢a⁢y−6⁢diff⁡f⁡x,y,x⁢a⁢y2−8⁢diff⁡f⁡x,y,x⁢a2⁢y+3⁢diff⁡g⁡x,y,y⁢a⁢y2+4⁢diff⁡g⁡x,y,y⁢a2⁢y
eq6≔∂2∂y2f⁡x,y,∂2∂y2g⁡x,y−2⁢∂2∂x∂yf⁡x,y−6⁢∂∂yf⁡x,y⁢y,−9⁢∂∂yf⁡x,y⁢a⁢y2−12⁢∂∂yf⁡x,y⁢a2⁢y+2⁢∂2∂x∂yg⁡x,y−∂2∂x2f⁡x,y−3⁢g⁡x,y−3⁢∂∂yf⁡x,y⁢b−3⁢∂∂xf⁡x,y⁢y,−4⁢g⁡x,y⁢a2−2⁢∂∂xf⁡x,y⁢b+∂∂yg⁡x,y⁢b−3⁢y⁢∂∂xg⁡x,y+∂2∂x2g⁡x,y−6⁢g⁡x,y⁢a⁢y−6⁢∂∂xf⁡x,y⁢a⁢y2−8⁢∂∂xf⁡x,y⁢a2⁢y+3⁢∂∂yg⁡x,y⁢a⁢y2+4⁢∂∂yg⁡x,y⁢a2⁢y
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)
Solve⁡eq6,a,b,f,g
a=c__1,b=c__13,f⁡x,y=c__3⁢c__1+ⅇc__1⁢c__2+xc__1,g⁡x,y=−c__1+y⁢ⅇc__1⁢c__2+x,a=a,b=b,f⁡x,y=c__1,g⁡x,y=0
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)
Solve⁡eq6,b,f,g,singsol=false,diffalg
b=a3,f⁡x,y=c__1+c__2⁢ⅇa⁢x,g⁡x,y=−ⅇa⁢x⁢c__2⁢a⁢a+y
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
eq7≔sin⁡x=cos⁡a⁢x+b
Solve⁡eq7,a,b,independentof=x
a=1,b=−π2,a=−1,b=π2
The system being solved using independentof can also contain inequations
eq8≔k⁢a⁢c⁢a+b⁢exp⁡k⁢d⁢t−2⁢a⁢exp⁡k⁢t⁢k+Q⁢−c+a⁢x,a≠0
eq8≔k⁢a⁢c⁢a+b⁢ⅇk⁢d⁢t−2⁢a⁢ⅇk⁢t⁢k+Q⁢−c+a⁢x,a≠0
Solve⁡eq8,a,b,c,d,independentof=t,x
a=a,b=−a2−2a,c=a,d=1
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
eq9≔diff⁡f⁡x,y,x⁢diff⁡g⁡x,y,x+diff⁡f⁡x,y,y⁢diff⁡g⁡x,y,y+g⁡x,y⁢diff⁡f⁡x,y,x,x+diff⁡f⁡x,y,y,y=−1
eq9≔∂∂xf⁡x,y⁢∂∂xg⁡x,y+∂∂yf⁡x,y⁢∂∂yg⁡x,y+g⁡x,y⁢∂2∂x2f⁡x,y+∂2∂y2f⁡x,y=−1
The general solution of eq9 is
sol9≔Solve⁡eq9
sol9≔f⁡x,y=f__1⁡y,g⁡x,y=−y+f__2⁡xⅆⅆyf__1⁡y
pdetest⁡sol9,eq9
0
Here are solutions for eq9 that are independent of x and independent of y
Solve⁡eq9,independentof=x
f⁡x,y=f__1⁡y,g⁡x,y=−y+c__1ⅆⅆyf__1⁡y
sol9,x≔Solve⁡eq9,independentof=y
sol9,x≔f⁡x,y=f__1⁡x,g⁡x,y=−x+c__1ⅆⅆxf__1⁡x
Note that although the general solution sol9 depends on arbitrary functions, the solution for f⁡x,y does not depend on x. On the other hand, in the solution sol9,x above, f⁡x,y depends on x, although then the solution for g⁡x,y does not depend on y. Verify this solution:
pdetest⁡sol9,x,eq9
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
pdsolve
solve
Download Help Document