Differentiation with a Computer


Table 1: Forward-difference approximations for $f(x)=e^x sin(x)$.
\begin{table}\begin{center}
\includegraphics[scale=0.9,angle=0.5]{figures/5.1.ps}
\end{center}
\end{table}


With MATLAB. Analytical answer to the function of Table 1.

\includegraphics[scale=1]{figures/5-5}

With MATLAB. Numerical answer to the function of Table 1.

\includegraphics[scale=1.2]{figures/5-6}

With MATLAB,

\includegraphics[scale=1.2]{figures/5-7}

Table 2 illustrates this, showing that errors decrease about four fold when $\Delta x$ is halved (as Eq. 3 predicts) and that a more accurate value is obtained.

Table 2: Central-difference approximations for $f(x)=e^x sin(x)$.
\begin{table}\begin{center}
\includegraphics[scale=1]{figures/5.2.ps}
\end{center}
\end{table}


Cem Ozdogan 2011-01-05