diff --git a/.gitignore b/.gitignore index 782e63a..b413e92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Latex build files *.aux +*.auxlock *.fdb_latexmk *.fls *.log diff --git a/Exercise 5/figures/1a.tex b/Exercise 5/figures/1a.tex new file mode 100644 index 0000000..252f3ff --- /dev/null +++ b/Exercise 5/figures/1a.tex @@ -0,0 +1,20 @@ +\begin{tikzpicture} + \begin{axis}[ + xlabel = $x$, ylabel = $y$, + width = 10cm, height=6cm, + axis lines = middle, + grid, + xmin=-1.5, xmax=5.5, + ymin=-1.5, ymax=1.5, + legend pos=outer north east, + samples=10000 + ] + + \addplot+ [ + no marks, + domain = 0:5.5, + ]{sin(deg(sqrt(x) * (e^(x))))}; + \addlegendentry{$y=sin(\sqrt{x}e^x)$} + + \end{axis} +\end{tikzpicture} \ No newline at end of file diff --git a/Exercise 5/figures/1b.tex b/Exercise 5/figures/1b.tex new file mode 100644 index 0000000..db56d68 --- /dev/null +++ b/Exercise 5/figures/1b.tex @@ -0,0 +1,38 @@ +\begin{tikzpicture} [ + % declare function={ + % func(\x)= (\x >= -3) * (\x^2) + + % and(\x < -3) * (-\x); + % } +] + \begin{axis}[ + xlabel = $x$, ylabel = $y$, + width = 10cm, height=10cm, + axis lines = middle, + grid, + xmin=-9, xmax=5, + ymin=-7, ymax=7, + legend pos=outer north east, + legend style={cells={align=left}} + ] + + \addplot [ + blue, + no marks, + domain= -3:100 + ]{2*x}; + \addplot [ + blue, + no marks, + domain= -100:-3 + ]{-x}; + + \addplot+[blue,mark=*,mark options={fill=white}] (-3,3); + \addplot+[blue,mark=*] (-3,-6); + + \addlegendentry{$g(x) = \begin{cases} + 2x\text{, hvis } x \geq -3 \\ + -x \text{, hvis } x < -3 + \end{cases}$ \\} + + \end{axis} +\end{tikzpicture} \ No newline at end of file diff --git a/Exercise 5/main.pdf b/Exercise 5/main.pdf new file mode 100644 index 0000000..edae25e Binary files /dev/null and b/Exercise 5/main.pdf differ diff --git a/Exercise 5/main.tex b/Exercise 5/main.tex new file mode 100644 index 0000000..c040d5a --- /dev/null +++ b/Exercise 5/main.tex @@ -0,0 +1,43 @@ +\documentclass{article} + +\input{../lib/lib.tex} + +\usepackage{amssymb} + +\begin{document} + + \thispagestyle{plain} + \tittel + \tableofcontents + + \newpage + + \section{Forberedende oppgaver} + \begin{oppgaver} + + \oppg + \input{tasks/1.tex} + + \end{oppgaver} + + \newpage + + \section{Innleveringsoppgaver} + \begin{oppgaver} + \setoppg{1} + + \oppg + \input{tasks/2.tex} + + \oppg + \input{tasks/3.tex} + + \oppg + \input{tasks/4.tex} + + \oppg + \input{tasks/5.tex} + + \end{oppgaver} + +\end{document} \ No newline at end of file diff --git a/Exercise 5/tasks/1.tex b/Exercise 5/tasks/1.tex new file mode 100644 index 0000000..fe11305 --- /dev/null +++ b/Exercise 5/tasks/1.tex @@ -0,0 +1,20 @@ +\begin{deloppgaver} + \delo + \[f(x) = sin(\sqrt{x}e^x)\] + er kontinuerlig for alle punkt hvor den er definert + + \begin{graphbox} + \input{figures/1a.tex} + \end{graphbox} + + \delo + \[g(x) = \begin{cases} + 2x\text{, hvis } x \geq -3 \\ + -x \text{, hvis } x < -3 + \end{cases}\] + er ikke kontinuerlig ved $x = -3$, hvor $y$-verdien gjør et hopp fra $3$ til $-6$ + + \begin{graphbox} + \input{figures/1b.tex} + \end{graphbox} +\end{deloppgaver} \ No newline at end of file diff --git a/Exercise 5/tasks/2.tex b/Exercise 5/tasks/2.tex new file mode 100644 index 0000000..72d3aad --- /dev/null +++ b/Exercise 5/tasks/2.tex @@ -0,0 +1,22 @@ +\begin{align*} + \lim_{n\to\infty} a_n &= \lim_{n\to\infty} \frac{\sqrt{n^2+6n+9}}{\sqrt{n^2+1}} \\[1ex] + \lim_{n\to\infty} a_n &= \lim_{n\to\infty} \sqrt{\frac{n^2+6n+9}{n^2+1}} \\ +\end{align*} + +Ettersom $\lim\limits_{n\to\infty} (a_n b_n) = (\lim\limits_{n\to\infty} a_n)(\lim\limits_{n\to\infty}b_n)$ + +\[\lim_{n\to\infty} a_n = \sqrt{ \lim_{n\to\infty} \frac{n^2+6n+9}{n^2+1}} \] + +Ettersom $\lim\limits_{n\to\infty} \frac{a_n}{b_n}= \frac{\lim\limits_{n\to\infty} a_n}{\lim\limits_{n\to\infty}b_n}$ \\ +I tillegg deler vi både teller og nevner på $n^2$ + + +\[ \lim_{n\to\infty} a_n = \sqrt{ \frac{ \lim_{n\to\infty} 1+\frac{6}{n}+\frac{9}{n^2}}{ \lim_{n\to\infty} 1+\frac{1}{n^2}}} \] + +Både $\frac{9}{n^2}$, $\frac{6}{n}$ og $\frac{1}{n^2}$ går mot $0$ når $n \to \infty$ + +\begin{align*} + \lim_{n\to\infty} a_n &= \sqrt{ \frac{ 1+0+0}{ 0+1}} \\ + &= \sqrt{1} \\ + &= 1 \\ +\end{align*} \ No newline at end of file diff --git a/Exercise 5/tasks/3.tex b/Exercise 5/tasks/3.tex new file mode 100644 index 0000000..9f02491 --- /dev/null +++ b/Exercise 5/tasks/3.tex @@ -0,0 +1,19 @@ +\begin{align*} + \lim_{n\to\infty} a_n &= \lim_{n\to\infty} \left(\sqrt{n^2-n+9} - \sqrt{n^2+9}\right) \\[1ex] + &= \lim_{n\to\infty} \left(\sqrt{n^2-n+9} - \sqrt{n^2+9}\right) + \frac{\sqrt{n^2-n+9} + \sqrt{n^2+9}}{\sqrt{n^2-n+9} + \sqrt{n^2+9}} \\[1ex] + &= \lim_{n\to\infty} \frac{(n^2-n+9) - (n^2+9)}{\sqrt{n^2-n+9} + \sqrt{n^2+9}} \\[1ex] + &= \lim_{n\to\infty} \frac{-n}{\sqrt{n^2-n+9} + \sqrt{n^2+9}} \\[1ex] + &= -\lim_{n\to\infty} \frac{n}{\sqrt{n^2-n+9} + \sqrt{n^2+9}} \\[1ex] + &= -\lim_{n\to\infty} \frac{1}{n^{-1}\sqrt{n^2-n+9} + n^{-1}\sqrt{n^2+9}} \\[1ex] + &= -\lim_{n\to\infty} \frac{1}{\sqrt{n^{-2}(n^2-n+9)} + \sqrt{n^{-2}(n^2+9)}} \\[1ex] + &= -\lim_{n\to\infty} \frac{1}{\sqrt{1-\frac{1}{n}+\frac{9}{n^2}} + \sqrt{1+\frac{9}{n^2}}} \\[1ex] +\end{align*} + +Dermed blir + +\begin{align*} + -\lim_{n\to\infty} \frac{1}{\sqrt{1-\frac{1}{n}+\frac{9}{n^2}} + \sqrt{1+\frac{9}{n^2}}} &= -\frac{1}{\sqrt{1-0+0} + \sqrt{1+0}} \\ + &= -\frac{1}{1 + 1} \\ + &= -\frac{1}{2} \\ +\end{align*} diff --git a/Exercise 5/tasks/4.tex b/Exercise 5/tasks/4.tex new file mode 100644 index 0000000..bf279a1 --- /dev/null +++ b/Exercise 5/tasks/4.tex @@ -0,0 +1,13 @@ +\[ a_{k+1} = 2-\frac{1}{a_k} \] + +Fikspunktet vil være punktet hvor $a_{k+1} = a_k$ + +\begin{align*} + a &= 2 - \frac{1}{a} \\ + a - 2 &= - \frac{1}{a} \\ + a^2 -2a &= - 1 \\ + a^2 -2a + 1 &= 0 \\ + (a-1)^2 &= 0 \quad \Leftrightarrow \quad a = 1 +\end{align*} + +$a$ har ett fikspunkt ved $a = 1$ \ No newline at end of file diff --git a/Exercise 5/tasks/5.tex b/Exercise 5/tasks/5.tex new file mode 100644 index 0000000..fbff1d4 --- /dev/null +++ b/Exercise 5/tasks/5.tex @@ -0,0 +1,27 @@ +\[ + \begin{cases} + b_0 = 1 \\ + b_1 = 2 \\ + b_{n+1} = b_n + 2 \cdot b_{n-1} + \end{cases} +\] + + +\begin{align*} + b_2 &= b_1 + 2 \cdot b_{0} = 2 + 2 \cdot 1 = 4 \\ + b_3 &= b_2 + 2 \cdot b_{1} = 4 + 2 \cdot 2 = 8 \\ + b_4 &= b_3 + 2 \cdot b_{2} = 8 + 2 \cdot 4 = 16 \\ + b_5 &= b_4 + 2 \cdot b_{3} = 16 + 2 \cdot 8 = 32 \\ + b_6 &= b_5 + 2 \cdot b_{4} = 32 + 2 \cdot 16 = 64 \\ + b_7 &= b_6 + 2 \cdot b_{5} = 64 + 2 \cdot 32 = 128 +\end{align*} + +Jeg gjetter at $f(n) = 2^n$. + +\begin{align*} + b_n + 2 \cdot b_{n-1} &= 2^n + 2 \cdot 2^{n-1} \\ + &= 2^n + 2^n \\ + &= 2 \cdot 2^{n} \\ + &= 2^{n+1} \\ + &= b_{n+1} +\end{align*} \ No newline at end of file diff --git a/lib/lib.tex b/lib/lib.tex index 1a0f8e5..e798f0d 100644 --- a/lib/lib.tex +++ b/lib/lib.tex @@ -26,7 +26,7 @@ \pgfplotsset{compat=newest} \author{Øystein Tveit} -\title{MA0001 Øving 4} +\title{MA0001 Øving 5} \input{../lib/titling.tex}