LocalSolutionsPoint.ml

(* Copyright INRIA and Microsoft Corporation, 2008-2013. *)
(* DDMF is distributed under CeCILL-B license. *)

(* The service LocalSolutionsPoint computes all transseries solutions  *)
(* of a differential equation at some given point. A transseries       *)
(* solution consists of a Puiseux series of log-power type, multiplied *)
(* by some exponential factor and a power factor x^alpha with alpha an *)
(* algebraic number.                                                   *)

(* Here is an overview how several services call each other to compute *)
(* the local solutions of a differential equation at some point:       *)
(* LocalSolutionsPoint: transseries solutions at an arbitrary point    *)
(* -> LocalSolutionsOrigin: transseries solutions at the origin        *)
(*    -> LogSeriesAlpha: log-power series with x^alpha factor          *)
(*       -> LogSeriesZero: log-power series solutions                  *)

INCLUDE "preamble.ml"

let title (_, _, _, point, _, _) =
  <:text<Local Solutions at <:isymb<$(point)>>>>


(* Compute all transseries solutions of a differential equation        *)
(* at a given point (the point is encoded by the given transformation. *)
(* The functions u[i](n) are used to denote the coefficient sequences  *)
(* in the series expansions.                                           *)
let_service LocalSolutionsPoint
  (eqn : diffeq maple)
  (y : name maple)
  (x : name maple)
  (transf_display : any maple)
  (u : name maple)
  (n : name maple) :
  DC.sec_entities * any maple with { title = title } =

  let transf = << DDMF:-dynamow_to_maple($(transf_display)) >> in
  let point = << solve($(transf) = 0, $(x)) >> in
  let point = if <:bool< [$(point)] = [] >> then << infinity >> else point in
  let intro =
    <:par<
      On this page, a basis of local solutions of the differential equation
      <:dmath< $(symb: eqn) = 0 >>
      at the expansion point <:isymb< $(point) >> is obtained
      by closely following
      the Frobenius method as described in $(t_ent:Bibliography.b "vH01").
    >> in

  (* Transform the differential equation such as to move the *)
  (* expansion point to the origin. *)
  let inv_transf =
    << proc(x) local v; subs(v=x, solve($(transf) = v, x)) end proc($(x)) >> in
  let as_transf =
    if <:bool< $(point) = infinity >>
    then << $(y)($(x)) * $(x) - $(transf) * $(x) >>
    else << $(y)($(x)) - $(inv_transf) >> in
  let trans_eqn =
    << collect(
      evala(gfun:-algebraicsubs($(eqn), $(as_transf), $(y)($(x)))),
      {diff, $(y)}, factor) >> in
  let move_text = if <:bool< $(point) = 0 >> then <:par<>> else
    <:par<
      The first step consists in moving the expansion point to the
      origin, which is achieved by means of the transformation
      <:imath< $(symb: x) \mapsto $(symb: inv_transf) >>.
      The transformed differential equation is
      <:dmath< $(symb: trans_eqn) = 0. >>
    >> in

  (* Compute the local solutions at the origin of the transformed equation *)
  (* and update the result by moving the expansion point back. *)
  let content, basis = LocalSolutionsOrigin.doc_obj trans_eqn y x u n in
  <:unit<
    proc() local i;
      for i from 1 to nops($(basis)) do
        $(basis)[i]:-exp_factor :=
          subs($(x) = $(transf_display), $(basis)[i]:-exp_factor);
        $(basis)[i]:-finite_part :=
          subs($(x) = $(transf_display), $(basis)[i]:-finite_part);
        $(basis)[i]:-variable :=
          subs($(x) = $(transf_display), $(basis)[i]:-variable);
      end do;
    end proc()
  >>;
  let back_text = if <:bool< $(point) = 0 >> then <:par<>> else
    <:par<
      In the following it is described how the local solutions of this
      equation at the origin are computed; local solutions of the
      original equation are obtained by substituting <:isymb< $(x) >>
      by <:isymb< $(transf_display) >>.
    >> in

  DC.section
    (title _req_params)
    (intro @@@ move_text @@@ back_text @@@ content),
  basis

Generated by GNU Enscript 1.6.5.90.