GeneralFormulaForTaylorBound.ml

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

INCLUDE "preamble.ml"

let title _ = <:text<Tail Bound: General Formula>>

let_service GeneralFormulaForTaylorBound
  (def : diffeq maple)
  (y : name maple)
  (x : name maple)
  (notation : string) :
  DC.sec_entities * unit with { title = title } =
  let tail_bound =
    << gfun:-NumGfun:-bound_diffeq_tail($(def), $(y)($(x)), N) >> in
  let par1 =
    <:par<
      The tail <:imath< \left|\sum_{n=N}^\infty u(n) $(symb: x)^n\right| >>
      of the series expansion
      <:imath< $(str: notation) = \sum_{n=0}^\infty u(n) $(symb: x)^n >>
      is bounded by
    >>
  and par2 =
    if <:bool< has($(tail_bound), 'piecewise') >> then
      <:par<
        <:dsymb< op(2,$(tail_bound)) >> for
        <:isymb< op([1,2],$(tail_bound)) >> larger than
        <:dsymb< op([1,1],$(tail_bound)) >> and by
        <:dsymb< op(3,$(tail_bound)) >> otherwise.
      >>
    else
      <:par<<:dmath< $(symb:tail_bound) . >>>> in
  DC.section (title ()) (par1 @@@ par2), ()

Generated by GNU Enscript 1.6.5.90.