Skip to content

ode2_lie

Nijso edited this page Dec 16, 2017 · 12 revisions

ode2_lie is a solver for second order nonlinear odes. It tries to find an integrating factor for the ode. With an integrating factor, you can then find a first integral of the ode.

Function: ode2_lie(ode,y,x) returns an integrating factor for the input ode. If the ode is of type 'missing y' (y"=f(x,y')) or is of type 'missing x' (y"=f(y,y')), then the ode is actually a first order ode in disguise and the first order ode will be returned. If the ode is exact,the integrating factor that determines exactness will be returned immediately (another integrating factor might be found with a symmetry search).

example: (Kamke ode 136)

/* first, load the file and put the output verbosity to a low value. DEBUGFLAG:1 means only errors and warnings are shown */

(%i01) batch("ode2_lie.mac");DEBUGFLAG:1;display2d:false;

(%i02) ode:'diff(y,x,2)=h('diff(y,x))/(x-y);

(%o03) 'diff(y,x,2) = h('diff(y,x,1))/(x-y)

(%i04) mu:ode2_lie(ode,y,x);

(%o04) ('diff(y,x,1)-1)/h('diff(y,x,1))

/* check if the solution is indeed an integrating factor of the ode: */

(%i05) isIntegratingFactor(mu,ode,y,x); (%o05) true

The result corresponds to the result in the paper [1].

Additionally, we can compute lambda-symmetries from the integrating factor: (%i06) lambda:lambdaSymmetry(ode,mu,y,x);

(%o06) -h('diff(y,x,1))/(y*('diff(y,x,1)-1)+x*(1-'diff(y,x,1)))

(%i07) isLambdaSymmetry(lambda,ode,y,x);

(%o07) true

We can also compute a first integral directly from the ode.

(%i08) firstIntegral(ode,y,x);

(%o08) ['integrate(('diff(y,x,1)-1)/h('diff(y,x,1)),'diff(y,x,1)) = -log(y-x)]

The first integral can be checked using the exact ode:

(%i09) isFirstIntegral(%[1],mu*(lhs(ode)-rhs(ode)),y,x);

(%o09) true

Function:odeconstruct(mu,y,x) Find the general second order ode admitting a certain integrating factor example To find the general second order ode admitting an integrating factor of the form mu(x,y),

(%i10) odeconstruct(mu(x,y),y,x);

(%o10) 'diff(y,x,2) = -('diff(mu(x,y),y,1)*('diff(y,x,1))^2+('diff(%F(x,y,'diff(y,x,1)),y,1)+'diff(mu(x,y),x,1))*'diff(y,x,1)+'diff(%F(x,y,'diff(y,x,1)),x,1))/mu(x,y)

where %F(x,y,y') is a general function. This corresponds to the general second order ode y" = a(x,y)y'^2 + b(x,y)*y' + c(x,y) with a=-mu_y/mu, b=-(%F_y+mu_x)/mu, c=-%F_x/mu

References:

[1] E.S. Cheb-terrab and A.D. Roche, Integrating Factors for Second-order ODEs, J. Symbolic Computation 27 (1999)

[2] C. Muriel and J.L. Romero, First integrals, integrating factors and lambda-symmetries of second order differential equations, J. Phys. A: Math Theor. 42 (2009)

Clone this wiki locally