Você está na página 1de 19

Solving Discontinuous Ordinary

Differential Equations

Martin von Mohrenschildt

In this paper we generalize the basic notations of the Liouville-Ritt-Risch


theory of closed-form solutions to discontinuous field extensions. Our aim
is to extend the theory of differential fields such that the "classical algo-
rithm" like the Risch structure theorem and the algorithm solving the Risch
differential equation can be extended to handle discontinuous extensions.
The theory has been tested by a complete implementation in the com-
puter algebra system Maple. Our extension of Maple allows to automatically
solve certain classes of discontinuous differential equations, e.g. linear differ-
ential equations with discontinuous perturbation functions, Risch differential
equations with discontinuities, and other classes of ordinary differential equa-
tions that can be handled in symbolic computation. This means we can find
the closed-form continuous solution in the sense of extended Liouvillian solu-
tions, if one exists. This tool has its applications in control theory, physics,
and engineering analysis. Some examples are provided.

1. Introduction

Differential fields are fields extended with an additional operation, deriva-


tion, that satisfies: (J + g)' = f' + g' and (J * g)' = f' * g + g' * f. We
assume the ground field to have characteristic zero. To solve the problem of
handling discontinuous functions in computer algebra, the idea is to extend
the differential ring by the two discontinuous functions sand t where:

s(x)={~ x~O
x>O

1 x =0
t(x)= { 0 x;r!:O

These functions allow us to compose arbitrary piecewise continuous func-


tions; the functions are continuous except in a finite number of points where
we have discontinuities of the first kind: left and right limits exist. Such
constructions are natural and occur frequently in analysis, one example is
the absolute value function. To integrate this concept into the theory of
symbolic computation, we have to formalize this type of extension to give

E. Engeler, The Combinatory Programme


© Birkhäuser Boston 1995
IV. Solving Discontinuous Ordinary Differential Equations 99

structure theorems and to define the derivative. Then we prove the theorems
needed to solve differential equations.

2. The Differential Ring PPDR

The PPDR (Piecewise Polynomial Differential Ring) arises by extending a


differential field with some discontinuous functions. We will see what kind of
functions are needed to represent all piecewise continuous functions with a
finite number of discontinuities of the first kind. Next, we present the normal
form for functions of PPDR. Finally, the derivative for these discontinuous
functions is introduced.

The Ring PPDR


The theory of computation on PPDR is to be based on an extension of the
first order theory of a differential field [Ost46], [Ri69] with one variable x,
extended with the the step function sex) and the impulse function t(x).

sex) = {O1 x:::;


x> 0
0 1 x =0
t(x) = { 0 x =I 0

These extensions are not transcendental in the usual sense of extensions of


a differential field. Indeed, s and t satisfy an algebraic equation, namely:
8(x)2 = 8(x). We call these kind of extensions semi-algebraic extensions. It
turns out that sex) and t(x) are, however, algebraically independent. The
underlying differential field has characteristic zero and its coefficient field
is an ordered field. As a coefficient ring we use the algebraic numbers and
extend them if needed with other new constants like expo
Using the function symbols sand t, it is possible to give a closed-form
representation of the piecewise continuous functions [Moh94], functions hav-
ing a finite number of discontinuities of the first kind; i.e. left and right
limits exist. Such a function is, for example, the absolute value function
Ixl = sex) * x - s(-x) * X.
Corollary 1 It is clear that no piecewise continuous function ring can be a
field, because it has zero-divisors. For example sex - 2) * s( -x + 1) = O.

A further difficulty in creating a theory of computation in these rings is


due to the fact that the objects on which we compute are formal. Indeed,
they will be given by normal forms. But there are elements in the extended
ring of functions for which 't/xf(x) = g(x) without f being equal to g in
the sense of the normal form. Equality is defined by a normal form. So,
the function-objects of PPDR are intensional - in contrast to the classical
analysis, which is extensional. This may look strange to a mathematician
100 Martin von Mohrenschildt

used to classical analysis, but it will be motivated here: Let us consider the
question of derivations of functions at continuous but classical, not differen-
tiable points (called corners). These function as formal objects, and as such
provide a definition of the function at this point. Making them extensional
would cause a loss of information.

x>o
Ix/1:={X
-x
x~o
x <0 IxI2:= {
X x> 0
-x x:::;o Ixla:= {~ x=o
-x x<O
The graphs of these three formally defined functions are the same but their
definitions (and normal forms) are different. (We will come back to this
example in Section 3 on derivatives and will show these functions in PPDR.)

The Normal Form


Let now PPDR be the set of formal expressions for terms of the underlying
differential field, expressed by the function symbols sand t. Equality in
PPDR will be defined by using the construction of a normal form. We
distinguish two kinds of equality:
• extensional equality:

cf>1 ~ cf>2 {::=} V c (const(c) -+ cf>l(C) = cf>2(C))

• formal equality will be defined by syntactical identity of the normal form:

cf>1 = cf>2 {::=} normal(cf>d == normal(cf>2)


Theorem 2 The following rule system is complete and provides a normal
form
n
p(x) + ~::>i * s(±x =F b
i=O
i)+ Ci * t(x - di )

for every element of PPDR, where p(x) and the ai are expressions of the
language of differential fields without s or t in x, and bi , Ci, and di are real
algebmic numbers.
The rule system (The algorithms referred to below are implemented in
Maple and the rule system)
s(p(x» --+ E:=o ±s(±x=f bi) by algorithms
t(p(x» --+ E:=o t(x - di ) by algorithms
s(f(x) + g(x) * s(±x =f a» --+ s(f(x» * (1 - s(±x =f a»
+s(f(x) + g(x» * s(±x =f a)
s(f(x) + g(x) * t(x - a» --+ s(f(x» * (1 - t(x - a»
IV. Solving Discontinuous Ordinary Differential Equations 101

+t(x - a) * s(f(x) + g(x))


t(f(x) + g(x) * s(±x =f a)) --+ t(f(x)) * (1 - s(±x =f a))
+s(±x =f a) * t(f(x) + g(x))
t(f(x) + g(x) * t(x - a)) --+ t(f(x)) * (1 - t(x - a))
+t(f(x) + g(x)) * t(x - a)

sex - a) * sex - b) --+ sex - b) if b ;::: a


sex - a) * s( -x + b) --+ o if b :::; a
else sex - a) - 1 + s( -x + b)
s(-x + a) * s(-x + b) --+ s( -x + b) if b :S a
t(x - a) * t(x - b) --+ if b = a then t(x - a) else 0
t(x - a) *S(x - b) --+ o if b ;::: a else t(x - a)
t(x - a) * s(-x + b)--+ o if b :S a else t(x - a)

sea) --+ o if a :::; 0 else 1


tea) --+ 1 if a = 0 else 0
t(-x+a) --+ t(x - a)
t(x - a) * f(x) --+ t(x - a) * f(a)

Remark
• f(x),g(x) denote arbitrary function-expressions in PPDR (perhaps con-
taining x)
• The last rule represents the situation if x = 0 then f(x) else g(x).
Since f is only evaluated at the point x = 0 the expression reduces to:
if x = 0 then f(O) else g(x).

The proof of this theorem is detailed in [Moh94].


Example
>normal(s(x*x-2»;
1/2 1/2
s(- x - 2 ) + sex - 2 )
>normal(s(x+s(x»);
(1 - sex»~ sex) + sex) sex + 1)
sex)
>normal(x*t(x»
o
102 Martin von Mohrenschildt

The Differential Structure


Calculating derivatives in PPDR, the normal form is essential. If we compute
the derivative of a function like s(x * x - 2) * x * x we first have to compute
the normal forms, since these are essentially the true elements of PPDR.
The axioms of differentiation for elements of PPDR in normal form
are the classical ones for +, -, * and the two special axioms for sand t:

s(±x =f a)' = ±t(x - a)


t(x - a)' = 0

The chain rule, as it does not belong to the axioms of a differential ring,
needs closer examination. We will see this in the next part of this section.
The following definition provides the link to the classical theory of dif-
ferential rings and fields [Ri69] , [Liou33], [Sing90].

Definition 3 The set of functions with f' = 0 is called the constant-ring


(field).

It is important that in the axiomatization of a differential ring that it


is not possible to prove that the solution of y' = c with c' = 0 is x * c. So
t(x - a) is a constant with integral s(x - a). Also, we have to remark that
the product rule holds only for expressions in normal form: t(x) * x is zero
and so the chain rule cannot be applied.

Theorem 4 PPDR is a differential ring of normal forms.

The proof is a verification of the axioms of differential rings.


For the following theorem, we examine expressions like (l-s(x )-s( -x))*
x which, considered as a function, is 0 for all x. But note that its derivative
«1 - s(x) - s( -x)) * x)' = 1 - s(x) - s( -x) is extensionally equivalent to
t(x).

Definition 5 We say that an expression of PPDR in normal form is ad-


missible if for all i,j = 0, ... ,n

The function 1- s(x) - s( -x) is not admissible. Also, the sum of two admis-
sible functions is obviously not always admissible. We only need admissible
functions to represent the usual three types of discontinuities.
Let us consider the function abs (absolute value function). There exist
three different possibilities to express this function in PPDR. The corre-
sponding functions are extensionally the same but their formal derivatives
IV. Solving Discontinuous Ordinary Differential Equations 103

are different.
s(x)*x-s(-x)*x open corner
(1- s(-x» *x - s(-x) *x right closed corner
s(x) *x - (1 - s(x» * x left closed corner
The corresponding derivatives are 0, 1, and -1.
Theorem 6 For admissible functions in PPDR
¢ ~ constant -+ ¢' = 0

Proof We have to show that:


If the normal form of ¢ is admissible and ¢ ~ c, with c a constant of the
underlying differential ring, then ¢ = c. We assume that ¢ is constant, then
the normal form of ¢ has subterms of the form:
(i) sex - ai) * c+ (1- s(x - ai» *c = c. Hence there is no subterm of this
kind.
(ii) s( -x + ai) * c + (1 - s( -x + ai» *c = c. Hence there is no subterm of
this kind.
(iii) c * s(x - ai) + c * s( -x - ai) + t(x - ai) * c but this is not admissible.
Hence the normal form of y does not contain an s, thus ¢ is a constant .


Extensions of PPDR and the Chain rule
For the symbolic solutions of differential equations and integrals, as well for
the solutions of algebraic equations, the notation of extensions is essential.
This is necessary since most differential equations are not solvable over the
ground ring, which is usually a rational function ring.
The problem of deciding if a given elementary extension is algebraic or
transcendent is solved by the Risch structure theorem [Ri69j, [Bro90j. These
theorems are valid in PPDR since PPDR has the structure of a differential
ring.
The next question is: If PPDR is extended with eX what is eS(x)*X? Is
this a new transcendent extension? The answer is no if we use the following
structure theorem:
Theorem 7 (Structure Theorem for the transcendental case)
Let B be an extension of PPDR. Using the following rules

ext! B(s(x - a) * h(x) + g(x» -+ s(x - a) * B(h(x) + g(x»


104 Martin von Mohrenschildt

+(1- s(x - a» * B(g(x»


ext2 O(t(x - a) * h(x) + g(x» -+ t(x - a) * O(h(a) + g(a» + O(g(x»

-t(x - a) * O(g(a»
the extensions of this type of PPDR are simply extensions in the classical
sense (no discontinuities in the extensions).

Remark An extension containing a t is a constant. In the structure theo-


rems [Risch69] it is recommended that an elementary extension not give new
constants. So extending PPDR with eS(x) means that first we have to extend
the constant field with t(x) * eO (a differential field is closed under '), and
then take the new differential ring and extend it with eS(x).

To compute the derivative of an expression like O(s(x - a) * h(x) + g(x»


we first have to apply the rule ext!. So the derivative of eX*s(x) is (s(x) *
eX + (1- s(x» * eO)' = s(x) * eX + t(x) * eO - t(x) * eO = s(x) * eX.
The classical chain rule is not valid in the case where we compute the
derivative of O(J (x» where f (x) is a discontinuous function. The proof of the
chain-rule in analysis hardly uses the continuity of f(x). So before computing
the derivative of such an expression, we first compute its normal form

Example Extending PPDR with es(x)*x+s(x-2)*x means extending PPDR


with eX (e 2*x is algebraically dependent on eX) because we have

es (x)*x+s(x-2)*x -+ (1 - s(x» + s(x) * eX + s(x - 2) * (e 2*x - eX)

(e(X+1)*s(x)' = (s(x)*e x+1+(l-s(x»*eo), = s(x)*ex+1+t(x)*eO-t(x)*e1

> simpex(exp(s(x)*x+s(x-2)*x»;

x+l
s(x) * e + 1 - s(x)

>simpex(exp(s(x)*(x+l»;
2
- s(x - 2) exp(x) + 1 - s(x) + s(x) exp(x) + s(x - 2) exp(x)
IV. Solving Discontinuous Ordinary Differential Equations 105

3. Differential Equations in PPDR

In physics and topics of engineering analysis, people often have to deal with
discontinuities in their differential equations. Hence, solving ordinary differ-
ential equations with discontinuities - especially linear differential equations
with discontinuous perturbation-function and Risch differential equations -
is of interest. In this section we develop theories and methods to solve such
equations. We distinguish the questions: solvability in general and solvability
in terms of computer algebra.

Basic Definitions and Theorems


Definition 8 The admissible term (term-vector) <Pi(X) is a solution of the
differential equation

Yi(n) = f i (Yi(n-I) , ... , Yi, X) i = l ... k

if it is a formal solution (normal form), with

<p~n)=fi(<p~n-I)""'<Pi'x) i=l ... k.


We consider only admissible terms for solutions because, as we saw in the def-
inition of PPDR, these are all we need to represent the piecewise continuous
functions.
Corollary 9 The solution of an admissible differential equation is always
admissible. This holds because if the differential equation is admissible, the
coefficients of all s are different as well as the coefficients of the s's in the
solution, hence,. the solution is admissible.

We distinguish three kinds of solutions:


• Physical solutions: Continuous solutions with n or n -1 continuous deriva-
tives. (If the differential equation has some corners the solution belongs to
en, if the differential equation is discontinuous then the solution is en-I,
e
and if the equation contains an impulse t, the solution is n - 2 .) n denotes
the order of the differential equation.
• Formal continuous solutions: The function is continuous but some deriva-
tives are not. The solution does not belong to the e n - i classes defined
above.
• Discontinuous solutions: For every ode we can construct discontinuous
functions, which are formal solutions. There exist ode's in PPDR that have
no continuous solution at all. In this case, we study the formal discontinuous
solutions.
We show these kinds of solutions for the differential equation Y" + Y = O.
106 Martin von Mohrenschildt

(1) The classical solution is y = a * sin(x) + b HOS(X) and this is the only
physical solution of the equation in PPDR (will be proven).

(2) Since sin(7r/4) = cos(7r/4) we can construct the new solution y =


s(x - 7r/4) * sin(x) - (1 - s(x - 7r/4)) * cos(x). This is a formal con-
tinuous solution, because it is a solution but the first derivative is not
continuous.

(3) For the third case we have for example y = s(x) *Cos(x) , y' = -s(x) *
sin(x) + t(x), and y" = -s(x) * cos(x). This is a formal solution, but
it is discontinuous.

Definition 10 The sets of points in R.n where the s(.) and t(.) of a function
do not switch value are called cells of this function. A one-dimensional cell
is called a tunnel (following the pattern of the phenomenon of tunneling in
physics).

For example f(x, y) = s(x 2 + y2 -1) has two cells: the disk around zero and
the rest of the plane. f(x) = 2 * s( -y) + s(y) has two cells and a tunnel
throught the x-axis. There are two possibilities of constructing a tunnel: one
with a t(a - x), the other with something like: s(x - a) + 2 * s( -x + a).

Definition 11 The cell boundaries are called switching-lines, because if they


are crossed the differential equation will change.

The switching-line of y' = s(y) is the x-axis, that of y' = s(x) the y-axis,
and that of y' = s(x * x + y * y - 1) the circle around zero. The boundaries
can, but need not, belong to the cell.

Definition 12 We call an ode in PPDR physical if no solution lies com-


pletely within a cell that has points of contact with the switching-lines and if
it has no tunnel in which the switching-line is a solution.

The following lemmas and theorems give the connection between PPDR
and the classical theory for solving ode's.
Lemma 13 The only continuous solution ofy' = 0 in PPDR is y =constant.

Proof Here we use the definition of an admissible function and Theorem 6.


We know from the definition of an admissible function that the only constant
admissible functions of PPDR are numbers and vice versa. Looking at the
normal form for an extensional constant expression we have subterms of the
following kind:

(i) s(x - ai) * c + (1 - s(x - ai» *c = c


IV. Solving Discontinuous Ordinary Differential Equations 107

(ii) s( -x + ai) *C + (1 - s( -x + ai)) * x = c


(ii) s(x - ai)* C + t(X - ai) * C + s( -x + ai) * c. But this is not admissible.
This holds for all ai, hence y = c, c a number. Hence the solution
cannot contain an s, thus the solution is a number. •

Theorem 14 If an ode (system of ode's) has a classical continuous solution


of class en then there are no more continuous physical solutions in the class
en using the theory PPDR. PPDR gives no more physical solutions than the
classical ones.

Proof Since the ode has a continuous solution it is not possible to construct
a PPDR solution with s's:
Let f) be the classical solution and y the PPDR solution. y contains a
subterm of the form s(x - a) * Y2 + (1- s(x - a)) * Yl (the proof is the same
for the other two kinds of gluing), then y(i) contains a subterm of the form
s(x - a) * y~i) + (1- s(x - a)) * yii) +t(x - a) * y~i-l)(a) - t(x - a) * yii-l) (a).
These derivatives all have to be continuous since the solution is en, hence
y~i) (a) = yii) (a) for i = 0, ... , n. Hence since Yl and Y2 have the same
derivatives in the point a, it follows that Yl = Y2. Hence there is no subterm
containing an s, thus the solution is only the classical one. This holds for
all points a, thus fi = y. Hence, PPDR gives no more solutions, because this
solution would be a classical one. •

Lemma 15 (General method for solving ode's in PPDR)


Substitute every s(.) and t(.) with 0 and 1 and solve these classical differential
equations. Determine the cells and put the pieces together.

Proof We will prove this lemma for all kinds of ode's in PPDR in the
sections where they are discussed. The formal method will be shown in the
next section. •

Ode's with Discontinuities in Time Only


In this class of differential equations the discontinuities depend only on time,
so the discontinuities are known. All cells are sectors with straight switching-
lines normal to the x-axis; there is no intersection point of the switching-lines.
This type of equation always has a continuous solution. Classically [Br78]
this kind of equation is solved using the Laplace transformation.
108 Martin von Mohrenschildt

Method of Finding the Formal Solution First we solve the ode in


every cell; they are known because of the normal form. Then we glue the
cell-solutions together according to the cells. We thus obtain the formal
solution. In the next proof we see the formal technique using PPDR for
solving ode's. These calculations can be done with the help of a computer
algebra package.

Theorem 16 Every system of ode's in PPDR with s depending only on x


has a continuous solution.

Proof We look at the ode's of first order with s depending only on x. The
normal form of such differential equations is:
n
y' = eq(x, y) = go + L gi(X, y) * s(±x =t= ai).
i=l
We have n + 1 cells. All cells are represented by disjoint intervals. We see
whether each cell is closed [ai, ai + 1], open jai, ai + 1[, left open jai, ai + Ij,
or right open [ai, ai + 1[, and so we can determine the characteristic function
Xi of the cell i.
The leftmost and the rightmost interval are infinite. Since the switching-
lines are normal to the x-axis, there is no problem crossing them.
To find the solution we first solve all n + 1 differential equations in
the cells. ¢i is the solution 'Pi in the cell i multiplied with the characteristic
function Xi of this cell plus the t(x - ai) *'Pi minus t(x -ai+d *'Pi. These t(.)
describe the value of the solution at the boundaries of the cells. The solution
will be continuous since 'Pi(ai) = 'Pi+l(ai), then the t(.)'s will cancel each
other out in the formal solution.
The term -t(X-ai)*'Pi(ai)+t(x-ai+l)*'Pi(ai+d is abridged by Ri('Pi).
Now we can write down the formal solution f
n
f := LXi * 'Pi(X) + Ri('Pi) = ¢o + ¢1 + ... + ¢n
i=O

Substituting y with f on the right-hand side of the differential equation, we


can see that f is indeed the solution.
Ode's with higher order and systems are solved in the same way. •

Theorem 17 Every system of ordinary differential equations in PPDR with


s discontinuities only in x and solvable in all cells has one and only one
continuous solution to every initial value. If the ode contains t's the number
of continuous solutions doubles with every t.
IV. Solving Discontinuous Ordinary Differential Equations 109

Proof We start with the cell in which the initial value belongs. Using the
existence and uniqueness theorems of classical analysis we have only one
solution in this cell. Therefore the intersection point with the switching-line
of the next cell is known. Now we have the initial value for the next cell.
This process goes through all cells, and with the previous theorem, we have
the continuous solution. •

Example We solve the ode y" + s(x) * Y = 0 with y(O) = 0, y'(O) = 1. The
cells are]- 00, 0] and ]0,00[. The ode's are: y" = 0 solution Yl(X) = a*x +b
and y" + y = 0 solution Y2(X) = c * sin(x) + d * cos(x). The ansatz for
the solution is: y = (1 - s(x» * (a * x + b) + s(x) * (*sin(x) * d * cos(x»
with the conditions: Yl(O) = Y2(0) and yi(O) = y~(O) and y(O)=O. So Y =
(1 - s(x» * x + s(x) * sin(x) is the continuous solution. This can be verified
by substituting Y for f in the differential equation.

> dsolve(diff(y(x).x)-s(x).y(x)=o.y(x»;
y(x) = exp(s(x) x) _C1

Linear Ode's in PPDR


We examine here the differential equations whose coefficients change with
time and place and that have discontinuous perturbation functions. The
llisch differential equation, which is linear, will be examined later in this
section. In contrast to the classical theories we give a constructive method
to solve such equations. We will give criteria as to when a linear ode will
have a continuous solution to an initial value. Since PPDR is not a field,
the highest derivative of Y can have a coefficient such as s(x). Solving these
equations can now be done automatically using the extended differential
equation solver of Maple.
Linear ode's in PPDR are:
n
Eai* yen) = Ly = f(x) (1)
i=O

where f(x) is a piecewise continuous function and these ai depend on s(p(x»,


s(P(y», s(p(x, y», p being a polynomial. A linear ode in PPDR can change
its order in different cells.
We showed in the last section how to solve the homogeneous equation if
the coefficients depend only on x. If the coefficients depend on y, we use the
general method for solving discontinuous differential equations.
Now we look for the particular solution. We will show that even if the
perturbation function is discontinuous, the solution of the ode is continuous.
110 Martin von Mohrenschildt

This is clear from the mechanical point of view in physics [Br78]. We have to
distinguish between two kinds of perturbation functions: those with or those
without impulse t. Solutions of ode's containing t(x - a) are not unique at
the point a.
Theorem 18 Every linear ode in PPDR with an order greater than one,
no singularities and piecewise continuous perturbation-function has a con-
tinuous solution. The solution is unique if the perturbation function is not
an impulse-function. If no t(x - a) appears in the perturbation function the
theorem holds even for ode's of order 1.
If a t(x - a) appears in the perturbation function the solution is not unique.
Also these solutions are extensional equal except at the point a. This happens
because the equation y' = t(x - a) has two solutions, left-continuous and
right-continuous. We need the restriction to differential equations with no
singularity since for example sex) * y" + x * y' + y = 0 has for x S; 0 the
solution y = ~, which does not belong to PPDR.
In the proof of this theorem we strongly profit from the (flat) linear
normal form of the perturbation function. So
m n

j=l i=O

Proof Owing to linearity and the normal form of f(x) we only have to solve
the ode:
Ly = sex - ai) * Ji(x) or Ly = t(x - ai) * Ci
for every summand sex - ai) * fi(x) and t(x - ai) * Ci in f(x). The solution
of Ly = f(x) is the sum of all solutions of the reduced ode containing only
Ji(x).
Let \]i be the solution of Ly = 0 and <I> be the solution of Ly = fi(x),
Ly = Ci' To find these solutions we use the known theory for solving linear
ode's. We can now construct the particular solution of Ly = sex - a) * fi(x),
ypart = sex - a) * <I> + (1 - sex - a) * \]i.
The parameters of \]i and <I> are chosen such that ypart and n - 1 derivations
are continuous. This means solving a system of n equations. This can be
done using a computer algebra package, such as Maple. •

Example (1) y" + y = x 2 * sex) has the particular solution y = -sex) *


(2 - x 2 - 2 * cos(x)). y" + y = x 2 has the particular solution y = x * x - 2
and for x S; 0 the solution is y = a * sin (x) + b * cos(x}. So the solution can
be constructed.
IV.. Solving Discontinuous Ordinary Differential Equations 111

>dsolve(diff(y(x),x$2)+y(x)=x*x*s(x),y(x»;
2
y(x) =x sex) - 2 sex) + 2 sex) cos (x) + _Cl sin (x) + _C2 cos (x)

(2) y" - Y = t(x) has the particular solution y = -!s(x) * (eX - e- X).

PPDR and Symbolic Computation


As mentioned before, PPDR is a tool for symbolic computation. Recall
the theories of differential fields [Ost46], [Ri69] and the theories on finding
closed-form elementary solutions of differential equations [Dav86], [Sing90j,
[Br090].
Liouville defined elementary functions, which are, roughly explained, the
rational functions and functions built up with log and expo These are solu-
tions of first order algebraic differential equations. We will now extend this
concept of elementary functions to a wider class containing discontinuities.
Definition 19 An elementary discontinuous function is a linear combina-
tion of the classical Liouville elementary functions with s(±x 1= ai) and
t(x ± bi) as coefficients.
Now we give the main theorem for symbolic computation in PPDR.
Theorem 20 If a differential equation in PPDR has elementary solutions
in all cells then the equation has a closed-form elementary discontinuous
solution.

Proof For the different classes of differential equations we showed that


these equations have solutions. We gave the method to construct the PPDR
solution out of the solution of the classical differential equations. So if the
differential equation has an elementary solution we can construct the ele-
mentary discontinuous solution. •

We see that extending differential fields with the discontinuous function


s(x) and t(x) does not disturb the structure theorem of Liouville and Risch.

The General First Order Linear Ode and Risch


In the theory of integration and differential equations the Risch differential
equation is eSsential,
y' +f*y = g.
We have proved that such an equation, with discontinuities only in time
always has a continuous solution. Now we ask: Is the solution computable
112 Marlin von Mohrenschildt

and if so how shall we compute it? Here we can use the known theories. We
will show that these theories hold even if f and 9 are discontinuous functions,
i.e. f, 9 in PPDR.
Theorem 21 The algorithm for solving the first order linear differential
equation can be extended to the case where f and 9 are in PPDR.

Proof Since the ode is a linear ode we solve the ode for every summand in
the normal form of f(x) and g(x) and then add the solutions,

y' + s(x - ai) * fi(X) * Y = s(x - bk) * gk(X).


Hence we have to prove the theorem for one s(.) and one t(.) in the normal
form of f and g.
We have three cases: s(x - a) is 1, s(x - b) is 1, or both are 1 (both s's
o is trivial). .
(1) y' + s(x - a) * f(x) * y = 0 then:
3!WI : wi + f * WI = 0 and WI(a) = 0
Ansatz: YI = s(x - a) * 'lI 1
s(x - a) * wi + t(x - a) * WI (a) + s(x - a) * s(x - a) * f * WI = 0
s(x-a)*('lIi +f*WI) =0
(2) y' = s(x - b) * g(x); this is the simplest case:
3!W2 : w~ = 9 and w2(b) = 0
Ansatz: Y2 = s(x - b) * 'lI2
s(x - b) * 'lI~ + t(x - b) * w2(b) = s(x - b) * 9
s(x - b) *w~ = s(x - b) * 9
(3) y' + s(x - a) * f(x) * y = s(x - b) * g(x) then:
3!W4 : w4 + f * W4 = 0 and 'lI 4(a) = 0
3!W3 : w~ + f * W3 = 9 and w3(b) = w4(b)
Ansatz: Y3 = s(x - a) * 'lI4 + s(x - b) * (W3 -W4)
for the case a :5 b
s(x -a) * 'lI4 +s(x -b) * (w; -W4) +t(x - a) *W4(a) +t(x - b) * ('lI3(b)-
w4(b)) + s(x - a) * (s(x - a) * W4 + s(x - b) * ('lI3 - 'lI4)) = s(x - b) * 9
s(x -a) * w4 +s(x- b) * (w~ - 'lI4) +s(x -a) *'lI 4+s(x -b) * ('lI3 -W4) =
s(x - b) * g(x). Hence for x :5 a, for a < x :5 b, and for x > b this is
the solution.
For ode's containing s( -x + a), the proof is similar. If the differential
equation contains a t we solve the equations with the same ansatz but using a
different initial value: wi(b) = g(b). So the derivative contains a t(x-b)*g(b).
For the other cases like a < b and a = b and the ode's containing
s( -x + a), the proof is similar. If the differential equation contains a t we
IV. Solving Discontinuous Ordinary Differential Equations 113

solve the equations with the same ansatz but using a different initial value:
wi(b) = g(b). So the derivative contains a t(x - b) * g(b). •

4. An Implementation of PPDR

In this section we present an implementation of PPDR in Maple. We have


implemented everything necessary to compute in PPDR: evaluation of s and
t, the normal form, differentiation, integration, the rules for extensions of
PPDR, and some changes to the dsolver algorithm. The goal was to cre-
ate a tool that provides automatic solutions of differential equations with
discontinuities.
Maple is a good tool to use for such things, because there is a natural
way to extend the system. We added some procedures to the library and
made a few small changes in the procedures of the dsolver algorithm. To
compute the derivative of s we only had to write a piece of code like the
following:
'diff/s':-proc(a,var)
t(a)*diff(a,var) end:

The Normal Form


We implemented the normal form and the rules ext of Theorem 7. Typing
an expression of PPDR, Maple gives the normal form.

>normal(s(x*x-2»;
1/2 1/2
s(- x - 2 ) + sex - 2 )

>normal(s(x+s(x»);
(1 - sex»~ sex) + sex) sex + 1)

sex)
>normal(x*t(x»
o

Differentiation, Integration
We can compute the derivative of a function expression in PPDR and its
anti-derivative. We saw that the integral of an expression containing t is not
unique. Integrating such an expression, we have to decide whether we prefer
left- or right continuity. This can be chosen by the global Boolean parameter
right conti: =true. We show the integral of s(x - 2) * x * sin(x) and then
compute the derivative:
114 Martin von Mohrenschildt

>int(s(x-2)*x*sin(x) ,x);
sex - 2) (sin(x)- x cos(x»- s(x- 2) (sin(2)- 2 cos(2»

> diff(" ,x);


t(x - 2) sin(x) - t(x - 2) x cos (x) + sex - 2) x sin (x)

- t(x - 2) sin(2) + 2 t(x - 2) cos(2)

> red(");
sex - 2) x sin (x)

Automatic Solution of Discontinuous Ode's


With Maple it is now possible to solve discontinuous differential equations
automatically. We can solve linear ode's with constant coefficients and dis-
continuous perturbation functions, Risch differential equations with disconti-
nuities, and some linear differential equations of higher order. The solutions
of the discontinuous equations are based on the solutions of the correspond-
ing continuous differential equations in their cells. So, as shown before, the
existence of a closed-form solution depends on the existence of the solutions
of the corresponding continuous equations.

Example We show the solution of

y" + y = s(x)
computed and verified with Maple.

> f:=op(2,dsolve(diff(y(x) ,x$2)+y(x)=s(x) ,y(x»);


f := sex) - sex) cos (x) + _Cl sin(x) + _C2 cos (x)

> diff(" ,x);


t(x) - t(x) cos (x) + sin(x) sex) + _Cl cos (x) - _C2 sin(x)

> red(");
sin (x) sex) + _Cl cos (x) - _C2 sin (x)

> diff(" ,x);


sex) cos (x) + sin(x) t(x) - _Cl sin(x) - _C2 cos (x)

> red(");
sex) cos (x) - _Cl sin(x) - _C2 cos (x)
IV. Solving Discontinuous Ordinary Differential Equations 115

> "+f;
sex)

And now an equation of order 2 and parameters in the perturbation


function:
> dsolve(diff(y(x),x$2)=-s(-x)+s(-x+a/2)+s(-x+a/2)-s(-x+a),y(x»;
2 2 2
y(x) =- 1/2 s(- x) x + s(- x + 1/2 a) x + 1/4 s(- x + 1/2 a) a
2 2
- 1/2 s(- x + a) x - 1/2 s(- x + a) a

- x s(- x + 1/2 a) a + x s(- x + a) a + _C1 + _C2 x

We show an example of a discontinuous Risch differential equation:

y' + s(x) * Y = s(x)


> dsolve(diff(y(x),x)+s(x)*y(x)=s(x),y(x»;

2 2
y(x) = sex) exp(- x (s(x) - 1» - exp(- sex) x) sex) +

2
exp(- sex) x) sex) x - exp(- sex) x) sex) x

+ exp(- sex) x) _C1

5. Application

PPDR has many applications. We studied different examples in control theo-


ries, [Moh94). In control theories, we often have to treat piecewise continuous
functions. One has to think about the optimality results of bounded control
functions, and about bang-bang control. The advantage of PPDR is that we
can solve the differential equations symbolically, e.g. with parameters and
then we can optimize. In physics we also consider discontinuous differential
equations, e.g. impulses. ..

References
[Abe91] Aberer, K., Combinatory Differential Fields and Constructive Anal-
ysis, ETH-Thesis, 9357, ETH Zurich, (1991).
[An56] Andre, J., Uber stuckweise lineare Differentialgleichungen, die bei
Reglungsproblemen auftreten, Arch. Math. 7 (1956), pp.148-156.
116 Martin von Mohrenschildt

[Ant73] Antosik, P., Theory of Distributions, Elsevier, Amsterdam, (1973).


[Braun78] Braun, M., Differential Equations and their Applications,
Springer-Verlag, Berlin, (1978).
[Bro90] Bronstein, M., The transcendental Risch differential equation, Jour.
Symbol. Compo 9 (1990), 49-60.
[Dav86] Davenport, J.H., The Risch differential equation problem, SIAM J.
Comput., vol. 15, no. 4 (1986), 903-918.
[Eng90] Engeler, E., Combinatory differential fields, Theoret. Comput. Sci.
72 (1990), 119-131.
[Fil88] Filippov, A.F., Differential Equations with Discontinuous Righthand
Sides, Kluwer Academic Publishers, Norwell, MA, (1988).
[Kan83] Kanwal, R. P., Generalized Functions: Theory and Technique, Aca-
demic Press, New York and San Diego, (1983).
[Liou33] Liouville, J., Sur la determination des integrales dont la valeur est
algebraique, J. de l'Ecole Poly. 14 (1833).
[Moh94] von Mohrenschildt, M., Symbolic $olution of Discontinuous Differ-
ential Equations, ETH-Diss No. 10768, ETH Zurich, (1994).
[Ost46] Ostrowski, A., Sur l'integrabilite elementaire de quelques classes
d'expressions, Rev. Roumaine Math. Pures Appl. 6 (1946), 879-887.
[Ri69] Risch, R.H., The problem of integration in finite terms, Trans. Amer.
Math. Soc. 139 (1969), 167-189.
[Ro29] Rosenthal, A., Uber die Losung von Systemen gewohnlicher Differ-
entialgleichungen, Sitzungsberichte Heidelberger Aka. Wiss., (1929).
[Sing90] Singer, M.F., Formal solutions of differential equations, J. Symbolic.
Comput. 10 (1990), 59-94.

Você também pode gostar