Showing posts with label examples. Show all posts
Showing posts with label examples. Show all posts

Tuesday, February 16, 2010

PH253: Exam note #1

A quantity like "35000 revolutions per minute" is an angular velocity. Say you have disc spinning at an angular velocity (omega), and you are interested in the linear velocity at a point a radial distance r=0.1m from the center of the disk. The velocity calculation goes like this:
v = r\omega = \left(0.1\,\text{m}\right)\left(35000\,\frac{\text{rev}}{\text{min}}\right)\left(\frac{1\,\text{min}}{60\,\text{sec}}\right)\left(2\pi\,\frac{\text{rad}}{\text{rev}}\right)\approx 370\,\frac{\text{m}}{\text{s}}

First, you need to convert the angular velocity to radians per second (or just 'per second' since radians are really just a ratio, and thus unit-less). Then you can multiply by the radial distance from the point of rotation to get the regular velocity or speed at that point on the disk.

That's my main comment on problem 1 of the exam. The second one being that the time dilation factor is just the ratio between the time elapsed at the rim of the disc to that at the center (which is at rest). The ratio is just (gamma) - we don't need to use the full Lorentz transformation, because there is no significant spatial separation, and we are talking about different parts of the same object.

Tuesday, January 26, 2010

Newton's method on your TI

Say you want to solve for the root of some equation that has no analytic solution, and you have your TI-8x handy. Should you take the 'shotgun' approach? No! You can easily implement Newton's method, making use of the fact that you have an 'ans' function to use the previous result as part of the next calculation.

Let's say we want to solve for the roots of f(x) = x^2 - 2. We know the roots are the plus and minus square roots of 2, but we need to start with an easy example. Newton's method, in short, asks you to guess a solution to f(x)=0, and calculate an improved guess using f(x) and its first derivative f'(x). The algorithm:
x_{n+1} = x_{n} - \frac{f(x_{n})}{f^{\prime}(x_{n+1})}

For our function, this means
x_{n+1} = x_n - \frac{x_n^2-2}{2x_n}

So, you first guess at the root, and that is your starting x. The next guess for x is calculated from the formula above. Let's say we guess 1 for the root. It is a bad guess, but it doesn't matter too much.

x_0=1 \qquad \Longrightarrow \qquad x_1 = 1 - \frac{1^2-2}{2\cdot 1}=1.5

Our next-best guess is then 1.5. We plug 1.5 into the equation above, and the next-next-best guess is 1.417. Not bad! After 3-4 iterations, you'll see the numbers start to converge.

How to do this on the TI? First, type your guess and hit [enter]. That makes the current value of "ans" equal to the number you just typed. Now type this as your formula:
(ans) - ((ans)-2)/(2*(ans))
Don't forget the parentheses. Hit [enter], and you've found your second guess, which is now the new value of "ans." Keep hitting [enter] until the result starts to converge, and that's that! You've implemented an iterative root-finding algorithm.

Doing this for a more complicated function, like the one on the homework, is not much harder. You just need to know the function and its derivative, otherwise you follow the same procedure.