\documentclass[12pt]{article}

\usepackage{moreverb,plain}
\def\verbatimtabsize{4\relax}
\def\listingoffset{1em}
\def\listinglabel#1{\llap{\tiny\it\the#1}\hskip\listingoffset\relax}
\def\mylisting#1{{\fontsize{10}{11}\selectfont\listinginput[1]{1}{#1}}}
\def\myoutput#1{{\fontsize{10}{11}\selectfont\verbatimtabinput{#1}}}

\begin{document}

\centerline{\bf Report about Homotopy Continuation}
\bigskip
I solved $f(x)=0$ with the homotopy 
$h(t,x)=tf(x)+(1-t)g(x)$
by integrating the differntial equation
\begin{plain}
$$\left\{\eqalign{
	x'(t)&=-{h_t(t,x)\over h_x(t,x)}\cr
	x(0)&=x_0\cr
}\right.$$
\end{plain}%
using Euler's method with stepsize $\Delta t=1/10$.

First, a Maple script computes the terms $h_t$ and $h_x$ appearing
in the differential equation.  In our test run we choose 
$$f(x)=\cos x-x,\qquad g(x)=f(x)-f(x_0)\qquad\hbox{and}\qquad x_0=1.$$
The script{\tt\ func.mpl }follows:

\mylisting{func.mpl}

The Maple script creates a file{\tt\ func.i }containing
the needed C subroutines for computing a solution to the 
differential equation.

\mylisting{func.i}

The program{\tt\ topy.c }includes the file{\tt\ func.i }and
then solves the differential equation using Euler's method.

\mylisting{topy.c}

\noindent
The resulting output 

\myoutput{x.dat}

\noindent
shows that a solution to $f(x)=0$ is $x\approx 0.7404$.

Output from{\tt\ topy.c }is stored in the 
file{\tt\ x.dat }and processed with Gnuplot to create the graph

\input{graph.tex}

\noindent
using the Gnuplot script

\mylisting{graph.plt}

\noindent
Note that all text output in{\tt\ x.dat }is preceded by 
a `\#' sign which Gnuplot treats as comments when processing
the data.

\end{document}
