Prev Next ipopt_cppad_ode_forward

An ODE Forward Problem Example

Problem
We consider the following ordinary differential equation:  \[
\begin{array}{rcl}
     \partial_t y_0 ( t , a ) & = & - a_1 * y_0 (t, a )  
     \\
     \partial_t y_1 (t , a ) & = & + a_1 * y_0 (t, a ) - a_2 * y_1 (t, a )
\end{array}
\] 
with the initial conditions  \[
y_0 (0 , a) = F(a) = \left( \begin{array}{c} a_0 \\ 0 \end{array} \right) 
\] 
where  a \in \R^3  is an unknown parameter vector and  F : \R^3 \rightarrow \R^2  is defined by the equation above. Our forward problem is stated as follows: Given  a \in \R^3 determine the value of  y ( t , a )  for various values of  t  .

Numerical Procedure
Our numerical procedure for solving the forward problem starts with  \[
     y^0 = y(0, a) = \left( \begin{array}{c} a_0 \\ 0 \end{array} \right)
\] 
Given an approximation value  y^M  for  y ( s_M , a ) , the a trapezoidal method approximates  y ( s_{M+1} , a ) (denoted by  y^{M+1} ) by solving the equation  \[
y^{M+1}  =  y^M + 
\left[ G( y^M , a ) + G( y^{M+1} , a ) \right] * \frac{s_{M+1} - s_M }{ 2 }
\] 
where  G : \R^2 \times \R^3 \rightarrow \R^2 is the function representing this ODE; i.e.  \[
     G(y, a) = \left(  \begin{array}{c}
          - a_1 * y_0
          \\
          + a_1 * y_0 - a_2 * y_1
     \end{array} \right)
\] 
This  G(y, a) is linear with respect to  y , hence the implicit equation defining  y^{M+1}  can be solved inverting the a set of linear equations. In the general case, where  G(y, a) is non-linear with respect to  y , an iterative procedure is used to calculate  y^{M+1} from  y^M .
Input File: omh/ipopt_cppad_ode2.omh