]>
In this section we discuss Axiom's facilities for equation:differential:solving solving differential equation differential equations in closed-form and in series.
Axiom provides facilities for closed-form solution of equation:differential:solving in closed-form single differential equations of the following kinds:
For a discussion of the solution of systems of linear and polynomial equations, see ugProblemLinPolEqn .
A differential equation is an equation involving an unknown function and one or more of its derivatives. differential equation The equation is called ordinary if derivatives with respect to equation:differential only one dependent variable appear in the equation (it is called partial otherwise). The package ElementaryFunctionODESolver provides the top-level operation solve for finding closed-form solutions of ordinary differential equations. ElementaryFunctionODESolver
To solve a differential equation, you must first create an operator for operator the unknown function.
We let be the unknown function in terms of .
You then type the equation using D to create the derivatives of the unknown function where is any symbol you choose (the so-called dependent variable).
This is how you enter the equation .
The simplest way to invoke the solve command is with three arguments.
So, to solve the above equation, we enter this.
Since linear ordinary differential equations have infinitely many solutions, solve returns a particular solution and a basis for the solutions of the corresponding homogenuous equation. Any expression of the form where the do not involve the dependent variable is also a solution. This is similar to what you get when you solve systems of linear algebraic equations.
A way to select a unique solution is to specify initial conditions: choose a value for the dependent variable and specify the values of the unknown function and its derivatives at . If the number of initial conditions is equal to the order of the equation, then the solution is unique (if it exists in closed form!) and solve tries to find it. To specify initial conditions to solve, use an Equation of the form for the third parameter instead of the dependent variable, and add a fourth parameter consisting of the list of values .
To find the solution of satisfying , do this.
You can omit the when you enter the equation to be solved.
Axiom is not limited to linear differential equations with constant coefficients. It can also find solutions when the coefficients are rational or algebraic functions of the dependent variable. Furthermore, Axiom is not limited by the order of the equation.
Axiom can solve the following third order equations with polynomial coefficients.
Here we are solving a homogeneous equation.
On the other hand, and in contrast with the operation integrate, it can happen that Axiom finds no solution and that some closed-form solution still exists. While it is mathematically complicated to describe exactly when the solutions are guaranteed to be found, the following statements are correct and form good guidelines for linear ordinary differential equations:
Note that this last statement does not mean that Axiom does not find the solutions that are algebraic functions. It means that it is not guaranteed that the algebraic function solutions will be found.
This is an example where all the algebraic solutions are found.
This is an example that shows how to solve a non-linear first order ordinary differential equation manually when an integrating factor can be found just by integration. At the end, we show you how to solve it directly.
Let's solve the differential equation .
Using the notation , we have and .
We first check for exactness, that is, does ?
This is not zero, so the equation is not exact. Therefore we must look for an integrating factor: a function such that . Normally, we first search for depending only on or only on .
Let's search for such a first.
If the above is zero for a function that does not depend on , then is an integrating factor.
The solution depends on , so there is no integrating factor that depends on only.
Let's look for one that depends on only.
We've found one!
The above is an integrating factor. We must multiply our initial equation (that is, and ) by the integrating factor.
Let's check for exactness.
We must solve the exact equation, that is, find a function such that and .
We start by writing where is an unknown function of . This guarantees that .
All we want is to find such that .
The above particular solution is the we want, so we just replace by it in the implicit solution.
A first integral of the initial equation is obtained by setting this result equal to an arbitrary constant.
Now that we've seen how to solve the equation ``by hand,'' we show you how to do it with the solve operation.
First define to be an operator.
Next we create the differential equation.
Finally, we solve it.
The command to solve differential equations in power equation:differential:solving in power series series power series around series:power a particular initial point with specific initial conditions is called seriesSolve. It can take a variety of parameters, so we illustrate its use with some examples.
Since the coefficients of some solutions are quite large, we reset the default to compute only seven terms.
You can solve a single nonlinear equation of any order. For example, we solve subject to
We first tell Axiom that the symbol denotes a new operator.
Enter the differential equation using like any system function.
Solve it around with the initial conditions .
You can also solve a system of nonlinear first order equations. For example, we solve a system that has and as solutions.
We tell Axiom that is also an operator.
Enter the two equations forming our system.
Solve the system around with the initial conditions and . Notice that since we give the unknowns in the order , the answer is a list of two series in the order
The order in which we give the equations and the initial conditions has no effect on the order of the solution.