Random Walkers

I implemented some JavaScript code to show the progression of a random walk. Find the code here.

Why Radian Measure?

There are many reasons why we use radian measure.  One reason is to make the following limit equal to one.

    \[\lim_{h\to\ 0} \frac{\sin h}{h}=1 \]

This can only occur if h is in radians. We will show why that is in this post.

Lets start with the derivative of \sin x.

    \[ \frac{d (\sin x)}{dx}= \lim_{h\to\ 0} \frac{\sin (x+h) - \sin x}{h} \]

This identity is useful: \sin (x+h)=\sin x \cos h + \sin h \cos x

    \[ \frac{d (\sin x)}{dx}=\lim_{h\to\ 0} \frac{\sin x \cos h + \sin h \cos x - \sin x}{h} \]

We can separate this limit into two parts. One part depends on h multiplied by \sin x and another part that depends on h and multiplied by \cos x.

    \[ \lim_{h\to\ 0} \sin x \frac{\cos h -1}{h}  +  \cos x \frac{\sin h} {h}\]

Now we just need to find the two limits below because the limit depends on h and not on x and so \sin x and \cos x can be taken out.

    \[ [1] \hspace{1cm} \lim_{h\to\ 0} \frac{\cos h -1}{h}  \hspace{1cm} [2] \hspace{1cm}   \lim_{h\to\ 0} \frac{sin h}{h}   \]

Both of these limits are of the type zero over zero. We will now show that [1] depends on [2].

    \[ \frac{\cos h -1}{h} \frac{(\cos h +1)}{(\cos h +1)} =\frac{\cos^2 h -1}{h(\cos h +1)}= \frac{\sin^2 h}{h(\cos h +1)}\]

    \[= \frac{\sin h}{h} \frac{ \sin h}{\cos h +1} \]

Limit [1] is limit [2] multiplied by an expression which tends to zero.

    \[ \lim_{h\to\ 0} \frac{ \sin h}{\cos h +1} =0\]

So if limit [2] is finite then limit [1] will be zero.

Now our next step is to see if limit [2] is finite. I am going to show this fact numerically. We are going to calculate the sine of very small angles since our limit is when the angle is approaching zero.

TOOLBOX:

  • Seed: \cos 30^ \circ = \frac{\sqrt{3}}{2}
  • \cos 2x=1-2 \sin^2 x
  • \sin^2 x+\cos^2 x=1

With this toolbox I can get \sin 15^\circ by the following:

Let 2x=30 then we have the following \cos 30=1-2 \sin^2 15. We can solve for \sin^2 15^\circ using this equation.

We can now get \cos 15^\circ by using the third part of the tool box and then repeat the whole process to get \sin 7.5^\circ. We can continue this as much as we want. The table below is constructed using this method.

    \[ \begin{center} \begin{tabular}{ |c|c|c|c| } x^\circ & \cos x^\circ & \sin x^\circ & \sin x^\circ/x^\circ \\ \hline 30        & 0.8660254 & 0.5          & 0.0166666 \\ 15        & 0.9659258 & 0.2588190 & 0.0172546  \\ 7.5       & 0.9914448 & 0.1305261 & 0.0174034 \\ 3.75      & 0.9978589 & 0.0654031 & 0.0174408 \\ 1.875     & 0.9994645 & 0.0327190 & 0.0174501 \\ 0.9375    & 0.9998661 & 0.0163617 & 0.0174525 \\ 0.46875   & 0.9999665 & 0.0081811 & 0.0174530 \\ 0.234375  & 0.9999916 & 0.0040906  & 0.0174532 \\ 0.1171875 & 0.9999979 & 0.0020453 & 0.0174532\\ \end{tabular} \end{center} \]

The fraction \sin x^\circ/x^\circ looks like it is converging. So we can reasonably say that limit [2] is finite making limit [1] zero. This makes the derivative of \sin x look like the following:

    \[ \frac{d (\sin x)}{dx}=\lim_{h\to\ 0} \sin x \frac{\cos h -1}{h}  +  \cos x \frac{\sin h} {h}\]

    \[ \frac{d (\sin x)}{dx}=(\sin x)(0) +  (\cos x) (0.017453...) \]

    \[ \frac{d (\sin x)}{dx}=0.017453..\cos x^\circ\]

This constant 0.017453.. is the result when we take the \lim_{h\to\ 0} \frac{\sin h}{h} where h is in degrees . The way we measure h is pretty arbitrary. We just assign the number 360 to a full circle. What if we assume the limit approaches one? If we do this the derivative is just \cos x. Then we can work backwards and see how the way we measure an angle changes. We will call this new way of measuring the angle the radian h_r.

Let the following be true:

    \[\lim_{h_r\to\ 0} \frac{\sin h_r}{h_r}=1  \]

Then the following is true for very small h_r:

    \[\sin h_r \approx h_r \]

We take the smallest angle from the above table:

    \[ \sin 0.1171875^\circ=0.0020453  \]

Since the angle is pretty small we can make the following approximation:

    \[ \sin 0.0020453_r \approx 0.0020453  \]

Now we have a correspondence between angles in degrees and angles in radians. Since both numbers represent the same angle they should have the same ratio to the whole circle angle.

    \[\     \frac{0.1171875^\circ}{360^\circ}= \frac{0.0020453_r}{C_r}   \]

    \[C_r=6.28316  \]

C_r is approximately the number assigned to the whole circle in radian measure.

Wait a minute isn’t

    \[ 2\pi \approx 6.283185...\]

There is a way to show this geometrically… but I’m going to stop here.

 

Deriving the Work Energy Theorem – Don’t need to use differentials as fractions

When I first saw this derivation my teacher allowed differentials to cancel each other out. I found this strange since differential notation is based on a limiting process. How could they become simple fractions? I learned later that this is possible due to the chain-rule.

Here I will derive the Work Energy theorem in 1-D without canceling any differential fractions.

Using Newton’s Second Law: F=ma we replace the acceleration with the time derivative of velocity.

    \[ F=m\frac{d v}{dt} \]

Work is defined as the integral of force times distance integrated over its trajectory. The reason for this is that this integral can be evaluated.

    \[ W=\int F dx \]

    \[ W=m \int \frac{d v}{dt}dx \]

Due to chain rule we have the following:

    \[ \frac{d v}{dt}=\frac{d v}{dx} \frac{d x}{dt} \]

    \[ W=m \int \frac{d v}{dx} \frac{d x}{dt}dx \]

One of the terms is simply the velocity.

    \[ W=m \int \frac{d v}{dx}vdx \]

This term below looks very interesting. It seems like someone took the derivative of a velocity function f(v) with respect to position x using the chain rule.

    \[\frac{d(f(v))}{dx}=\frac{d v}{dx}v\]

f(v) is the square of the velocity.

    \[ f(v)=\frac{v^2}{2}\]

Now subbing into the work integral.

    \[ W=m \int \frac{d(f(v))}{dx}dx \]

We can see that the integral undoes the derivative since they are both respect to position. We should clarify that the integral is taken from the initial position to the final which correspond to the initial and final velocity.

    \[ W = m \frac{v^2}{2} \Bigg|_{v_i}^{v_f} \]

    \[ W = \frac{1}{2}m{v_f}^2-\frac{1}{2}m{v_i}^2 \]

Define Kinetic Energy as the following KE = \frac{1}{2}m{v}^2

    \[ W = \Delta KE \]

Done! Let me know if I made a mistake.