Differentiation with a Computer


Table 7.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 7.1.

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

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

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

With MATLAB,

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

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

Table 7.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-12-27