DEtools - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : Lie Symmetry Method : Commands for ODEs : DEtools/firint

DEtools

  

firint

  

calculate first integrals for exact ODEs

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

firint(ODE, y(x), _mu = .., basis = [.., ...], method = formal)

Parameters

ODE

-

an ODE that is either linear, or exact, or otherwise an integrating factor for it shall also be indicated using the _mu = ... option

y(x)

-

(optional) required if the exact_ODE contains derivatives of more than one function

_mu = ..

-

(optional) to indicate an integrating factor for ODE when it is not exact

method = formal

-

(optional) only for linear ODEs, to request the computation of a complete set of first integrals

basis = [...]

-

(optional) only for linear ODEs, a basis of solutions for ODE, to be used to compute a complete set of first integrals

Description

• 

The firint command receives an nth order ODE, that could be: 1) linear or nonlinear but in exact form, that is, satisfying ODE=dRdx, 2) not in exact form but an integrating factor for it is indicated using the option _mu = ..., 3) the ODE is linear together with the option method = formal. The output of firint for these problems consists of a related first integral (the ODE R, of order n1, in ODE=dRdx), or a complete set of them in case 3). The dependent variable y(x), is required only when the ODE contains derivatives of more than one function. Typically, the given ODE is exact; for calculating integrating factors to use with the option _mu = ... see intfactor.

• 

The optional arguments can be given alone or in conjunction, and in any order.

• 

When a linear ODE is given and the option method = formal is indicated, firint attempts computing a complete basis of solutions for the ODE, or uses a given one if passed with the optional argument basis = [...], and from it computes a complete set of first integrals, that is as many as the differential order and all independent from each other.

• 

This function is part of the DEtools package, and so it can be used in the form firint(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[firint](..).

Examples

Nonlinear and linear ODEs

  

The general first order linear ODE and its integrating factor

withDEtools:

L_ODEⅆⅆxyx=Axyx+Bx

L_ODE:=ⅆⅆxyx=Axyx+Bx

(1)

ΜintfactorL_ODE

Μ:=ⅇ∫Axⅆx

(2)
  

A related first integral can now be obtained either using the option _μ=Μ, as in: firint(L_ODE, _mu = Mu), or multiplying directly L_ODE by Mu (by construction, Mu*L_ODE is exact)

firintΜL_ODE

ⅇ∫Axⅆxyx∫ⅇ∫AxⅆxBxⅆx+_C1=0

(3)
  

The most general first order ODE reducible by an integrating factor depending only on x is a Linear ODE (see redode):

reducible_ODEredodeμx,yx

reducible_ODE:=ⅆⅆxyx=ⅆⅆxμxyx+_F1xμx

(4)
  

An exact nonlinear ODE which also has integrating factors of the form μx,y

ode2xyxⅆ2ⅆx2yx+xⅆⅆxyx2+ayxⅆⅆxyx+fx

ode2:=xyxⅆ2ⅆx2yx+xⅆⅆxyx2+ayxⅆⅆxyx+fx

(5)

odeadvisorode2

_2nd_order,_exact,_nonlinear,_2nd_order,_reducible,_mu_xy

(6)
  

Two integrating factors and the related first integrals

μintfactorode2

μ:=1,xax

(7)

firintode2

12ayx212yx2+ⅆⅆxyxxyx+∫fxⅆx+_C1=0

(8)

firintμ2ode2

xayxⅆⅆxyx+∫xafxxⅆx+_C1=0

(9)
  

The answer to ode2 can be built from these two first integrals interactively, or by calling dsolve with extra arguments, indicating the use of the integrating factor scheme mu_xy:

dsolveode2,'mu_xy'

yx=2a1x1a∫xafxxⅆx+x1a_C1∫fxⅆx_C2a1,yx=2a1x1a∫xafxxⅆx+x1a_C1∫fxⅆx_C2a1

(10)
  

A third order ODE, an integrating factor for it, and the related first integral.

ode3ⅆ3ⅆx3yx=2ⅆⅆxyx2yxⅆ2ⅆx2yxⅆⅆxyx2ⅇⅆ2ⅆx2yx

ode3:=ⅆ3ⅆx3yx=2ⅆⅆxyx2yxⅆ2ⅆx2yxⅆⅆxyx2ⅇⅆ2ⅆx2yx

(11)

Μintfactorode3

Μ:=ⅇⅆ2ⅆx2yx

(12)

firintΜode3

yxⅆⅆxyx+ⅇⅆ2ⅆx2yx+x+_C1=0

(13)

Linear ODEs and method = formal

  

The firint command treats linear and nonlinear ODEs in equal footing, unless the optional method = formal, valid only for linear equations, is indicated. Consider

ode4ⅆ2ⅆx2yx=6x6ⅆⅆxyxx3x+2+6yxx3x+26x3x+2

ode4:=ⅆ2ⅆx2yx=6x6ⅆⅆxyxx3x+2+6yxx3x+26x3x+2

(14)
  

Calling firint without optional arguments will result in an error message telling ode4 is not exact. Passing method = formal, you instead get a complete set of independent first integrals obtained by first computing a basis of the solution space

firintode4,method=formal

xⅆⅆxyxⅆⅆxyx+yx1x33x+2,xⅆⅆxyx+2yx23x+2

(15)
  

A textbook example: the most general 2nd order non-homogeneous linear ODE having for solution basis g[1]x and g[2]x, for the homogeneous part, and g[0]x as particular solution of the whole non-homogeneous equation, so the basis of solutions is g[1]x,g[2]x,g[0]x

PDEtools[declare]yx,gx,prime=x

yxwill now be displayed asy

gxwill now be displayed asg

derivatives with respect toxof functions of one variable will now be displayed with '

(16)

Basisg[1]x,g[2]x,g[0]x

Basis:=g1,g2,g0

(17)

ode5ⅆ2ⅆx2yx=ⅆ2ⅆx2g[1]xg[2]xg[1]xⅆ2ⅆx2g[2]xⅆⅆxyxg[2]xⅆⅆxg[1]xg[1]xⅆⅆxg[2]x+ⅆⅆxg[1]xⅆ2ⅆx2g[2]xⅆ2ⅆx2g[1]xⅆⅆxg[2]xyxg[2]xⅆⅆxg[1]xg[1]xⅆⅆxg[2]x+ⅆ2ⅆx2g[2]xg[0]xⅆⅆxg[1]x+g[2]xⅆ2ⅆx2g[0]xⅆⅆxg[1]xⅆ2ⅆx2g[0]xg[1]xⅆⅆxg[2]x+ⅆⅆxg[2]xg[0]xⅆ2ⅆx2g[1]xg[2]xⅆⅆxg[0]xⅆ2ⅆx2g[1]x+ⅆⅆxg[0]xg[1]xⅆ2ⅆx2g[2]xg[2]xⅆⅆxg[1]xg[1]xⅆⅆxg[2]x

ode5:=y''=g1''g2g1g2''y'g2g1`'`g1g2`'`+g1`'`g2''g1''g2`'`yg2g1`'`g1g2`'`+g2''g0g1`'`+g2g0''g1`'`g0''g1g2`'`+g2`'`g0g1''g2g0`'`g1''+g0`'`g1g2''g2g1`'`g1g2`'`

(18)
  

Verify that Basis is a complete basis for the solutions of ode5: from Basis construct the general solution then test it using odetest

sol5yx=_C1g[1]x+_C1g[2]x+g[0]x

sol5:=y=_C1g1+_C1g2+g0

(19)

odetestsol5,ode5

0

(20)
  

A complete set of first integrals for ode5 computed from Basis

firintode5,yx,basis=Basis

yg0g2`'`g2y'g0`'`g1g2`'`g2g1`'`,y+g0g1`'`+g1y'g0`'`g1g2`'`g2g1`'`

(21)
  

Verify this result

mapfirtest,,ode5,yx

0,0

(22)

See Also

DEtools

DEtools[firtest]

DEtools[intfactor]

DEtools[redode]

dsolve

PDEtools

PDEtools[declare]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam