\documentclass[10pt,a4paper]{article}

\usepackage[margin=2cm]{geometry}

\usepackage{enumitem}
\setenumerate[1]{label=\arabic*.}
\setenumerate[2]{label=(\alph*)}

% textcomp package is not available everywhere, and we only need the Copyright symbol
% taken from http://tex.stackexchange.com/a/1677/23992
\DeclareTextCommandDefault{\textregistered}{\textcircled{\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}

\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead{}
\fancyfoot[C]{Copyright {\textcopyright} 2015 Camil Staps}
\pagestyle{fancy}

\usepackage{amsmath}
\usepackage{amsfonts}

\parindent0pt

\title{Calculus en Kansrekenen - assignment 2}
\author{Camil Staps\\\small{s4498062, group Bram}}

\begin{document}

\maketitle
\thispagestyle{fancy}

\begin{enumerate}
    \item \begin{enumerate}
            \item $$\lim\limits_{x\to-\infty}\frac{x^3+2x^2+2}{3x^3+x+4} = \lim\limits_{x\to-\infty}\frac{1+\frac2x+\frac2{x^3}}{3+\frac1x+\frac4{x^3}} = \frac13.$$
            \item $$\lim\limits_{x\to\infty}\frac{3x^2+8}{x+1}=\frac{3x+\frac8x}{1+\frac1x}=\lim\limits_{x\to\infty}3x+\frac8x=\lim\limits_{x\to\infty}3x=\infty.$$
            \item $$\lim\limits_{x\to\infty}\frac{2x+1}{x^2+x}=\lim\limits_{x\to\infty}\frac{\frac2x+\frac1{x^2}}{1+\frac1x}=\frac01=0.$$
            \item \begin{align*}
                        & \lim\limits_{x\to a}\frac{x^n-a^n}{x-a}\\
                    = & \lim\limits_{a+h\to a}\frac{(a+h)^n-a^n}{a+h-a}\qquad\text{with $h=x-a$}\\
                    = & \lim\limits_{h\to0}\frac{(a+h)^n - a^n}{h}\\
                    = & \left(a^n\right)'\\
                    = & n\cdot a^{n-1}.
                \end{align*}
        \end{enumerate}

    \item \begin{enumerate}
            \item $$f'(2) = \lim\limits_{h\to0}\frac{f(2+h)-f(2)}{h}=\lim\limits_{h\to0}\frac0h=0.$$
            \item $$f'(x) = \lim\limits_{h\to0}\frac{f(x+h)-f(x)}{h} = \lim\limits_{h\to0}\frac{2(x+h)+3-(2x+3)}{h} = \lim\limits_{h\to0}2 = 2.$$
            \item $$f'(3) = \lim\limits_{h\to0}\frac{f(3+h)-f(3)}{h} = \lim\limits_{h\to0}\frac{h^2+6h+9+6+2h+1-(9+6+1)}{h} = \lim\limits_{h\to0}h+8=8.$$
            \item \begin{align*}
                    f'(x) &= \lim\limits_{h\to0}\frac{f(x+h)-f(x)}{h}\\
                          &= \lim\limits_{h\to0}\frac{\frac{5(x+h)-7}{4(x+h)+3} - \frac{5x-7}{4x+3}}{h}\\
                          &= \lim\limits_{h\to0}\frac{\frac{43h}{(4x+4h+3)(4x+3)}}{h}\\
                          &= \lim\limits_{h\to0}\frac{43}{(4x+4h+3)(4x+3)}\\
                          &= \frac{43}{(4x+3)^2}.
                \end{align*}
        \end{enumerate}

    \item \begin{enumerate}
            \item We rewrite this to something of the form $y=ax+b$:
                
                \begin{align*}
                    4y - x + 2(1-\ln2) &= 0\\
                    4y &= x - 2(1-\ln2)\\
                    y &= \frac14x - \frac12(1-\ln2)
                \end{align*}

                For a line $y=ax+b$, $a$ is the slope, so in this case we have the slope $\frac14$.

            \item We equate $f(x)$ and $y$ for $x=2$:

                \begin{align*}
                    \frac14\cdot2 - \frac12(1-\ln2) &= a\ln2 \\
                    \frac12\ln2 &= a\ln2 \\
                    a &= \frac12.
                \end{align*}

            \item For the slope we take the derivative of $f$, i.e. $f'(x) = \frac ax = \frac12a$.

                Then as intercept we take $f(2)-2\cdot f'(2) = a\ln2 - 2\cdot\frac a2 = a\ln2-a$.
                
                The tangent line is then $y=\frac12ax+a\ln2-a$.
        \end{enumerate}

    \item \begin{enumerate}
            \item Using basic rules, $f'(x) = 4x^3-6x^2$.
            \item Using the division rule, $f'(x) = \frac{(x-7)(2x)-(x^2+5)(1)}{(x-7)^2} = \frac{x^2-14x-5}{x-7}$.
            \item Using the product rule, \begin{align*}
                    f'(x) &= \left(\sin{\sqrt x}\cdot\sin{\sqrt x}\right) \\
                          &= 2\cdot\sin\sqrt x\cdot\left(\sin\sqrt x\right)' \\
                          &= 2\cdot\sin\sqrt x\cdot\cos\sqrt x\cdot\frac12\cdot x^{-\frac12} \\
                          &= \frac12\sin\left(2\sqrt x\right)\cdot\frac1{\sqrt x} \\
                          &= \frac{\sin\left(2\sqrt x\right)}{2\sqrt x}.
                \end{align*}
            \item We have $f(x) = 1-\cos^2\left(\sqrt x\right) = \sin^2\left(\sqrt x\right)$, so this is the same as 4c.
            \item Using the chain rule, $f'(x) = \left(e^{\tan x}\right)' = e^{\tan x}\cdot\tan'x = \frac{e^{\tan x}}{\cos^2x}$.
            \item Using the chain rule, $f'(x) = -\frac1{\cos x}\cdot-\sin x=\tan x$.
            \item Using the chain rule, \begin{align*}
                    f'(x) &= \frac1{\sqrt{1-(1-2x)^2}}\cdot-2 \\
                          &= -\frac2{\sqrt{-4x^2+4x}} \\
                          &= -\frac2{2\sqrt{-x^2+x}} \\
                          &= -\left(-x^2+x\right)^{-\frac12}.
                \end{align*}
            \item Using the chain rule, $f'(x) = 10^{x^2}\cdot\ln10\cdot2x$.
        \end{enumerate}

    \item \begin{enumerate}
            \item Using the chain rule, $f'(x) = e^{\sin x}\cdot\cos x$.
            \item Using logarithmic differentiation:

                \begin{align*}
                    f(x)        &= \left(e^x\right)^{e^x} \\
                    \ln(f(x))   &= \ln\left(\left(e^x\right)^{e^x}\right) = e^x\cdot x \\
                    \frac{f'(x)}{f(x)} &= e^x + x\cdot e^x = (x+1)\cdot e^x \qquad\text{(product rule)}\\
                    f'(x)       &= f(x) \cdot (x+1)\cdot e^x \\
                                &= \left(e^x\right)^{e^x+1}\cdot(x+1).
                \end{align*}
            \item First we rewrite in order to get the inverse:

                \begin{align*}
                    y       &= e^{2x} \\
                    \ln y   &= 2x \\
                    x       &= \frac{\ln y}2 \\
                    f^{-1}(x) &= \frac12\ln x.
                \end{align*}

                Next, we find the derivative as $\left(f^{-1}\right)'(x) = \frac12\cdot\frac1x=\frac1{2x}$.

            \item Again, we first find the inverse:

                \begin{align*}
                    y           &= \sqrt{x-2} \\
                    y^2         &= x-2 \\
                    y^2 + 2     &= x \\
                    f^{-1}(x)   &= x^2 + 2.
                \end{align*}

                Then it's easy to see $\left(f^{-1}\right)'(x) = 2x$.
        \end{enumerate}
\end{enumerate}

\end{document}

