## Spring Pushing a Block Off Another Block Involving Simple Harmonic Motion

Two blocks, the small one of mass 3.5 kg and the large one of mass 7.3 kg are stacked, small block on top. The large block is connected to a horizontal spring of spring constant 210 N/m. The large block sits on a frictionless floor. The coefficient of static friction between the two blocks is 0.492. What amplitude of simple harmonic motion of the spring-blocks system puts the smaller block on the verge of slipping over the larger block?

The maximum acceleration is what is important here. The simple harmonic motion is merely a spin on an old problem. So lay out some Newtonian Force equations:

$F=ma$ – Standard Force Equation
$F_{s} = -kx$ – Hook’s Law for Spring Motion
$F_{N} = mg$ – Normal Force
$F_{f} = \mu_{s} F_{N}$ – Frictional Force, tailored for the small block.

Start with the Spring equation, treating it as an external force acting on the two block system:

$F_{s} = -kx$

Because it is the singular external force acting on the system, we can set the general force equation equal to this, reminding ourselves that we must add the two block masses together as they are one system currently:

$M$ – Mass of the small block and the mass of the large block.

$-kx = Ma$

$\frac{-kx}{M} = a$ – Acceleration of the two block system.

With that, we concentrate on the two block system internally now. We find the maximum force that friction exerts between the two blocks:

$m$ – Mass of the small block.

$F_{f} = \mu_{s} F_{N}$ – Frictional Force
$F_{f} = \mu_{s} mg$ – Substitute Normal Force
$F_{f} = \mu_{s} mg = ma$ – Friction is the only force acting on the block.

$F_{f} = \mu_{s} g = a$ – Small mass cancels

Substitute one acceleration for the other:

$\mu_{s} g = \frac{-kx}{M}$

Solve for x:

$x = \frac{M\mu_{s}g}{-k}$

We can solve directly for x here because we know that the maximum acceleration that the system can undergo without sliding is always the negative of the maximum x value. This is a property of simple harmonic motion.

$|x| = x_{max}$

And we solve:

$x = \frac{(3.5[kg] + 7.3[kg]) * 0.492 * 9.8[m/s^2]}{-210[N/m]}$

$x_{max} = 0.248[m]$

1 Comment

Filed under Science

## Silver Phosphate and Acetic Acid

Silver phosphate has the formula:

$Ag_{3}PO_{4}$

Acetic Acid has the formula

$CH_{3}COOH$

Mix them together and you get the equation:

$Ag_{3}PO_{4(s)} + 3\; CH_{3}COOH_{(aq)} \rightleftharpoons 3\; AgCH_{3}COO_{(s)} + H_{3}PO_{4(aq)}$

The equilibrium equation from this formula is:

$\kappa = \frac{[H_{3}PO_{4}]}{[CH_{3}COOH]^3}$

To compute the equilibrium constant from this, multiply by values that are equal to one, but that allow you to use known constants:

$\kappa = \frac{[H_{3}PO_{4}]}{[CH_{3}COOH]^3} * \frac{[H_{3}O^{+}]^3}{[H_{3}O^{+}]^3} * \frac{[CH_{3}COO^{-}]^3}{[CH_{3}COO^{-}]^3} * \frac{[Ag^{+}]^3}{[Ag^{+}]^3} * \frac{[HPO_{4}^{2-}]}{[HPO_{4}^{2-}]} * \frac{[PO_{4}^{3-}]}{[PO_{4}^{3-}]}$

$\kappa = \frac{(\kappa _{a(CH_{3}COOH)})^3 * \kappa_{sp(Ag_{3}PO_{4})}}{(\kappa _{sp(AgCH_{3}COO)})^3 * \kappa _{a(H_{2}PO_{4} ^{-})} * \kappa _{a(HPO_{4}^{2-})}}$

$\kappa = \frac{(1.8\cdot 10^{-5})^{3}(1.3\cdot 10^{-20})}{(2.0\cdot 10^{-3})^{3}(6.3\cdot 10^{-8})(4.2\cdot 10^{-13})}$

$\kappa = \frac{[H_{2}PO_{4}^{-}]}{[CH_{3}COOH]^2} =5.0\cdot 10^{-5}$

1 Comment

Filed under Science

## Two Trains (Constant Velocity) and a Flying Creature

Two trains are headed toward one another on the same track. Train A has a constant speed of 40[km/hour] and Train B has a constant speed of 20[km/hour]. A Tengu that can fly at 60[km/hour] is perched on top of Train A. When the trains are 90[km] apart, it hops off and begins to fly toward Train B. When it reaches Train B, it instantaneously reverses direction and begins flying toward Train A. How far does the Tengu fly before the trains collide?

Do not make this harder than it is. A series of increasingly small distances would fit this problem perfectly, but that is needlessly complex.

The trick here is to understand that the “Flying Creature” is always moving at a constant velocity and merely bounces off of an imaginary plane in front of the oncoming train before heading back to the other train. Because of this assumption, the Tengu will cover the same amount of ground in the time before the trains collide flying between them as if it had been flying in a straight line for the same amount of time.

First, calculate the time between the start and when the trains collide. The idea is that at some time in the future, the distance traveled by Train A and Train B added together will equal the original distance between them at the start.

$t$ = Time Before the Trains Collide [hour].
$V_{A}$ = Velocity of Train A [km/hour].
$V_{B}$ = Velocity of Train B [km/hour].
$D$ = Distance Between the Trains [km].

$(V_{A}*t)+(V_{B}*t)=D$
$(40[km/hour]*t)+(20[km/hour]*t)=90[km]$
$t=1.5[hour]$

Now with time in hand, it is simple to calculate how far the Tengu flew in the alloted time.

$V_{T}$ = Velocity of the Tengu [km/hour].
$H$ = Distance Traveled by the Tengu [km].
$V_{T}*t=H$
$60[km/hour]*1.5[hour]=90[km]$

Filed under Science

## Remapping Keys in X for Linux

I do not have any purpose for the Caps Lock key. So it remains useless in a prime real estate position. But I use an open-source operating system (GNU/Linux, xmonad GUI), which means that I can remap that key to do something useful. Here is how to remap the Caps Lock key to become a third Control key through your Linux terminal emulator:

xmodmap -e “remove lock = Caps_Lock”
xmodmap -e “add control = Caps_Lock”

Test it out now. Go open new tabs in Firefox with one hand without straining your fingers. Just press “Caps Lock (Now Control) + t”.

Now for some background on this. Start by entering this command into a terminal:

xev

With the pop-up box selected, Press and Release the Caps Lock key and then the left Control key. The keycode and the name associated with that keycode will be displayed for each of the keys will be displayed along with other information. Write it down.

Output from xev

Next, enter into the terminal:

xmodmap

This will display the information for which keys are acting as modifier keys. The two commands originally issued with the “-e” switch modified which keys act like modifiers. First, the key called “Caps_Lock” was removed from the “lock” function. We added it to the “control” function instead.

Modified xmodmap Output

If you want to see every keycode assigned on your keyboard, enter the command:

xmodmap -pke

Between the output from that command and the functions of “xev”, you should be able to figure out the name of any key on the keyboard. This includes funky custom keys that are not standard.

If you mess something up, restart your computer with the mouse if you killed the keyboard, or just restart X with “Control + Alternate + Backspace” (Not Delete). This will reassign your keys to their default.

If you want this to stick between sessions, you will need to edit some files in your home directory. Check you “home” directory with:

ls -a | grep “\.”

If the “.profile” and “.Xmodmap” files are not listed, create them with a text editor as will be discussed:

Open up a text editor and have it open or create the file “.Xmodmap” in your home directory. Otherwise known as “/home/YOURUSERNAME/.Xmodmap”. Paste Xmodmap commands into there if it is new; at the end if there is stuff in this already existing file.

remove lock = Caps_Lock

We removed the “xmodmap -e” because these commands are being run within the “.Xmodmap” file.

Save, and close. Now open the “.profile” document and drop this onto the end of it:

xmodmap $HOME/.Xmodmap For those left-handed people who would prefer to have their mouse viewed as left-handed, and have the primary button on the right side of the mouse, enter this command: xmodmap -e “pointer = 3 2 1” This will switch the order of your primary and secondary click buttons. If you like this, paste “pointer = 3 2 1” into “.Xmodmap”, too. Leave a comment Filed under Computing, How-To ## Compiling Mozilla Firefox on 32-bit Ubuntu Linux Remember to double-check these procedures against what is posted on https://developer.mozilla.org/ and your own common sense. Developmental software can change quickly and requirements come and go. If you want the newest version in development, this is the only way to go. Everything here is merely a re-hashing of the guidelines set forth by Mozilla. The beginning of the procedure can be found here. This was done on Linux Mint 6.0. This is a derivative of Ubuntu, so it should work there, too. In other words, this article is meant for Debian-like operating systems with apt-get. To start, install what Mozilla deems the absolute basics. You may or may not already have some of these. Merely run the bold command in a terminal, or hunt and peck through your package manager for the individual files. They should appear in the package manager exactly as they are listed here. sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev python-setuptools python-dev build-essential Mercurial (the code grabber) may not be completely updated from this. To get the latest version: sudo easy_install -U mercurial Now we need to configure Mercurial. Only developers need a merger program, but we will install one anyway. I recommend “meld.” sudo apt-get install meld Open up the file “/etc/mercurial/hgrc” with root privileges. For example: sudo vim /etc/mercurial/hgrc Drop this into there: [ui] username = Your Real Name merge = your-merge-program (or internal:merge) [diff] git = 1 [defaults] diff=-p -U 8 It should look something like this: Now, to get the bloody-fresh new code. Download it via Mercurial and then enter the directory we just created. I would recommend entering this command from inside a “Projects” folder. Do not do this near anything important, or those files will get lost in the mess. hg clone http://hg.mozilla.org/mozilla-central/ src cd src Downloading Using Mercurial Now we need to install automake Version 2.13 because Firefox is picky about that. sudo apt-get install automake2.13 We need to create a file called “.mozconfig” to handle some details for us. Make sure you are in the top level directory (src) if you are following this exactly) of all the source you just downloaded. Then copy and paste these lines: echo ‘.$topsrcdir/browser/config/mozconfig’ > .mozconfig

That will add two lines to the “.mozconfig” file that will be automatically created.

Finally, still in that top-level directory, begin compiling with the command:

make -f client.mk build

Checking Prerequisites

Depending on the Distribution of Linux, different things will be missing. For example, after beginning the prerequisite check, “make” spit back this:

Something is Missing

sudo apt-get install dbus-glib-1

to fix that, and then:

make -f client.mk build

again. If no additional problems are found, compiling will begin. This cannot be disturbed for the time that it is running. So do not close the terminal. It may take a few hours to compile.

After it has finished, and you are given control of the terminal again, you will want to run the new binary and see if it works. Close all instances of Firefox open, and then head to the top of the source directory. To run the new Firefox binary, and not the one from the repositories,

./dist/bin/firefox

Filed under Computing, How-To

## The Age of Firefox

Mozilla Firefox comes in a few different versions, depending on how new you want yours to be. There is:

Old-Hat Firefox – For people who do not like to upgrade their software. These are the versions that are years old. This stuff is OLD. Historical purposes only. Rising software security scientists might be interested in testing legacy exploits against this old browser. Because historical exploits are excellent sources to learn from.

Now-Firefox – What Mozilla says you should be using. People who update their systems when they should will be running this. Has the best stability of the gradient. If you want to browse the Internet and parse HTTP protocols and do all that normal stuff, this is where you should be.

New-Firefox – The stuff you read about in the technology publications. “Mozilla to release version Y.XX” and “New Firefox slated to be twice as slow and three times as memory hungry.” That sort of rot. Not a bad thing to use if you would like to help Firefox out. Download, install, and then run along. Be forewarned, it is new, so some extensions will not work and some websites will break.

Bloody-Edge-Firefox – For developers. This is that steaming pile of code that someone just dropped off minutes ago. No, really. This is updated every other minute and the people using this version are always compiling. Not for people who want to spend more time browsing than watching “make flags” fly by.

Filed under Computing

## Image Magick Preservation

Image Magick takes care of all my image converting needs. It is a wonderful tool for saving important images from the rot that happens when you move images around that are stored with a compression-minded format.

Ever notice that your .JPG files get all gritty after some time? I sure do not like that. So I prefer to save things in the .PNG format. While the image file-size becomes larger, the quality does not decrease overtime. A trade-off I am willing to pay in this age of external hard-drives and Internet storage.

You can usually find Image Magick in your Linux repositories. If you cannot, or you run Windows, you can pick up binaries on the website at:

http://www.imagemagick.org/

There is a laundry list of commands and functions this program suite has. An excellent tool to have around for bash-scripting jobs.

I use this command on my Linux box to preserve my important files. I pack them all together into one directory, and then enter this into the terminal:

mogrify -format png *

It converts all files in the directory to .PNG files. Make sure you only have image files in there.

Additional help can be found here:

http://www.imagemagick.org/script/command-line-tools.php