PDEtools - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Differential Equations : PDEtools : 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





Calling Sequence

Solve(sys, solving_variables, options=value)




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



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



(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.



(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 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 InvariantSolutions, SimilaritySolutions, or PolynomialSolutions.


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.

eq[1] := a*x^2 + b*x + c = 0;



Solve(eq[1], x);



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

Solve(eq[1], {a, b, c}, independentof = x, numeric);



Exact and series solutions for an ODE

eq[2] := diff(y(x), x) = y(x);






Solve(eq[2], algebraically);



Solve(eq[2], series);



A PDE problem, also with boundary conditions

eq[4] := diff(u(x, t), t)+c*(diff(u(x, t), x)) = -lambda*u(x, t);






bc[4] := u(x, 0) = phi(x);



sol[5] := Solve([eq[4], bc[4]]);



Numerical solution for a PDE with boundary conditions

eq[5] := [diff(u(x,t),t)=1/10*diff(u(x,t),x,x), u(x,0)=1, u(0,t)=0, D[1](u)(1,t)=0];



sol[5] := PDEtools:-Solve(eq[5], numeric);

sol5:=moduleexportplot,plot3d,animate,value,settings;...end module


sol[5]:-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)},

eq[6] := [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*y^2-12*diff(f(x,y),y)*a^2*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)*a^2-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*y^2-8*diff(f(x,y),x)*a^2*y+3*diff(g(x,y),y)*a*y^2+4*diff(g(x,y),y)*a^2*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(eq[6], {a, b, f, g});



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(eq[6], {b, f, g}, singsol = false, diffalg);



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

eq[7] := sin(x) = cos(a*x+b);



Solve(eq[7], {a,b}, independentof = x);



The system being solved using independentof can also contain inequations

eq[8] := [k*a*c*(a+b)*exp(k*d*t)-2*a*exp(k*t)*k+Q*(-c+a)*x, a <> 0];



Solve(eq[8], {a, b, c, d}, independentof = {t, x});



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

eq[9] := 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;



The general solution of eq9 is

sol[9] := Solve(eq[9]);



pdetest(sol[9], eq[9]);



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

Solve(eq[9], independentof = x);



sol[9, x] := Solve(eq[9], independentof = y);



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

pdetest(sol[9, x], eq[9]);





The implicit and algebraically options were introduced in Maple 15.


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

See Also