a programming and math blog.

Thursday, April 3, 2014

Limit laws reference

12:45 PM Posted by Daniel Pendergast , No comments
Here is a (non-exhaustive) list of the limit laws.

Basic laws

$\lim\limits_{x\to a} c = c$  where $c$ is a constant

$\lim\limits_{x\to a} x = a$

Addition law

$\lim\limits_{x\to a} (f(x) + g(x)) = \lim\limits_{x\to a} f(x) + \lim\limits_{x\to a} g(x)$

Provided $\lim\limits_{x\to a} f(x)$ and $\lim\limits_{x\to a} g(x)$ exist.

Subtraction law

$\lim\limits_{x\to a} (f(x) - g(x)) = \lim\limits_{x\to a} f(x) - \lim\limits_{x\to a} g(x)$

Provided $\lim\limits_{x\to a} f(x)$ and $\lim\limits_{x\to a} g(x)$ exist.

Multiplication law

$\lim\limits_{x\to a} (f(x) \cdot g(x)) = \lim\limits_{x\to a} f(x) \cdot \lim\limits_{x\to a} g(x)$

Provided $\lim\limits_{x\to a} f(x)$ and $\lim\limits_{x\to a} g(x)$ exist.

Division law

$\lim\limits_{x\to a} \frac{f(x)}{g(x)} = \frac{\lim\limits_{x\to a} f(x)}{\lim\limits_{x\to a} g(x)}$

Provided $\lim\limits_{x\to a} f(x)$ and $\lim\limits_{x\to a} g(x)$ exist and $\lim\limits_{x\to a} g(x) \neq 0$

Power law

$\lim\limits_{x\to a} (f(x))^n = \left( \lim\limits_{x\to a} f(x)) \right)^n$

Provided $\lim\limits_{x\to a} f(x)$ exists and $n$ is an integer.

l'Hôpital's Rule


If $\lim\limits_{x\to a} f(x)$ and $\lim\limits_{x\to a} g(x) = 0$ or $\pm \infty$

Wednesday, March 19, 2014

Introduction to derivatives

7:49 PM Posted by Daniel Pendergast , No comments


Derivatives are functions that are (as you can assume) derived from other functions. Derivatives tell you the slope (a.k.a. rate of change) of a function at a given point.

For example, assume we have a function $f(x)=\frac{x^3}{3}$:

 The derivative of this function is $f'(x)=x^2$. Notice the $'$ after the $f$. This is one of the ways you can denote a derivative. It's read 'f prime of x'.

We can graph the derivative on top of $f(x)$ to get an idea of what is going on:

If we compute $f'(1)$ we see get the result of $1$. This means that the slope at $f(1)=1$. You can easily tell if the slope is $1$ if it appears to make a $45^\circ$ turn from either positive axis. Likewise, $f'(1)=-1$, therefore, the slope at $f(-1)$ is -1.

You can compute $f'(x)$ for any $x$ in the domain of $f$.


The simplest definition of a derivative involves computing a limit.

Imagine that we want to get the tangent line of the curve $f(x)=\frac{x^3}{3}$ at $x=1$. We could start by making an approximation by drawing a line through two points on the curve. those points are at a distance $h$ on the x-axis.

If we would infinitely keep making $h$ smaller, we would eventually get the tangent line at the point $x=1$. If we can get the slope of the tangent line (which measures the instantaneous rate of change at a point), we have the derivative. This is the limit definition of the derivative:



Find the derivative of $f(x)=4x^2$.

Start with the limit definition of the derivative.


Expand numerator.


$f'(x)=\lim\limits_{h\to0} (8x+4h)$

Solve the limit.

The limit definition of the derivative is one of the building blocks for some shortcuts for finding derivatives more quickly. I will write more posts concerning derivatives soon. I hope this was useful. All feedback is welcome!

Hello World!

5:06 PM Posted by Daniel Pendergast No comments
I decided to start a blog (mostly) about programming and mathematics to:
  • help me remember things that I learn.
  • use as a reference.
  • improve my writing skills.
  • hopefully help someone else out.
I work with many diverse computer topics. So, as you can imagine, I bounce all over the place. One day I'll be working on a project, lose interest or rage quit, then find myself doing something totally different. Probably a lack of self-discipline. Here is a list of some of my interests (order doesn't matter):
  • web development & design
  • general c/c++ programming
  • algorithms
  • 3D graphics
  • game programming
  • shaders
  • procedural generation
  • language parsing
  • cryptography
  • calculus
  • physics
  • computer engineering
  • music
  • networks (of all kinds; "friends, money and bytes")
  • user experience
I'm going to try to install MathJax so that I can write equations and whatnot on here.

If you're wondering what the blog's title means, it's two's complement.

If you passed by, please leave a comment. Cheers. Follow me on g + if you want.