Commit 2cf4bfcc by Parameswaran Ajith

added the tutorial material - chapter 1.

parents
This diff is collapsed. Click to expand it.
File added
\documentclass[prd,preprintnumbers,eqsecnum,floatfix,letterpaper,nofootinbib]{revtex4}
\usepackage{color}
\usepackage{url}
\usepackage{calc}
\usepackage{amsmath,amssymb,graphicx}
\usepackage{amssymb,amsmath}
\usepackage{tensor}
\usepackage{bm}
\usepackage{times}
\usepackage[varg]{txfonts}
\usepackage[colorlinks, pdfborder={0 0 0}]{hyperref}
\definecolor{LinkColor}{rgb}{0.75, 0, 0}
\definecolor{CiteColor}{rgb}{0, 0.5, 0.5}
\definecolor{UrlColor}{rgb}{0, 0, 0.75}
\hypersetup{linkcolor=LinkColor}
\hypersetup{citecolor=CiteColor}
\hypersetup{urlcolor=UrlColor}
\maxdeadcycles=1000
\allowdisplaybreaks
\newcommand{\comment}[1]{\textcolor{red}{\textit{#1}}}
\newcommand{\checkthis}{\textcolor{magenta}{(CHECKTHIS)}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\boldeta}{\bm{\eta}}
\begin{document}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\ber}{\begin{eqnarray}}
\newcommand{\eer}{\end{eqnarray}}
\def\bea{\begin{eqnarray}}
\def\eea{\end{eqnarray}}
\newcommand{\etal}{\emph{et al.}}
\newcommand{\Sl}{S_\ell}
\newcommand{\Sigmal}{\Sigma_\ell}
\newcommand{\Flux}{\mathcal{F}}
\newcommand{\LNh}{\hat{\mathbf{L}}_N}
\newcommand{\LN}{\mathbf{L}_N}
\newcommand{\bS}{\mathbf{S}}
\newcommand{\bJ}{\mathbf{J}}
\newcommand{\e}{\mathrm{e}}
\newcommand{\rmi}{\mathrm{i}}
\newcommand{\flow}{f_\mathrm{low}}
\newcommand{\fcut}{f_\mathrm{cut}}
\newcommand{\bchi}{\bm{\chi}}
\newcommand{\blambda}{\bm{\lambda}}
\newcommand{\bLambda}{\bm{\Lambda}}
\newcommand{\bchia}{\bm{\chi}_a}
\newcommand{\bchis}{\bm{\chi}_s}
\newcommand{\chis}{\chi_s}
\newcommand{\chia}{\chi_a}
\newcommand{\chiadL}{\bchia \cdot \LNh}
\newcommand{\chisdL}{\bchis \cdot \LNh}
\newcommand{\chisSqr}{\bchis^2}
\newcommand{\chiaSqr}{\bchia^2}
\newcommand{\chisDchia}{\bchis \cdot \bchia}
\newcommand{\cA}{\mathcal{A}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cP}{\mathcal{P}}
\title{ICTS Graduate Course: Numerical Methods (PHY410.5)}
\author{P.~Ajith}\email{ajith@icts.res.in}
\author{Prayush Kumar}\email{prayush@icts.res.in}
\affiliation{International Centre for Theoretical Sciences, Tata Institute of Fundamental Research, Bangalore 560089, India.}
\bigskip
\date{\today}
\maketitle
\section{Numerical differentiation}
\input{diff.tex}
%\section{Lab 2}
%\input{rest.tex}
\bibliography{Lab}
\end{document}
#
# $Header: /numrelcvs/NumrelGWDA/docs/TemplBank/Makefile,v 1.4 2007/09/23 10:57:22 ajith Exp $
#
DOCS = Lab.pdf
BYPROD = Lab.ps Lab.blg
TEXS = Lab.tex
FIGS =
default: ${DOCS}
#Lab.pdf: Lab.ps
# ps2pdf Lab.ps Lab.pdf
#Lab.ps: Lab.dvi ${FIGS}
# dvips -t a4 -P pdf -o Lab.ps Lab.dvi
Lab.pdf: Lab.tex ${FIGS} ${TEXS}
# latex Lab && latex Lab && latex Lab && bibtex Lab
pdflatex Lab && bibtex Lab && bibtex Lab && pdflatex Lab && pdflatex Lab
Lab.ps: Lab.pdf ${FIGS}
pdftops Lab.pdf
%.pdf: %.eps
epstopdf --outfile=$@ ${@:.pdf=.eps}
clean:
rm -f *.aux *.log *.out *.dvi *~ ${DOCS} ${BYPROD}
copy:
cp Lab.pdf /Users/pajith/Sites/ICTS/P._Ajiths_Homepage/Teaching_files
publish:
/Users/pajith/Sites/ICTS/P._Ajiths_Homepage/updateweb.sh
\subsection{Finite differencing, convergence, error estimates}
We derived the following finite-differencing approximants for the derivative of a function $f(x)$:
\begin{eqnarray}
\mathit{Forward~differencing:} & f'(x) \simeq \frac{f(x+h)-f(x)}{h} + \mathcal{O}\,(h) \\
\mathit{Backward~differencing:} & f'(x) \simeq \frac{f(x)-f(x-h)}{h} + \mathcal{O}\,(h) \\
\mathit{Central~differencing:} & f'(x) \simeq \frac{f(x+h)-f(x-h)}{2h} + \mathcal{O}\,(h^2)
\end{eqnarray}
\subsubsection*{Problems:}
\begin{enumerate}
\item Write a Python function to compute derivatives using these three finite differencing methods. Compute the derivative of the function $f(x) = e^x \, \sin(x)$ over the range $x = [0, 2\pi]$. Plot the numerically computed derivative $f_{(h)}'(x)$ for three different values of $h$.
\item Plot the error $\Delta f_{h}'(x) := |f_{h}'(x) - f'(x)|$ for three different values of $h$, and estimate the order of convergence $n$ of each finite-difference approximation. Plot $n(x)$, where
\begin{equation}
n(x) = \log_2 \frac{f'_{4h}(x) - f'_{2h}(x)}{f'_{2h}(x) - f'_{h}(x)}
\label{eq:order_convg}
\end{equation}
\item Reduce the step size $h$ successively. At what value of $h$ does the round-off error dominate the error budget?
%\item Derive a central differencing approximant for the first derivative $f'(x)$ that is accurate to $\mathcal{O}(h^4)$.
\end{enumerate}
\subsection{Richardson extrapolation}
We have seen that, if the order of the error in the numerical estimate of a function $f(x)$ is known, Richardson extrapolation provides a powerful way of improving the accuracy of the estimate. If we have two numerical estimates $f_{h}(x)$ and $f_{2h}(x)$ each having an error of $\mathcal{O}\,h^k$, a better estimate is given by
\begin{equation}
f(x) \simeq \frac{2 ~ 2^k\, f_{h}(x) - f_{2h}(x)}{2\,2^k -1 } + \mathcal{O}\,(h^{l}),
\end{equation}
where $l$ is the next-to-leading-order error term (for e.g., $l = k+2$ for central differencing, while $l = k+1$ for forward/backward differencing).
\subsubsection*{Problems:}
\label{sec:BBH_nr_data_fd}
\begin{enumerate}
\item Gravitational-waves (GWs) have two independent polarization states -- called ``plus'' and ``cross'' states. GW signals from the coalescence of black-hole binaries, in the simplest case, are circularly polarized:
\begin{eqnarray}
h_+(t) & = A(t) \, \cos \varphi(t), ~~~ h_\times(t) & = A(t) \, \sin \varphi(t).
\end{eqnarray}
Download the data file~\cite{nrdata} containing $h_+(t)$ and $h_\times(t)$. (This is the reduced form of the data produced by a numerical-relativity simulation of black-hole binaries performed by the SXS collaboration and is publicly available at~\cite{SXScatalog}). Compute the phase evolution $\varphi(t)$, the frequency evolution $\omega(t) := d\varphi(t)/dt$ and the rate of change of frequency $\dot{\omega}(t) := d\omega(t)/dt$ using second-order central difference approximation.
\item Estimate the order of convergence of the numerical computation of $\omega(t)$ and $\dot{\omega}(t)$.
\item Perform an extrapolation of $\omega(t)$ and $\dot{\omega}(t)$ to the next order using estimates of two different time-resolutions.
\item Derive an explicit expression for $f'(x)$ with error $\mathcal{O}(h^4)$ using Richardson extrapolation. This is the fourth-order finite differencing approximant for the derivative, which we will use later.
\end{enumerate}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment