Loading [MathJax]/extensions/TeX/newcommand.js
Prev Next

\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} } This is cppad-20221105 documentation. Here is a link to its current documentation .
AD Theory for Solving ODE's Using Taylor's Method

Problem
We are given an initial value problem for y : \B{R} \rightarrow \B{R}^n ; i.e., we know y(0) \in \B{R}^n and we know a function g : \B{R}^n \rightarrow \B{R}^n such that y^1 (t) = g[ y(t) ] where y^k (t) is the k-th derivative of y(t) .

z(t)
We define the function z : \B{R} \rightarrow \B{R}^n by z(t) = g[ y(t) ] . Given the Taylor coefficients y^{(k)} (t) for k = 0 , \ldots , p , we can compute z^{(p)} (t) using forward mode AD on the function g(y) ; see forward_order . It follows from y^1 (t) = z(t) that y^{p+1} (t) = z^p (t) y^{(p+1)} (t) = z^{(p)} (t) / (k + 1) where y^{(k)} (t) is the k-th order Taylor coefficient for y(t) ; i.e., y^k (t) / k ! . Starting with the known value y^{(0)} (t) , this gives a prescription for computing y^{(k)} (t) for any k .

Taylor's Method
The p-th order Taylor method for approximates y( t + \Delta t ) \approx y^{(0)} (t) + y^{(1)} (t) \Delta t + \cdots + y^{(p)} (t) \Delta t^p

Example
The file taylor_ode.cpp contains an example and test of this method.
Input File: omh/theory/taylor_ode.omh