Menu

[r4493]: / trunk / py4science / workbook / wallis_pi.lyx  Maximize  Restore  History

Download this file

138 lines (99 with data), 2.3 kB

#LyX 1.4.3 created this file. For more info see http://www.lyx.org/
\lyxformat 245
\begin_document
\begin_header
\textclass amsbook
\begin_preamble
\input{preamble.tex}
\end_preamble
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize default
\use_geometry true
\use_amsmath 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\leftmargin 1.3in
\topmargin 1in
\rightmargin 1.3in
\bottommargin 1in
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\end_header

\begin_body

\begin_layout Section
Wallis' slow road to 
\begin_inset Formula $\pi$
\end_inset


\end_layout

\begin_layout Standard
Wallis' formula is an infinite product that converges (slowly) to 
\begin_inset Formula $\pi$
\end_inset

:
\begin_inset Formula \begin{equation}
\pi=\prod_{i=1}^{\infty}\frac{4i^{2}}{4i^{2}-1}.\end{equation}

\end_inset


\end_layout

\begin_layout Standard
The listing\InsetSpace ~

\begin_inset LatexCommand \ref{code:wallis_pi_skel}

\end_inset

 contains a skeleton with no implementation but with some plotting commands
 already inserted, so that you can visualize the convergence rate of this
 formula as more terms are kept.
\end_layout

\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Standard


\backslash
lstinputlisting[label=code:wallis_pi_skel,caption={IGNORED}]{skel/wallis_pi_skel.
py}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
After running the script successfully, you should obtain a plot similar
 to Figure\InsetSpace ~

\begin_inset LatexCommand \ref{fig:wallis_pi}

\end_inset

.
\end_layout

\begin_layout Standard
\align center
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Standard
\align center
\begin_inset Graphics
	filename fig/wallis_pi_convergence.eps
	width 4in

\end_inset


\end_layout

\begin_layout Caption
\begin_inset LatexCommand \label{fig:wallis_pi}

\end_inset

Convergence rate for Wallis' infinite product approximation to 
\begin_inset Formula $\pi.$
\end_inset


\end_layout

\end_inset


\end_layout

\end_body
\end_document
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.