Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Carson Witt

2061 views
1
%%%%%%
2
%
3
% PROJECT 5
4
%
5
% filename: p5_irrational_numbers.tex
6
% last modified: 2017-3-15
7
%
8
%%%%%%%
9
%
10
%
11
%%%%%%%
12
13
\documentclass
14
[justified,nohyper]
15
{tufte-handout}
16
17
\usepackage{amsmath}
18
19
\usepackage{booktabs}
20
\usepackage{graphicx}
21
\usepackage{kmath,kerkis} % The order of the packages matters; kmath changes the default text font
22
\usepackage[T1]{fontenc}
23
24
\usepackage{enumitem}
25
\usepackage{url}
26
27
\usepackage{listings}
28
\usepackage{color}
29
30
31
% USEFUL SHORTCUTS FOR MATH
32
\newcommand{\ds}{\displaystyle}
33
34
\newcommand{\dt}[1]{\dfrac{d#1}{dt}}
35
36
\newcommand{\lp}{\left(}
37
\newcommand{\rp}{\right)}
38
\newcommand{\lb}{\left[}
39
\newcommand{\rb}{\right]}
40
41
\newcommand{\evalat}{\biggr\rvert}
42
43
\begin{document}
44
\begin{fullwidth}
45
\mbox{\LARGE PreCalculus BC: Project Five - \today }\hfill
46
\end{fullwidth}
47
\section*{Introduction}
48
Irrational numbers are numbers that cannot be expressed as a ratio of two
49
integers. Examples that you are probably familiar with are $e$ and $\pi$. Both
50
of these numbers play important roles in mathematics. $e$ is an important constant
51
that is related to growth and $\pi$ is useful when dealing with circles.
52
53
What you probably don't know about irrational numbers is that they can be
54
expressed as \textit{continued fractions}. In this project you will investigate
55
three irrational numbers: $e$, $\pi$, and $\sqrt{2}$. Our first task will be
56
to establish that these numbers are irrational (which actually turns out to be
57
a tricky thing to do). After we establish that $\sqrt{2}$ is irrational, we
58
will research the idea of a continued fraction and use the idea to develop
59
representations for our three irrational numbers. Our third task will be to
60
produce an algorithm that can approximate the three numbers to any number
61
of decimals. For this part of the project, we will be using Python and SAGE
62
to write some code that will be incorporated in your report.
63
64
\section*{Proving that a number is irrational}
65
For this part of the project, you will provide an explanation of why $\sqrt{2}$
66
is irrational. I'm only asking that you do a bit of research into the proof
67
and then provide your own explanation. I'm not asking that you come up with a
68
unique proof -- that would be difficult to do.
69
70
The easiest proof available is proof by contradiction where we assume that
71
$\sqrt{2}$ is rational and then derive a contradiction. This is exactly what
72
I'm asking that you research and explain in your paper. Sources do not need
73
to be cited.
74
75
\section*{Researching a repeated fraction}
76
I suggest that you start with this excellent YouTube video produced by Mathologer.
77
The video provides a nice introduction to the idea of continued fractions and
78
many examples are provided. As a further hint for this project, this particular
79
YouTube channel actually has many other videos that you may find helpful.
80
81
\url{https://youtu.be/CaasbfdJdJg}
82
83
It might help to watch the video several times and try and work through the
84
examples yourself.
85
86
\section*{An Algorithm for Approximating Irrational Numbers}
87
This should be where the majority of your work takes place. What we are looking
88
for is an algorithm implemented as a function in SAGE/Python that takes as
89
input the number of decimals requested and outputs the irrational number.
90
91
For example, if I passed in the number 4, the function would return $3.1416$ for
92
$\pi$. Please note: you can write functions for all three irrational numbers,
93
but the report only requires that you choose one.
94
95
You can choose between $e$, $\pi$, or $\sqrt{2}$ for your irrational number.
96
Your code should be included in your project report using the listings package.
97
For this, you will need to add two lines to the preamble of you tex source
98
file.
99
100
\begin{lstlisting}
101
\usepackage{listings}
102
\usepackage{color}
103
\end{lstlisting}
104
105
Once you import those two packages, you can use the \verb|lstlisting| environment
106
to paste in your code. It will also help if you pass in two optional parameters
107
that specify you are using the Python programming language. This will let
108
\LaTeX\, highlight and color-code your source. I have included a simple
109
example of that below.
110
111
\begin{lstlisting}[language=Python, caption=Python example]
112
def myFunction(number):
113
# computations go here....
114
return theAnswer
115
\end{lstlisting}
116
117
All that I need to see is the function you have written that returns back the
118
decimal answer.
119
120
You are welcome to copy any code you find on the Internet, as long as it does
121
what you need it to do and that you have either commented the code to explain it,
122
or included your own comments in paragraph form somewhere in your report. Please
123
do not copy code that you don't understand.
124
125
\section*{What I will be looking for in your report}
126
127
\begin{itemize}
128
\item You have provided an appropriate introduction for the report.
129
\item You have included a proof for the irrationality of $\sqrt{2}$.
130
\item An explanation of continued fractions is included and you have used
131
continued fractions to express $e$, $\pi$, and $\sqrt{2}$. For this part,
132
I'm expecting that you display these continued fractions in an elegant way.
133
Searching for \verb|latex continued fraction| should help you to find the
134
required code.
135
\item You have working Python code that computes $n$ digits of one of the
136
three irrational numbers: $e$, $\pi$, or $\sqrt{2}$.
137
\item You have used the \verb|lstlisting| environment correctly in your
138
tex source file.
139
\end{itemize}
140
141
\end{document}
142
143
144