Skip to content

Commit

Permalink
Now as example
Browse files Browse the repository at this point in the history
Based on the reformulation of "over-optimize", this has become more of a typical example than a non-normative explanation.
  • Loading branch information
henrikt-ma committed Mar 1, 2021
1 parent e94706b commit 56c4a89
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1183,10 +1183,10 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
\begin{nonnormative}
This means that the most restrictive derivatives should be written first.
\end{nonnormative}
\begin{nonnormative}
A straightforward way of explaining a valid derivative is given by this model.
The function value, \lstinline!x1!, should up to numerical precision match the integral of the derivative, \lstinline!x2!.
Note that tools are not required to use the provided derivative, and might solve the equations completely without numeric integration.

\begin{example}
The following model illustrates the requirement that a provided derivative must be valid.
That \lstinline!fder! is a valid derivative of \lstinline!f! means that it can be used safely to compute \lstinline!x2! by numeric integration: the function value, \lstinline!x1!, will up to numerical precision be matched by the integral of the derivative, \lstinline!x2!.
\begin{lstlisting}[language=modelica]
function f
input Real x;
Expand All @@ -1205,7 +1205,8 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
x2=x1;
end M;
\end{lstlisting}
\end{nonnormative}
Note that tools are not required to use the provided derivative, and might solve the equations completely without numeric integration.
\end{example}

\begin{example}
Use of \lstinline!order! to specify a second order derivative:
Expand Down

0 comments on commit 56c4a89

Please sign in to comment.