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

Online Help

All Products    Maple    MapleSim


convert/ODE

convert ODEs to other ODEs of different type

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert(ODE, TYPE, y(x), keep, simplifier = ...)

convert(ODE, y_x, implicit)

Parameters

ODE

-

ODE (ordinary differential equation)

TYPE

-

one of: y_x, Riccati, linearODE, NormalForm, Abel, Abel_RNF, FirstKind, SecondKind, DESol, MobiusX, MobiusY, and MobiusR

y(x)

-

dependent variable of the ODE; required only if ODE contains more than one function that is differentiated

keep

-

(optional); specify that the returned ODE contain the same independent and dependent variables as the given ODE

simplifier = ...

-

(optional); specifies a simplifier to be used instead of the default; two shortcuts are available: parfrac and size

implicit

-

avoid the automatic isolation of the highest derivative; valid only if the TYPE parameter has the value yx

Description

• 

The convert ODE routines provide conversion schemes for ordinary differential equations (ODEs) that are frequently used in the literature, or that may be useful for other reasons. As a convention, results are returned as a sequence of two elements: the resulting ODE and the transformation of variables used to obtain it (see the examples below).

• 

The conversion schemes available are:

1. 

y_x - interchanges the roles between the dependent and independent variable;

2. 

NormalForm - rewrites in Normal form linear ODEs (any order) as well as first order Riccati and Abel type ODEs;

3. 

Riccati - converts a second order linear ODE to a first order one of Riccati type;

4. 

linearODE - converts a first order Riccati type ODE to a second order linear one;

5. 

Abel - converts a first order nonlinear ODE to an equivalent Abel ODE when that is possible using some transformations;

6. 

Abel_RNF - rewrites an Abel type first order ODE in Rational Normal Form;

7. 

FirstKind - rewrites Second Kind Abel ODEs in First Kind form;

8. 

SecondKind - rewrites First Kind Abel ODEs in Second Kind form;

9. 

MobiusX - converts an arbitrary ODE applying to it a Mobius transformation of the independent variable- say x;

10. 

MobiusY - converts an arbitrary ODE applying to it a Mobius transformation of the dependent variable- say yx;

11. 

MobiusR - converts a second order linear ODE into another one by sequentially applying three transformations: Riccati, MobiusY, and linearODE;

12. 

DESol - rewrites as a DESol the derivative of a DESol.

  

Regarding the conversion to Rational Normal Form of Abel ODEs, note that the returned ODE has rational coefficients if and only if the invariants of the given Abel ODE are rational in the independent variable. For a more powerful approach towards rational coefficients see also DEtools[power_equivalent].

Examples

Example 1. Interchanging the roles between the dependent and independent variables of an ODE

Given an ODE, where the unknown is, say, yx, you can always rewrite it considering y and x=xy as the actual independent and dependent variables, changing dydx=dydx, and so on. The resulting ODE in y,xy is the one returned by convert( ode, y_x) and is obtained by applying the transformation

xyx,yxx

followed by renaming the variables x=y,y=x. This conversion operation can in many situations transform an otherwise difficult problem into an easy one and vice versa. For instance, this nasty Abel type ODE in yx

odediffyx,x=a0+a1yx+a2yx2+a3yx3s1x+s0yx+r1x+r0

odeⅆⅆxyx=a0+a1yx+a2yx2+a3yx3s1x+s0yx+r1x+r0

(1)

where the 8 coefficients ai,rk,sj are basically arbitrary constants, transforms into this simple and straightforwardly solvable first order linear ODE in xy

convertode,y_x

ⅆⅆyxy=ys1+r1xyy3a3+y2a2+ya1+a0+ys0+r0y3a3+y2a2+ya1+a0

(2)

dsolve

xy=ⅇys1+r1y3a3+y2a2+ya1+a0ⅆyys0+r0y3a3+y2a2+ya1+a0ⅆy+c__1ⅇys1+r1y3a3+y2a2+ya1+a0ⅆy

(3)

The conversion can be applied to non-differential expressions as well, in which case it requires an indication of the (current) dependent variable as extra argument.

solconvert,y_x,xy

solx=` `yxⅇ` `_b_as1+r1_a3a3+_a2a2+_aa1+a0ⅆ_a_bs0+r0_b3a3+_b2a2+_ba1+a0ⅆ_b+c__1ⅇ` `yx_as1+r1_a3a3+_a2a2+_aa1+a0ⅆ_a

(4)

The above is the solution - in implicit form - to the original Abel ODE. Isolating the integration constant, this result is testable as a first integral form of solution (see DEtools[firint]) using DEtools[firtest] or odetest:

odetestisolatesol,_C1,ode

0

(5)

This conversion can be applied to arbitrary ODEs. For instance, this second order nonlinear ODE in yx

diffyx,x,x=Byxxdiffyx,x3Ayxdiffyx,x2

ⅆ2ⅆx2yx=Byxxⅆⅆxyx3Ayxⅆⅆxyx2

(6)

where A and B are arbitrary functions of yx, becomes a linear ODE in xy

convert,y_x

ⅆ2ⅆy2xy=Byxy+Ayⅆⅆyxy

(7)

Another example:

odediffyx,xDφyxyx=0

odeⅆⅆxyxDφyxyx=0

(8)

convertode,y_x

ⅆⅆyxy=1ⅆⅆyφyy

(9)

Using the 'implicit' option, you avoid the isolation of the highest derivative in the output.

convertode,y_x,implicit

1ⅆⅆyxyⅆⅆyφyy=0

(10)

Example 2. Rewriting ODEs in normal form

This conversion is currently applicable to linear homogeneous ODEs of arbitrary differential order and to first order nonlinear ODEs of Riccati and Abel type.

By definition, a nth order linear ODE is in normal form when the coefficient of the nth-1 derivative is zero.

odediffyx,x,x=Axdiffyx,x+Bxyx

odeⅆ2ⅆx2yx=Axⅆⅆxyx+Bxyx

(11)

convertode,NormalForm

ⅆ2ⅆx2_ax=Bx+Ax24ⅆⅆxAx2_ax,yx=c__1ⅇAx2ⅆx_ax

(12)

convertode,NormalForm,keep

ⅆ2ⅆx2yx=Bx+Ax24ⅆⅆxAx2yx,_ax=c__1ⅇAx2ⅆxyx

(13)

In above, when using the keep optional argument, the returned ODE is expressed using the same variables (here x,yx) of the given ODE. When the linear ODE is in normal form it is invariant under arbitrary linear transformations of the dependent variable

yxPxyx

where P is an arbitrary function of its argument.

This other ODE is already in normal form:

odediffyx,x,x,x=sqrtxdiffyx,x+xyx

odeⅆ3ⅆx3yx=xⅆⅆxyx+xyx

(14)

Hence, the second element in the following output sequence is the scaling transformation, where _C1 can have any value different from zero:

convertode,NormalForm,keep

ⅆ3ⅆx3yx=xⅆⅆxyx+xyx,_ax=c__1yx

(15)

In some cases, however, it is possible to search for a transformation to Normal form such that, in addition, the coefficients are rational. For that purpose, try the more general DEtools[power_equivalent] command, which explores more elaborated transformations.

DEtoolspower_equivalentode,keep

ⅆ3ⅆx3yx=8x5+4x23x3yx+4x3+3x2ⅆⅆxyx,x=_a,yx=_b_a_a

(16)

A Riccati type ODE is in normal form when the coefficients of yx2 and yx in the right-hand side are respectively equal to one and zero; that is, when it is of the form y'=y2+Jx for some Jx.

diffyx,x=c2xyx2+c1xyx+c0x

ⅆⅆxyx=c2xyx2+c1xyx+c0x

(17)

convert,NormalForm,keep

ⅆⅆxyx=yx2+c2x2c1x2+4c0xc2x32c2xc1xⅆⅆxc2x+2c2x2ⅆⅆxc1x3ⅆⅆxc2x2+2c2xⅆ2ⅆx2c2x4c2x2,_ax=2c2xyx+c1xc2x+ⅆⅆxc2x2c2x2

(18)

The normal form of an Abel type ODE is defined in an analogous manner, y'=y3+Jx, but in the Abel case this form cannot be achieved without computing integrals and finding inverses of potentially non-trivial algebraic expressions. For instance, for the general case:

diffyx,x=f0x+f1xyx+f2xyx2+f3xyx3

ⅆⅆxyx=f0x+f1xyx+f2xyx2+f3xyx3

(19)

convert,NormalForm,keep

ⅆⅆy_by=_by3+27f0xf3x29f1xf2xf3x+2f2x3+9ⅆⅆxf2xf3x9f2xⅆⅆxf3x27f3x3ⅇ` `xf1yf2y23f3yⅆy3x=RootOfy` `_Zf3_bⅇ` `_b3f1yf3yf2y23f3yⅆy2ⅆ_b|27f0xf3x29f1xf2xf3x+2f2x3+9ⅆⅆxf2xf3x9f2xⅆⅆxf3x27f3x3ⅇ` `xf1yf2y23f3yⅆy3x=RootOfy` `_Zf3_bⅇ` `_b3f1yf3yf2y23f3yⅆy2ⅆ_b,y=f3xⅇf1xf2x23f3xⅆx2ⅆx,_by=_ax+f2x3f3xⅇf1xf2x23f3xⅆx

(20)

In all cases (linear, Riccati and Abel ODEs) the coefficients of yx and its derivatives are absolute invariants with respect to the equivalence transformations defining the ODE class. These transformations, for ODEs polynomial in the unknown and its derivatives, are always of the form

xFx,yxPxyx+Qx

where F,P,Q are arbitrary functions of their arguments (for linear homogeneous ODEs, Q=0).

Examples 3. and 4. Converting linear second order ODEs into Riccati ones and vice versa

The general form of a second order linear homogeneous ODE is

ode_2diffdiffyx,x,x+Axdiffyx,x+Bxyx=0

ode_2ⅆ2ⅆx2yx+Axⅆⅆxyx+Bxyx=0

(21)

This type of ODE is invariant under scale transformations of the dependent variable

yx_C1yx

where _C1 is an arbitrary constant. Due to the presence of this symmetry (the infinitesimals are 0,y, see DEtools[transinv]), you can always reduce the differential order of linear ODEs by one. In the second order case this reduction leads to a first order Riccati type ODE. A sequence with this Riccati ODE and the change of variables performed to obtain it are given by the following:

ode_1convertode_2,Riccati

ode_1ⅆⅆx_ax=_F1x_ax2+Ax_F1xⅆⅆx_F1x_ax_F1x+Bx_F1x,yx=ⅇ_ax_F1xⅆxc__1

(22)

The transformation equation can also be seen as the solution to the original second order linear ODE, provided that you can solve the reduced Riccati for _a(x).

Note also the introduction, in the equivalent Riccati ODE, of an arbitrary function _F1x. Any _F1x can be used. Typically, you set _F1x=1 or a constant. The original second order ODE can be obtained using the inverse conversion routine, as follows.

convertode_11,linearODE,_ax

ⅆ2ⅆx2_bx=Axⅆⅆx_bxBx_bx,_ax=ⅆⅆx_bx_F1x_bx

(23)

In above we are indicating the dependent variable as a third argument; this is required when the given ODE contains more than one function being differentiated.

Depending on the specific linear ODE or Riccati ODE you are working with, these conversion routines, along with the ability to adjust the values of an arbitrary function, may help you find solutions to problems not directly solved by dsolve.

Example 5. Convert to an equivalent Abel type ODE

Some first order nonlinear equations frequently appearing when solving autonomous first order ODE systems in two variables can be mapped into Abel equations. The transformation used to go from the Abel equivalent equation in - say - ux to the given equation in - say - yx is the second operand in the output:

odediffyx,x=λyx+hxyxn1+gxyxn1

odeⅆⅆxyx=λyx+hxyxn1+gxyxn1

(24)

convertode,Abel,ux

ⅆⅆxux=gxλgxhxn1ux3+ⅆⅆxgx+2n+2λgx+n1hxux2+λn1ux,ux=yxn11+gxyxn1

(25)

DEtoolsodeadvisor1,ux

_Abel

(26)

The more general first order equation which can be mapped into an Abel equation by these routines is

odediffyx,x=yx3nc0x+c3x+c0xgx3+diffgx,xgx+c2xgx+c1xgx2yx2n+2c1xgx+3gx2c0x+diffgx,x+c2xyxn+1+3c0xgx+13c1xyx2n1yx+gxyxn

odeⅆⅆxyx=yx3nc0x+c3x+c0xgx3+ⅆⅆxgxgx+c2xgx+c1xgx2yx2n+2c1xgx+3gx2c0x+ⅆⅆxgx+c2xyxn+1+3c0xgx+c1x3yx2n1yx+gxyxn

(27)

convertode,Abel,yx,ux

ⅆⅆxux=c0x+c1xux+c2xux2+c3xux3,ux=yxn11+gxyxn1

(28)

Example 6. Rational Normal Form for Abel type ODEs

As mentioned in 2. above, the normal form for Abel ODEs requires integration to be computed. For that reason some authors prefer to use a different form, not requiring integration, where the coefficient of yx2 and the independent coefficient are respectively equal to zero and one; that is, the ODE is of the form y'=f3xy3+f1xy+1. This form is frequently called in the literature Rational Normal Form because when the invariants of the given ODE (the one originally not in RNF form) are rational in the independent variable, the coefficients in the RNF are rational. However, neither the coefficients of yx in the RNF form are absolute invariants under the transformation defining the class nor these coefficients are rational when the invariants of the given Abel ODE are not. For instance, for this Abel ODE

odediffyx,x=32x12+1xx12+1x112yx3154x134yx2

odeⅆⅆxyx=3x+1xx+1yx32x11215yx24x134

(29)

the conversion to RNF does not imply on rational coefficients:

convertode,Abel_RNF,keep

ⅆⅆxyx=259x32+22yx33456x3x+13x+x13+18x4+55x52+30xyx89x3+11x32+2x2+1,_ax=5x549x322yx+12x52+12x72x+12x+x12

(30)

In some cases, for example, this one, a truly rational coefficients ODE in RNF form can be obtained using the more powerful DEtools[power_equivalent] command, which explores more elaborated transformations

DEtoolspower_equivalentode,keep

ⅆⅆxyx=1259x+22yx311664x3x+13+54x2+99x+38yx108x3+132x2+24x,x=_a32,yx=186_a3_b_a+5_a154+12_a32_b_a+5_a94+6_b_a5_a342+9_a32

(31)

Examples 7. and 8. Converting Abel ODEs from First kind format into Second kind format and vice versa

The ODE of the previous example is in First Kind form. To convert it to Second Kind form use

convertode,SecondKind,keep

ⅆⅆxyx=ⅆⅆx_F1x_F1xyx2+ⅆⅆx_F2x154x134_F1x+ⅆⅆx_F1x_F2xyx+ⅆⅆx_F2x154x134_F2x3x32+12x112_F1xyx_F1x+_F2x,_ax=1yx_F1x+_F2x

(32)

Note in above the introduction of two arbitrary functions _F1,_F2; basically any values for them suffice for performing the conversion, for instance the choice _F2=0, _F1=1 leads to

normaleval,_F2=0,_F1=1

ⅆⅆxyx=32x194+2x134+5yxx1124x354yx,_ax=1yx

(33)

To convert Second Kind Abel ODEs into First Kind form the procedure is analogous:

convertop1,,FirstKind,keep

ⅆⅆxyx=3x32+1yx32x11215yx24x134,_ax=1yx

(34)

Example 9. Converting ODEs applying MobiusX transformations of the independent variable

A second order linear ODE with constant coefficients:

odediffyx,x,x=c1diffyx,x+c0yx

odeⅆ2ⅆx2yx=c1ⅆⅆxyx+c0yx

(35)

In the following result, you see the transformed ODE in ut and the Mobius transformation of the independent variable, x, used

transformed_odeconvertode,MobiusX,a0,a1,b0,b1,ut

transformed_odeⅆ2ⅆt2ut=2tb02+a1c12b1b0+a0b1c1ⅆⅆtutb0t+b12+c0a0b1b0a12utb0t+b14,x=a0t+a1b0t+b1,yx=ut

(36)

All the arguments after MobiusX are optional. If the Mobius parameters are not specified, a transformation of that type is built with global variables _zn.

Mobius transformations of the independent variable move the location of the poles (singularities) of the equation. In this example, the original singularity is irregular at infinity while the one of the transformed ODE resulted moved to b1b0:

DEtoolssingularitiesode

regular=,irregular=

(37)

DEtoolssingularitiestransformed_ode1

regular=,irregular=b1b0

(38)

Among useful functionality now available for these convert,ODEs mappings, there is the option to specify a simplifier to be used instead of the default one. For example, this specifies a MobiusX transformation of the form x=t1t+1 and requests the coefficients of yx and its derivatives to be in partial fraction decomposition form:

convertode,MobiusX,1,1,1,1,ut,parfrac

ⅆ2ⅆt2ut=2c1t+122t+1ⅆⅆtut+4c0utt+14,x=t1t+1,yx=ut

(39)

When you know the output will not be simplifiable, or just want to get it faster with no simplification costs, use the optional argument simplifier = NONE.

Example 10. Converting ODEs applying MobiusY transformations of the dependent variable

Mobius transformations of the dependent variable - in this example yx - have the property of transforming a linear equation into nonlinear but leaving invariant (in form) the corresponding Riccati equation. To request the coefficients be simplified in size pass the optional argument simplifier = (u -> simplify(u,size)) or the shortcut keyword size as in

convertode,MobiusY,1,1,1,1,ut,size

ⅆ2ⅆt2ut=2ⅆⅆtut2ut+1+2utc1+2c1ⅆⅆtut2ut+1+ut3c0+ut2c0c0utc02ut+1,x=t,yx=ut1ut+1

(40)

The keywords parfrac and size are specially available due to these being the most common situations; these or any other simplification can be requested using, for example, simplifier = (u -> any_procedure(u)).

Check the action of this transformation in the corresponding Riccati equation:

convertode,Riccati,keep

ⅆⅆxyx=_F1xyx2+c1_F1xⅆⅆx_F1xyx_F1xc0_F1x,_ax=ⅇyx_F1xⅆxc__1

(41)

convert1,MobiusY,f,g,r,sx,yx,ux

ⅆⅆxux=_F1x2fx2+_F1xfxrxc1_F1xⅆⅆxfxrx+_F1xⅆⅆxrxfxⅆⅆx_F1xfxrxrx2c0ux2_F1xfxsxrxgx+fxsxrxgxⅆⅆx_F1x_F1xⅆⅆxfxsx_F1xⅆⅆxgxrx+_F1xⅆⅆxrxgx+_F1xⅆⅆxsxfx+2_F1x2fxgx+c1fxsx+rxgx_F1x2sxrxc0ux_F1xfxsxrxgx+_F1x2gx2+_F1xsxgxc1_F1xⅆⅆxgxsx+_F1xⅆⅆxsxgxⅆⅆx_F1xsxgxsx2c0_F1xfxsxrxgx,yx=fxux+gxrxux+sx

(42)

So the transformation uses four arbitrary functions of x, the resulting equation is still of Riccati type

DEtoolsodeadvisor1,ux,Riccati

_Riccati

(43)

In fact MobiusY transformations define the Riccati class: through these transformations, any Riccati equation can be obtained from any other one.

Example 11. Converting second order linear ODEs applying the composition of transformations Riccati, MobiusY, and linearODE

These non-local transformations (have an integral with derivatives of the dependent variable in the integrand) have the ability of generating the whole second order linear ODE from any given one, and for particular cases of the transformation parameters result in equations with remarkable properties. Consider an arbitrary second order linear ODE

odediffyx,x,x=c1xdiffyx,x+c0xyx

odeⅆ2ⅆx2yx=c1xⅆⅆxyx+c0xyx

(44)

Applying MobiusR, we obtain

ode_uconvertode,MobiusR,0,1,1,0,yx,ux

ode_uⅆ2ⅆx2ux=c1xc0x+ⅆⅆxc0xⅆⅆxuxc0x+uxc0x,yx=ⅇuxc0xⅆⅆxuxⅆx

(45)

Applying to this result MobiusR again you reobtain the original equation

convertode_u1,MobiusR,0,1,1,0,ux,yx

ⅆ2ⅆx2yx=c1xⅆⅆxyx+c0xyx,ux=ⅇc0xyxⅆⅆxyxⅆx

(46)

In other words, this particular non-local transformation has itself for inverse. Another important property: Depending on the equation, MobiusR transformations add a so-called false singularity (the singularity actually exists but the power series solution does not require a logarithmic term). For example, take for coefficients

value_of_cc0x=2τ+σx,c1x=2xτ

value_of_cc0x=2τ+σx,c1x=2x2τ

(47)

Inserting these values into the generic linear ode we obtain one with one irregular singularity at infinity - so the equation admits 0F1 hypergeometric solutions:

evalode,value_of_c

ⅆ2ⅆx2yx=2x2τⅆⅆxyx+2τ+σxyx

(48)

DEtoolssingularities

regular=,irregular=

(49)

dsolve,hyper3

yx=c__1hypergeomσ24+τ24,12,x+σ2ⅇτ+σx+c__2x+σhypergeom12σ24+τ24,32,x+σ2ⅇτ+σx

(50)

If we now insert these values of cj into the MobiusR transformed ODE for ux, the result is an ODE with one regular (so-called false) and one irregular singularities; thus the equation belongs to the Heun biconfluent class:

ode_uevalode_u1,value_of_c

ode_uⅆ2ⅆx2ux=22x2ττ+σx+2τ+2σⅆⅆxux2τ+σx+2uxτ+σx

(51)

DEtoolssingularities

regular=0,irregular=

(52)

dsolveode_u,Heun

ux=c__1x2HeunB2,2σ,σ2τ2,2τ,xⅇxτ+x+σ+c__2x2HeunB2,2σ,σ2τ2,2τ,xⅇxτ+x+σⅇxx+2σHeunB2,2σ,σ2τ2,2τ,x2x3ⅆx

(53)

And because this singularity is false the solution to the ODE in ux can also be expressed as a linear combination of hypergeometric functions and its derivatives:

dsolveode_u,hyper3

ux=c__1ⅇxτ+x+σhypergeomσ24+τ24,12,x+σ2+σ+τx+σhypergeomσ24+τ24+1,32,x+σ2+c__2ⅇxτ+x+σσ2+τ2+2x+σ2hypergeom32σ24+τ24,52,x+σ23σ2+τ+xσ+τx1hypergeom12σ24+τ24,32,x+σ2

(54)

By entering infoleveldsolve4 before executing this sequence of inputs, you obtain detailed information regarding these processes, all running in background inside dsolve's subroutines.

Example 12. Converting the derivative of a "DESol" structure into a DESol itself

Consider an arbitrary second order linear ODE

odediffyx,x,x+fxyx=0

odeⅆ2ⅆx2yx+fxyx=0

(55)

and the abstract representation for its solution (see DESol)

soldsolveode

solyx=DESolfx_Yx+ⅆ2ⅆx2_Yx,_Yx

(56)

If we differentiate sol, the result is returned as an uncomputed derivative

diffsol,x

ⅆⅆxyx=ⅆⅆxDESolfx_Yx+ⅆ2ⅆx2_Yx,_Yx

(57)

But the derivative of the solution of an nth order linear ODE also satisfies an nth order linear ODE. Hence, it is possible to rewrite this derivative above as a DESol itself, whose contents is also a second order ODE:

convert,DESol

ⅆⅆxyx=DESolⅆ2ⅆx2_Yxⅆⅆxfxⅆⅆx_Yxfx+fx_Yx,_Yx

(58)

Depending on the situation, this rewriting is convenient. For example, it is of use to study the solutions of an ODE for y which we do not know how to solve by studying the solutions of the ODE satisfied by y' which we may know how to solve, or to study the properties of the function y' by studying the properties of the differential equation it satisfies,

op1,1,rhs

ⅆ2ⅆx2_Yxⅆⅆxfxⅆⅆx_Yxfx+fx_Yx

(59)

These conversions to DESol can be performed with linear ODEs of arbitrary order.

See Also

convert

DEtools

DEtools/power_equivalent

odeadvisor