<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEEERnszeSp7ImA9WxNWFEU.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660</id><updated>2009-10-13T22:16:47.581-04:00</updated><title>SciLearn</title><subtitle type="html">A place where I write anecdotes of fun, intriguing, &amp;amp; perhaps useful knowledge.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://scilearn.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>105</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/SciLearn" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;C08AR3w8fip7ImA9WxVVFUg.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-3292371737560692235</id><published>2009-03-08T18:37:00.000-04:00</published><updated>2009-03-08T18:37:26.276-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-08T18:37:26.276-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>peak detection</title><content type="html">I have been recently working on a Python program that detects peaks in an oscilloscope trace. With help from &lt;a href="http://niqos.com/posts/2007/10/22/peak-picking-algorithm"&gt;this post I found&lt;/a&gt;, I managed to find the best algorithm to deal with my situation. &lt;br /&gt;
&lt;br /&gt;
Mathematically, finding the peaks (local maxima) of any graph is straightforward, as long as the function is simple enough. All one has to do is to find the &lt;i&gt;x&lt;/i&gt;-values where the first derivative is zero, and then apply the second derivative test to differentiate the maxima (peaks) from the minima (troughs).&lt;br /&gt;
&lt;br /&gt;
However, real data tend to be rather coarse, so peak detection can be rather difficult. From &lt;a href="http://niqos.com/posts/2007/10/22/peak-picking-algorithm"&gt;the article I mentioned earlier&lt;/a&gt;, this issue can be resolved by "derivative smoothing". The typical way of estimating the derivative of a function represented by a set of discrete points is by taking every pair of points and calculating the gradient. Derivative smoothing involves taking more than two points to calculate the derivative. The article says this can be achieved by taking a group of points and calculating the gradient using just the first and the last points in this group, but I decided to try something different: making a linear fit on this group of points and find the gradient of this fit.&lt;br /&gt;
&lt;br /&gt;
I don't know if this is more accurate or appropriate, but I tried it out anyway, and so far it's working well. The only downside is that the calculations are much slower since fitting a set of data points is computationally intensive. In any of these peak detection methods, the precision of the peak is always limited by the discreteness of the values; to improve this precision, one can attempt to fit the peak itself with a fit curve, say a Gaussian (if symmetric), and use the fitted parameters to find a more precise value for the peak.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-3292371737560692235?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/3292371737560692235/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2009/03/peak-detection.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3292371737560692235?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3292371737560692235?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/yxlAwAtBAFw/peak-detection.html" title="peak detection" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2009/03/peak-detection.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMFRHs6fSp7ImA9WxVSEEw.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-3878146292528032295</id><published>2009-01-02T15:00:00.011-05:00</published><updated>2009-01-03T14:53:35.515-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-03T14:53:35.515-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>commutative power</title><content type="html">The power operator ("a raised to the power of b") is certainly not commutative, i.e. in general &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;b&lt;/i&gt;&lt;/sup&gt; ≠ &lt;i&gt;b&lt;/i&gt;&lt;sup&gt;&lt;i&gt;a&lt;/i&gt;&lt;/sup&gt;. This should be no surprise, e.g. 2&lt;sup&gt;3&lt;/sup&gt; ≠ 3&lt;sup&gt;2&lt;/sup&gt;.&lt;br /&gt;
&lt;br /&gt;
What I am interested is find pairs of natural numbers, in which &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;b&lt;/i&gt;&lt;/sup&gt; does equal &lt;i&gt;b&lt;/i&gt;&lt;sup&gt;&lt;i&gt;a&lt;/i&gt;&lt;/sup&gt;. I already know one pair: 2&lt;sup&gt;4&lt;/sup&gt; = 4&lt;sup&gt;2&lt;/sup&gt; (in addition to the trivial pairs, e.g. 3&lt;sup&gt;3&lt;/sup&gt; = 3&lt;sup&gt;3&lt;/sup&gt;), so I need to find out what's so special about this pair of numbers.&lt;br /&gt;
&lt;br /&gt;
To do this, I break the equation into a series of steps:&lt;br /&gt;
2&lt;sup&gt;4&lt;/sup&gt; = 2&lt;sup&gt;2×2&lt;/sup&gt; = (2&lt;sup&gt;2&lt;/sup&gt;)&lt;sup&gt;2&lt;/sup&gt; = 4&lt;sup&gt;2&lt;/sup&gt;.&lt;br /&gt;
Now the relationship becomes clear; I want a pair of numbers such that:&lt;br /&gt;
&lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;b&lt;/i&gt;&lt;/sup&gt; = &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt;×&lt;i&gt;a&lt;/i&gt;&lt;/sup&gt; = (&lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt;&lt;/sup&gt;)&lt;sup&gt;&lt;i&gt;a&lt;/i&gt;&lt;/sup&gt; = &lt;i&gt;b&lt;/i&gt;&lt;sup&gt;&lt;i&gt;a&lt;/i&gt;&lt;/sup&gt;&lt;br /&gt;
where &lt;i&gt;c&lt;/i&gt; is another natural number that satisfies:&lt;br /&gt;
&lt;i&gt;b&lt;/i&gt; = &lt;i&gt;c&lt;/i&gt;×&lt;i&gt;a&lt;/i&gt; and &lt;i&gt;b&lt;/i&gt; = &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt;&lt;/sup&gt;&lt;br /&gt;
I can combine these equations into one:&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt; &lt;i&gt;a&lt;/i&gt; = &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt;&lt;/sup&gt;&lt;br /&gt;
So how many (nontrivial) pairs of natural numbers satisfy this equation? By nontrivial, I exclude cases where &lt;i&gt;c&lt;/i&gt; = 1.&lt;br /&gt;
&lt;br /&gt;
Now, to solve this equation:&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt; &lt;i&gt;a&lt;/i&gt; = &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt;&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt; &lt;i&gt;a&lt;/i&gt; - &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt;&lt;/sup&gt; = 0&lt;br /&gt;
(&lt;i&gt;c&lt;/i&gt; - &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt; - 1&lt;/sup&gt;) &lt;i&gt;a&lt;/i&gt; = 0&lt;br /&gt;
Either &lt;i&gt;a&lt;/i&gt; = 0 (which is trivial) or &lt;i&gt;c&lt;/i&gt; - &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt; - 1&lt;/sup&gt; = 0. Consider the latter nontrivial case:&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt; - &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt; - 1&lt;/sup&gt; = 0&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt; = &lt;i&gt;a&lt;/i&gt;&lt;sup&gt;&lt;i&gt;c&lt;/i&gt; - 1&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt;&lt;sup&gt;1/(&lt;i&gt;c&lt;/i&gt; - 1)&lt;/sup&gt; = &lt;i&gt;a&lt;/i&gt;&lt;br /&gt;
Therefore, if a value of &lt;i&gt;c&lt;/i&gt; is known, &lt;i&gt;a&lt;/i&gt; can be found by taking the (&lt;i&gt;c&lt;/i&gt; - 1)&lt;sup&gt;th&lt;/sup&gt; root of &lt;i&gt;c&lt;/i&gt;. If &lt;i&gt;c&lt;/i&gt; = 2, then &lt;i&gt;a&lt;/i&gt; = 2&lt;sup&gt;1/(2 - 1)&lt;/sup&gt; = 2, and therefore &lt;i&gt;b&lt;/i&gt; = &lt;i&gt;c&lt;/i&gt; &lt;i&gt;a&lt;/i&gt; = 4; this shows why 2&lt;sup&gt;4&lt;/sup&gt; = 4&lt;sup&gt;2&lt;/sup&gt;. For any other &lt;i&gt;c&lt;/i&gt; &amp;gt; 2, (&lt;i&gt;c&lt;/i&gt; - 1)&lt;sup&gt;th&lt;/sup&gt; root of &lt;i&gt;c&lt;/i&gt; will not be an integer, so there are no other nontrivial natural-number combinations of &lt;i&gt;a&lt;/i&gt;, &lt;i&gt;b&lt;/i&gt; and &lt;i&gt;c&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Well, looks like that answered the question. It seems 2&lt;sup&gt;4&lt;/sup&gt; = 4&lt;sup&gt;2&lt;/sup&gt; is pretty special case, after all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-3878146292528032295?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/3878146292528032295/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2009/01/commutative-power.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3878146292528032295?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3878146292528032295?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/iN6a9u1PRAM/commutative-power.html" title="commutative power" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2009/01/commutative-power.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UNQ3g6fCp7ImA9WxRaGE4.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-1266628548801946043</id><published>2008-12-19T20:28:00.000-05:00</published><updated>2008-12-21T01:01:32.614-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-21T01:01:32.614-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Chemistry" /><title>iron's odor</title><content type="html">Well, just a short post on an interesting finding. I was curious why iron tends to produce strange metallic smells (it occurs to some other metals as well as blood), and it looks like a quick Googling gives me &lt;a href="http://jyi.org/news/nb.php?id=852"&gt;a neat explanation of this phenomenon&lt;/a&gt;. Go check it out.&lt;br /&gt;
&lt;br /&gt;
It's funny that some common phenomena can be so easily ignored, and we never get to appreciate the science behind it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-1266628548801946043?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/1266628548801946043/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/12/irons-odor.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1266628548801946043?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1266628548801946043?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/xRp5KIjSXEg/irons-odor.html" title="iron's odor" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/12/irons-odor.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8DRH88fyp7ImA9WxRaEEg.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-576436673874792565</id><published>2008-12-06T12:10:00.006-05:00</published><updated>2008-12-11T23:41:15.177-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-11T23:41:15.177-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>numerical pendulum</title><content type="html">There was this "flash of idea" that I could solve "any" differential equations numerically, which implies I could "simulate" Maxwell's differential equations using a computer program. Sadly, that was too tall an order, so I could only manage to simulate the most basic of differential equations.&lt;br /&gt;
&lt;br /&gt;
So far I managed to derive a simple method to simulate pendulums directly using the &lt;a href="http://en.wikipedia.org/wiki/Pendulum_%28mathematics%29#Simple_gravity_pendulum"&gt;rigid pendulum equation&lt;/a&gt; (&lt;i&gt;c&lt;/i&gt; is a negative constant)m&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\frac{\mathrm{d}^2\theta}{\mathrm{d}t^2} = c \sin \theta" src="http://www.codecogs.com/gif.latex?%5Cfrac%7B%5Cmathrm%7Bd%7D%5E2%5Ctheta%7D%7B%5Cmathrm%7Bd%7Dt%5E2%7D&amp;amp;space;=&amp;amp;space;c&amp;amp;space;%5Csin&amp;amp;space;%5Ctheta" /&gt;&lt;/a&gt;&lt;br /&gt;
I do know Euler's method, which is really simple. But how do I apply it to second derivatives? That's the trick here.&lt;br /&gt;
&lt;br /&gt;
I found that if I broke this equation into two by defining a variable &lt;i&gt;ω&lt;/i&gt;,&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} \omega &amp;amp;= \frac{\mathrm{d}\theta}{\mathrm{d}t} \\ \frac{\mathrm{d}\omega}{\mathrm{d}t} &amp;amp;= c \sin \theta \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;%5Comega&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cfrac%7B%5Cmathrm%7Bd%7D%5Ctheta%7D%7B%5Cmathrm%7Bd%7Dt%7D&amp;amp;space;%5C%5C&amp;amp;space;%5Cfrac%7B%5Cmathrm%7Bd%7D%5Comega%7D%7B%5Cmathrm%7Bd%7Dt%7D&amp;amp;space;&amp;amp;=&amp;amp;space;c&amp;amp;space;%5Csin&amp;amp;space;%5Ctheta&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
I can easily apply Euler's method using the finite differences approximation,&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} \frac{\Delta \theta}{\Delta t} &amp;amp;= \omega \\ \frac{\Delta \omega}{\Delta t} &amp;amp;= c \sin \theta \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Ctheta%7D%7B%5CDelta&amp;amp;space;t%7D&amp;amp;space;&amp;amp;=&amp;amp;space;%5Comega&amp;amp;space;%5C%5C&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Comega%7D%7B%5CDelta&amp;amp;space;t%7D&amp;amp;space;&amp;amp;=&amp;amp;space;c&amp;amp;space;%5Csin&amp;amp;space;%5Ctheta&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
Therefore, I can convert this into a form useful for programming,&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} \Delta \omega_i &amp;amp;= c \sin \theta_i \Delta t \\ \Delta \theta_i &amp;amp;= \omega_i \Delta t \\ \omega_{i + 1} &amp;amp;= \omega_i + \Delta \omega_i \\ \theta_{i + 1} &amp;amp;= \theta_i + \Delta \theta_i \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;%5CDelta&amp;amp;space;%5Comega_i&amp;amp;space;&amp;amp;=&amp;amp;space;c&amp;amp;space;%5Csin&amp;amp;space;%5Ctheta_i&amp;amp;space;%5CDelta&amp;amp;space;t&amp;amp;space;%5C%5C&amp;amp;space;%5CDelta&amp;amp;space;%5Ctheta_i&amp;amp;space;&amp;amp;=&amp;amp;space;%5Comega_i&amp;amp;space;%5CDelta&amp;amp;space;t&amp;amp;space;%5C%5C&amp;amp;space;%5Comega_%7Bi&amp;amp;space;+&amp;amp;space;1%7D&amp;amp;space;&amp;amp;=&amp;amp;space;%5Comega_i&amp;amp;space;+&amp;amp;space;%5CDelta&amp;amp;space;%5Comega_i&amp;amp;space;%5C%5C&amp;amp;space;%5Ctheta_%7Bi&amp;amp;space;+&amp;amp;space;1%7D&amp;amp;space;&amp;amp;=&amp;amp;space;%5Ctheta_i&amp;amp;space;+&amp;amp;space;%5CDelta&amp;amp;space;%5Ctheta_i&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
This is easily done by iteration; simply keep track of the index &lt;i&gt;i&lt;/i&gt; and the values of &lt;i&gt;ω&lt;/i&gt; and &lt;i&gt;θ&lt;/i&gt;. By choosing the Δ&lt;i&gt;t&lt;/i&gt; to be small, one can approximate the pendulum with some precision. I have tested the method and it seems to be quite stable, though I'm not sure how good the precision.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-576436673874792565?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/576436673874792565/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/12/numerical-pendulum.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/576436673874792565?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/576436673874792565?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/yVXi3aY9DG8/numerical-pendulum.html" title="numerical pendulum" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/12/numerical-pendulum.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4ERXkzfSp7ImA9WxRUFUU.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-1897755270238761078</id><published>2008-11-24T23:19:00.000-05:00</published><updated>2008-11-24T23:21:44.785-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-24T23:21:44.785-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Blog Information" /><title>101 posts?</title><content type="html">Hey, I just realized that the last post was the 100&lt;sup&gt;th&lt;/sup&gt; one.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Happy Thanksgiving!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
(Hopefully, I can write a full SciLearn post on Thursday.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-1897755270238761078?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/1897755270238761078/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/11/101-posts.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1897755270238761078?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1897755270238761078?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/H0vQnEPnlE0/101-posts.html" title="101 posts?" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/11/101-posts.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMERno5eip7ImA9WxRVF0Q.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-3157821024736254404</id><published>2008-11-15T14:31:00.049-05:00</published><updated>2008-11-15T18:56:47.422-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-15T18:56:47.422-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><category scheme="http://www.blogger.com/atom/ns#" term="Physics" /><title>wave interference</title><content type="html">&lt;i&gt;This post deals with the &lt;b&gt;interference of light&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Light is a strange thing. It's made of photons, yet most of the time, it behaves as a wave. Now I won't go into the quantum mechanical details of light; I'm just going to talk about one particular nature of light: interference, which occurs whenever light behaves as a wave. I'll provide a systematic summary of wave interference and slit interference patterns.&lt;br /&gt;
&lt;br /&gt;
The first step to interference is to begin with the basic equations of wave motion. Let's pick a simple sine wave in 1 dimensions:&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;d&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;, &lt;i&gt;t&lt;/i&gt;) = &lt;i&gt;a&lt;/i&gt; sin &lt;i&gt;ϕ&lt;/i&gt; = &lt;i&gt;a&lt;/i&gt; sin[&lt;i&gt;kx&lt;/i&gt; - &lt;i&gt;ωt&lt;/i&gt; + &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0&lt;/sub&gt;]&lt;/blockquote&gt;where:&lt;br /&gt;
&lt;i&gt;d&lt;/i&gt; = displacement;&lt;br /&gt;
&lt;i&gt;a&lt;/i&gt; = amplitude; &lt;br /&gt;
&lt;i&gt;k&lt;/i&gt; = angular wavenumber;&lt;br /&gt;
&lt;i&gt;x&lt;/i&gt; = position; &lt;br /&gt;
&lt;i&gt;ω&lt;/i&gt; = angular frequency;&lt;br /&gt;
&lt;i&gt;t&lt;/i&gt; = time;&lt;br /&gt;
&lt;i&gt;ϕ&lt;/i&gt; = phase;&lt;br /&gt;
&lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0&lt;/sub&gt; = initial phase.&lt;br /&gt;
&lt;br /&gt;
When two waves interfere, their displacement superpose on each other, so they can simply be added to produce the resultant wave (for simplicity, amplitude of both waves are equal):&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} D (x, t) &amp;amp;= a \sin \phi_1 + a \sin \phi_2 \\ &amp;amp;= 2 a \cos \frac{\phi_1 - \phi_2}{2} \sin \frac{\phi_1 + \phi_2}{2} \\ &amp;amp;= 2 a \cos \frac{\Delta \phi}{2} \sin \frac{\sum \phi}{2} \\ &amp;amp;= 2 a \cos \frac{\Delta \phi}{2} \sin \langle\phi\rangle \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;D&amp;amp;space;%28x,&amp;amp;space;t%29&amp;amp;space;&amp;amp;=&amp;amp;space;a&amp;amp;space;%5Csin&amp;amp;space;%5Cphi_1&amp;amp;space;+&amp;amp;space;a&amp;amp;space;%5Csin&amp;amp;space;%5Cphi_2&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;2&amp;amp;space;a&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5Cphi_1&amp;amp;space;-&amp;amp;space;%5Cphi_2%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Cfrac%7B%5Cphi_1&amp;amp;space;+&amp;amp;space;%5Cphi_2%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;2&amp;amp;space;a&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Cfrac%7B%5Csum&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;2&amp;amp;space;a&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Clangle%5Cphi%5Crangle&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;/blockquote&gt;where&lt;br /&gt;
&lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;k&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt;&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; - &lt;i&gt;ω&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt;&lt;i&gt;t&lt;/i&gt; + &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0,1&lt;/sub&gt;;&lt;br /&gt;
&lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt; = &lt;i&gt;k&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt; - &lt;i&gt;ω&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;i&gt;t&lt;/i&gt; + &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0,2&lt;/sub&gt;;&lt;br /&gt;
Δ&lt;i&gt;ϕ&lt;/i&gt; = &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; - &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;;&lt;br /&gt;
Σ&lt;i&gt;ϕ&lt;/i&gt; = &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; + &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;.&lt;br /&gt;
⟨&lt;i&gt;ϕ&lt;/i&gt;⟩ = Σ&lt;i&gt;ϕ&lt;/i&gt; / 2&lt;br /&gt;
The above equation involved the use of a "sum-to-product" trigonometric identity.&lt;br /&gt;
&lt;br /&gt;
There are special scenarios under which the above equation simplifies:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;Standing wave&lt;/b&gt;:&lt;br /&gt;
&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;x&lt;/i&gt; = &lt;i&gt;x&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;br /&gt;
&lt;i&gt;k&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;k&lt;/i&gt; = &lt;i&gt;k&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;br /&gt;
-&lt;i&gt;ω&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;ω&lt;/i&gt; = &lt;i&gt;ω&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;br /&gt;
&lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0,1&lt;/sub&gt; = 0 = &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0,2&lt;/sub&gt;&lt;br /&gt;
The displacement equation is:&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} &amp;amp; \quad \: D (x, t) \\ &amp;amp;= 2 a \cos \frac{\Delta \phi}{2} \sin \frac{\sum \phi}{2} \\ &amp;amp;= 2 a \cos \frac{\left(k x + \omega t\right) - \left(k x - \omega t\right)}{2} \\ &amp;amp; \quad \: \times \sin \frac{\left(k x + \omega t\right) + \left(k x - \omega t\right)}{2} \\ &amp;amp;= 2 a \cos \omega t \sin kx \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;&amp;amp;&amp;amp;space;%5Cquad&amp;amp;space;%5C:&amp;amp;space;D&amp;amp;space;%28x,&amp;amp;space;t%29&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Cfrac%7B%5Csum&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5Cleft%28k&amp;amp;space;x&amp;amp;space;+&amp;amp;space;%5Comega&amp;amp;space;t%5Cright%29&amp;amp;space;-&amp;amp;space;%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t%5Cright%29%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;&amp;amp;space;%5Cquad&amp;amp;space;%5C:&amp;amp;space;%5Ctimes&amp;amp;space;%5Csin&amp;amp;space;%5Cfrac%7B%5Cleft%28k&amp;amp;space;x&amp;amp;space;+&amp;amp;space;%5Comega&amp;amp;space;t%5Cright%29&amp;amp;space;+&amp;amp;space;%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t%5Cright%29%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;%5Csin&amp;amp;space;kx&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;/blockquote&gt;The boundary conditions for a standing wave is that the ends, at x = 0 and x = L, are fixed discontinuities (i.e. the ends of the standing wave cannot move):&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;D&lt;/i&gt;(&lt;i&gt;0&lt;/i&gt;, &lt;i&gt;t&lt;/i&gt;) = &lt;i&gt;D&lt;/i&gt;(&lt;i&gt;L&lt;/i&gt;, &lt;i&gt;t&lt;/i&gt;) = 0 (for any &lt;i&gt;t&lt;/i&gt;).&lt;/blockquote&gt;Solving this equation yields the allowable wavenumbers and wavelengths (&lt;i&gt;λ&lt;/i&gt;) for standing waves:&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} D (L, t) &amp;amp;= 0 \\ A \cos \omega t \sin kL &amp;amp;= 0 \\ \sin kL &amp;amp;= 0 \\ kL &amp;amp;= n \pi, \quad n \in \mathbb{Z} \\ k &amp;amp;= \frac{n \pi}{L} \quad \Leftrightarrow \quad \lambda = \frac{2 L}{n} \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;D&amp;amp;space;%28L,&amp;amp;space;t%29&amp;amp;space;&amp;amp;=&amp;amp;space;0&amp;amp;space;%5C%5C&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;%5Csin&amp;amp;space;kL&amp;amp;space;&amp;amp;=&amp;amp;space;0&amp;amp;space;%5C%5C&amp;amp;space;%5Csin&amp;amp;space;kL&amp;amp;space;&amp;amp;=&amp;amp;space;0&amp;amp;space;%5C%5C&amp;amp;space;kL&amp;amp;space;&amp;amp;=&amp;amp;space;n&amp;amp;space;%5Cpi,&amp;amp;space;%5Cquad&amp;amp;space;n&amp;amp;space;%5Cin&amp;amp;space;%5Cmathbb%7BZ%7D&amp;amp;space;%5C%5C&amp;amp;space;k&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cfrac%7Bn&amp;amp;space;%5Cpi%7D%7BL%7D&amp;amp;space;%5Cquad&amp;amp;space;%5CLeftrightarrow&amp;amp;space;%5Cquad&amp;amp;space;%5Clambda&amp;amp;space;=&amp;amp;space;%5Cfrac%7B2&amp;amp;space;L%7D%7Bn%7D&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Coherent interference&lt;/b&gt;:&lt;br /&gt;
&lt;i&gt;k&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;k&lt;/i&gt; = &lt;i&gt;k&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;br /&gt;
&lt;i&gt;ω&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;ω&lt;/i&gt; = &lt;i&gt;ω&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;br /&gt;
The displacement equation is:&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} &amp;amp; \quad \: D (x, t) \\ &amp;amp;= A \cos \frac{\Delta \phi}{2} \sin \langle \phi \rangle \\ &amp;amp;= A \cos \frac{\left(k x_1 - \omega t + \phi_{0,1}\right) - \left(k x_2 - \omega t + \phi_{0,2}\right)}{2} \\ &amp;amp; \quad \: \times \sin \frac{\left(k x_1 - \omega t + \phi_{0,1}\right) + \left(k x_2 - \omega t + \phi_{0,2}\right)}{2} \\ &amp;amp;= A \cos \frac{k \left(x_1 - x_2\right) + \left(\phi_{0,1} - \phi_{0,2}\right)}{2} \\ &amp;amp; \quad \: \times \sin \left(k \frac{x_1 + x_2}{2} - \omega t + \frac{\phi_{0,1} + \phi_{0,2}}{2}\right) \\ &amp;amp;= A \cos \frac{k \Delta x + \Delta \phi_0}{2} \sin \left(k_2 \langle x \rangle - \omega t + \langle \phi_0 \rangle\right) \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;&amp;amp;&amp;amp;space;%5Cquad&amp;amp;space;%5C:&amp;amp;space;D&amp;amp;space;%28x,&amp;amp;space;t%29&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Clangle&amp;amp;space;%5Cphi&amp;amp;space;%5Crangle&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5Cleft%28k&amp;amp;space;x_1&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_%7B0,1%7D%5Cright%29&amp;amp;space;-&amp;amp;space;%5Cleft%28k&amp;amp;space;x_2&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_%7B0,2%7D%5Cright%29%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;&amp;amp;space;%5Cquad&amp;amp;space;%5C:&amp;amp;space;%5Ctimes&amp;amp;space;%5Csin&amp;amp;space;%5Cfrac%7B%5Cleft%28k&amp;amp;space;x_1&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_%7B0,1%7D%5Cright%29&amp;amp;space;+&amp;amp;space;%5Cleft%28k&amp;amp;space;x_2&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_%7B0,2%7D%5Cright%29%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7Bk&amp;amp;space;%5Cleft%28x_1&amp;amp;space;-&amp;amp;space;x_2%5Cright%29&amp;amp;space;+&amp;amp;space;%5Cleft%28%5Cphi_%7B0,1%7D&amp;amp;space;-&amp;amp;space;%5Cphi_%7B0,2%7D%5Cright%29%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;&amp;amp;space;%5Cquad&amp;amp;space;%5C:&amp;amp;space;%5Ctimes&amp;amp;space;%5Csin&amp;amp;space;%5Cleft%28k&amp;amp;space;%5Cfrac%7Bx_1&amp;amp;space;+&amp;amp;space;x_2%7D%7B2%7D&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cfrac%7B%5Cphi_%7B0,1%7D&amp;amp;space;+&amp;amp;space;%5Cphi_%7B0,2%7D%7D%7B2%7D%5Cright%29&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7Bk&amp;amp;space;%5CDelta&amp;amp;space;x&amp;amp;space;+&amp;amp;space;%5CDelta&amp;amp;space;%5Cphi_0%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Cleft%28k_2&amp;amp;space;%5Clangle&amp;amp;space;x&amp;amp;space;%5Crangle&amp;amp;space;-&amp;amp;space;%5Comega&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Clangle&amp;amp;space;%5Cphi_0&amp;amp;space;%5Crangle%5Cright%29&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;/blockquote&gt;The condition for destructive interference is:&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} D (x, t) &amp;amp;= 0 \\ 2 a \cos \frac{\Delta \phi}{2} \sin \langle \phi \rangle &amp;amp;= 0 \\ \cos \frac{\Delta \phi}{2} &amp;amp;= 0 \\ \frac{\Delta \phi}{2} &amp;amp;= n \pi + \frac{\pi}{2}, \quad n \in \mathbb{Z} \\ \Delta \phi &amp;amp;= \left(2 n + 1 \right)\pi \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;D&amp;amp;space;%28x,&amp;amp;space;t%29&amp;amp;space;&amp;amp;=&amp;amp;space;0&amp;amp;space;%5C%5C&amp;amp;space;2&amp;amp;space;a&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Clangle&amp;amp;space;%5Cphi&amp;amp;space;%5Crangle&amp;amp;space;&amp;amp;=&amp;amp;space;0&amp;amp;space;%5C%5C&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;&amp;amp;=&amp;amp;space;0&amp;amp;space;%5C%5C&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;&amp;amp;=&amp;amp;space;n&amp;amp;space;%5Cpi&amp;amp;space;+&amp;amp;space;%5Cfrac%7B%5Cpi%7D%7B2%7D,&amp;amp;space;%5Cquad&amp;amp;space;n&amp;amp;space;%5Cin&amp;amp;space;%5Cmathbb%7BZ%7D&amp;amp;space;%5C%5C&amp;amp;space;%5CDelta&amp;amp;space;%5Cphi&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cleft%282&amp;amp;space;n&amp;amp;space;+&amp;amp;space;1&amp;amp;space;%5Cright%29%5Cpi&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;/blockquote&gt;Similarly, for constructive interference:&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} D (x, t) &amp;amp;= \pm 2a \sin \langle \phi \rangle \\ 2 a \cos \frac{\Delta \phi}{2} \sin \langle \phi \rangle &amp;amp;= \pm 2a \sin \langle \phi \rangle \\ \cos \frac{\Delta \phi}{2} &amp;amp;= \pm 1 \\ \frac{\Delta \phi}{2} &amp;amp;= n \pi, \quad n \in \mathbb{Z} \\ \Delta \phi &amp;amp;= 2 n\pi \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;D&amp;amp;space;%28x,&amp;amp;space;t%29&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cpm&amp;amp;space;2a&amp;amp;space;%5Csin&amp;amp;space;%5Clangle&amp;amp;space;%5Cphi&amp;amp;space;%5Crangle&amp;amp;space;%5C%5C&amp;amp;space;2&amp;amp;space;a&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Clangle&amp;amp;space;%5Cphi&amp;amp;space;%5Crangle&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cpm&amp;amp;space;2a&amp;amp;space;%5Csin&amp;amp;space;%5Clangle&amp;amp;space;%5Cphi&amp;amp;space;%5Crangle&amp;amp;space;%5C%5C&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cpm&amp;amp;space;1&amp;amp;space;%5C%5C&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;&amp;amp;=&amp;amp;space;n&amp;amp;space;%5Cpi,&amp;amp;space;%5Cquad&amp;amp;space;n&amp;amp;space;%5Cin&amp;amp;space;%5Cmathbb%7BZ%7D&amp;amp;space;%5C%5C&amp;amp;space;%5CDelta&amp;amp;space;%5Cphi&amp;amp;space;&amp;amp;=&amp;amp;space;2&amp;amp;space;n%5Cpi&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Beat interference&lt;/b&gt;:&lt;br /&gt;
&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;x&lt;/i&gt; = &lt;i&gt;x&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;br /&gt;
&lt;i&gt;k&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt; = &lt;i&gt;k&lt;/i&gt; = &lt;i&gt;k&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;&lt;br /&gt;
&lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0,1&lt;/sub&gt; = &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0&lt;/sub&gt; = &lt;i&gt;ϕ&lt;/i&gt;&lt;sub&gt;0,2&lt;/sub&gt;&lt;br /&gt;
The displacement equation is:&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align*} &amp;amp; \quad \: D (x, t) \\ &amp;amp;= A \cos \frac{\Delta \phi}{2} \sin \langle \phi \rangle \\ &amp;amp;= A \cos \frac{\left(k x - \omega_1 t + \phi_0\right) - \left(k x - \omega_2 t + \phi_0\right)}{2} \\ &amp;amp; \quad \: \times \sin \frac{\left(k x - \omega_1 t + \phi_0\right) + \left(k x - \omega_2 t + \phi_0\right)}{2} \\ &amp;amp;= A \cos \left(\frac{\Delta \omega}{2} t\right) \sin \left(k x - \langle\omega\rangle t + \phi_0\right) \\ &amp;amp;= A \cos \omega_\text{mod} t \sin \left(k x - \langle\omega\rangle t + \phi_0\right) \end{align*}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign*%7D&amp;amp;space;&amp;amp;&amp;amp;space;%5Cquad&amp;amp;space;%5C:&amp;amp;space;D&amp;amp;space;%28x,&amp;amp;space;t%29&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5CDelta&amp;amp;space;%5Cphi%7D%7B2%7D&amp;amp;space;%5Csin&amp;amp;space;%5Clangle&amp;amp;space;%5Cphi&amp;amp;space;%5Crangle&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cfrac%7B%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Comega_1&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_0%5Cright%29&amp;amp;space;-&amp;amp;space;%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Comega_2&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_0%5Cright%29%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;&amp;amp;space;%5Cquad&amp;amp;space;%5C:&amp;amp;space;%5Ctimes&amp;amp;space;%5Csin&amp;amp;space;%5Cfrac%7B%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Comega_1&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_0%5Cright%29&amp;amp;space;+&amp;amp;space;%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Comega_2&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_0%5Cright%29%7D%7B2%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Cleft%28%5Cfrac%7B%5CDelta&amp;amp;space;%5Comega%7D%7B2%7D&amp;amp;space;t%5Cright%29&amp;amp;space;%5Csin&amp;amp;space;%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Clangle%5Comega%5Crangle&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_0%5Cright%29&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;A&amp;amp;space;%5Ccos&amp;amp;space;%5Comega_%5Ctext%7Bmod%7D&amp;amp;space;t&amp;amp;space;%5Csin&amp;amp;space;%5Cleft%28k&amp;amp;space;x&amp;amp;space;-&amp;amp;space;%5Clangle%5Comega%5Crangle&amp;amp;space;t&amp;amp;space;+&amp;amp;space;%5Cphi_0%5Cright%29&amp;amp;space;%5Cend%7Balign*%7D" /&gt;&lt;/a&gt;&lt;/blockquote&gt;where &lt;i&gt;ω&lt;/i&gt;&lt;sub&gt;mod&lt;/sub&gt; is the modulation angular frequency.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;Now, at last, I can show the general equations (approximations) for multiple-slit interference.&lt;br /&gt;
&lt;br /&gt;
For single-slits, the minima angles (&lt;i&gt;θ&lt;/i&gt;&lt;sub&gt;min&lt;/sub&gt;) can be found using:&lt;br /&gt;
&lt;i&gt;a&lt;/i&gt; sin &lt;i&gt;θ&lt;/i&gt;&lt;sub&gt;min&lt;/sub&gt; = &lt;i&gt;n&lt;/i&gt; &lt;i&gt;λ&lt;/i&gt; where &lt;i&gt;n&lt;/i&gt; is a positive integer and &lt;i&gt;a&lt;/i&gt; is the slit width.&lt;br /&gt;
&lt;br /&gt;
For double-slits, multiple-slits, or diffraction gratings, the primary maxima angles can be found using:&lt;br /&gt;
&lt;i&gt;d&lt;/i&gt; sin &lt;i&gt;θ&lt;/i&gt;&lt;sub&gt;max&lt;/sub&gt; = &lt;i&gt;n&lt;/i&gt; &lt;i&gt;λ&lt;/i&gt; where &lt;i&gt;n&lt;/i&gt; is zero or a positive integer and &lt;i&gt;d&lt;/i&gt; is the slit separation.&lt;br /&gt;
&lt;br /&gt;
The two results actually apply to any slit interference: &lt;i&gt;θ&lt;/i&gt;&lt;sub&gt;min&lt;/sub&gt; will be the &lt;i&gt;primary minima angles&lt;/i&gt; and &lt;i&gt;θ&lt;/i&gt;&lt;sub&gt;max&lt;/sub&gt; will be the &lt;i&gt;primary maxima angles&lt;/i&gt;. The shape of the intensity plot will always have an &lt;i&gt;envelope curve&lt;/i&gt; that is shaped like the intensity curve of a single-slit diffraction, and the minima of this envelope curve is the "primary minima".&lt;br /&gt;
&lt;br /&gt;
So that was my brief summary of light interference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-3157821024736254404?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/3157821024736254404/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/11/wave-interference.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3157821024736254404?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3157821024736254404?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/fuQKMjz2Tvo/wave-interference.html" title="wave interference" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/11/wave-interference.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4FQH45eyp7ImA9WxRWGUk.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-1074723137787775797</id><published>2008-11-01T17:31:00.023-04:00</published><updated>2008-11-05T23:15:11.023-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-05T23:15:11.023-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>reciprocal distribution</title><content type="html">&lt;i&gt;Here's another post on math stuff, although it's also implicitly related to computing.&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Suppose I generate a random real number &lt;i&gt;X&lt;/i&gt; between 0 and 1 with a uniform probability distribution. Let &lt;i&gt;Y&lt;/i&gt; = 1/&lt;i&gt;X&lt;/i&gt;. What is the probability distribution of &lt;i&gt;Y&lt;/i&gt;? What is the expected value of &lt;i&gt;Y&lt;/i&gt;?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To solve this question (which I asked myself), I would start by finding the probability distribution of &lt;i&gt;X&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
For me, the main problem is that this is a continuous probability distribution rather than a discrete one. Therefore, it makes no sense to ask the probability of getting, say, exactly 0.5. In discrete probability distributions, we can describe a function called "Pr" or the probability function. Let's take a dice distribution as an example. A dice can have 6 possible values: &lt;i&gt;D&lt;/i&gt; = {1, 2, 3, 4, 5, 6}. Each value has an equal probability of 1/6. We can define a probability function for it easily:&lt;br /&gt;
&lt;blockquote&gt;Pr(&lt;i&gt;D&lt;/i&gt; = &lt;i&gt;d&lt;/i&gt;) = 1/6 (this is read as: "the probability of random variable &lt;i&gt;D&lt;/i&gt; getting a &lt;i&gt;specific&lt;/i&gt; value of &lt;i&gt;d&lt;/i&gt; is 1/6")&lt;/blockquote&gt;This is a &lt;b&gt;discrete &lt;/b&gt;&lt;b&gt;uniform&lt;/b&gt;&lt;b&gt; distribution&lt;/b&gt;, because the probability is the same for every &lt;i&gt;d&lt;/i&gt;. The equivalent way of saying this is:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\Pr (D = d) = \begin{cases} d = 1: &amp;amp; \frac{1}{6} \\ d = 2: &amp;amp; \frac{1}{6} \\ d = 3: &amp;amp; \frac{1}{6} \\ d = 4: &amp;amp; \frac{1}{6} \\ d = 5: &amp;amp; \frac{1}{6} \\ d = 6: &amp;amp; \frac{1}{6} \end{cases}" src="http://www.codecogs.com/gif.latex?%5CPr&amp;amp;space;%28D&amp;amp;space;=&amp;amp;space;d%29&amp;amp;space;=&amp;amp;space;%5Cbegin%7Bcases%7D&amp;amp;space;d&amp;amp;space;=&amp;amp;space;1:&amp;amp;space;&amp;amp;&amp;amp;space;%5Cfrac%7B1%7D%7B6%7D&amp;amp;space;%5C%5C&amp;amp;space;d&amp;amp;space;=&amp;amp;space;2:&amp;amp;space;&amp;amp;&amp;amp;space;%5Cfrac%7B1%7D%7B6%7D&amp;amp;space;%5C%5C&amp;amp;space;d&amp;amp;space;=&amp;amp;space;3:&amp;amp;space;&amp;amp;&amp;amp;space;%5Cfrac%7B1%7D%7B6%7D&amp;amp;space;%5C%5C&amp;amp;space;d&amp;amp;space;=&amp;amp;space;4:&amp;amp;space;&amp;amp;&amp;amp;space;%5Cfrac%7B1%7D%7B6%7D&amp;amp;space;%5C%5C&amp;amp;space;d&amp;amp;space;=&amp;amp;space;5:&amp;amp;space;&amp;amp;&amp;amp;space;%5Cfrac%7B1%7D%7B6%7D&amp;amp;space;%5C%5C&amp;amp;space;d&amp;amp;space;=&amp;amp;space;6:&amp;amp;space;&amp;amp;&amp;amp;space;%5Cfrac%7B1%7D%7B6%7D&amp;amp;space;%5Cend%7Bcases%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
While this form is rather redundant, it does explicitly show that we can define a specific probability for every value of &lt;i&gt;d&lt;/i&gt;. For a continuous distribution, it no longer makes sense to assign a probability to every possible value, since there is now an infinite number of possible values (continuous).&lt;br /&gt;
&lt;br /&gt;
However, it still makes sense to define a probability for every "chunk" of values. Consider the random real number &lt;i&gt;X&lt;/i&gt; between 0 and 1. It is absurd to ask for the probability of getting &lt;i&gt;X&lt;/i&gt; = 0.5, but it still makes sense to ask for the probability of 0.45 ≤ &lt;i&gt;X&lt;/i&gt; &amp;lt; 0.55. This is a range of possible &lt;i&gt;X&lt;/i&gt; values from 0.45 to 0.55. The width (Δ&lt;i&gt;x&lt;/i&gt;) of this range is 0.55 - 0.45 = 0.1. We can make use of something called &lt;b&gt;probability density function&lt;/b&gt;, &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;), as follows:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\Pr(0.4 \le X &amp;lt; 0.6) = \int_{0.4}^{0.6} f(x) \operatorname{d}\! x" src="http://www.codecogs.com/gif.latex?%5CPr%280.4&amp;amp;space;%5Cle&amp;amp;space;X&amp;amp;space;%3C&amp;amp;space;0.6%29&amp;amp;space;=&amp;amp;space;%5Cint_%7B0.4%7D%5E%7B0.6%7D&amp;amp;space;f%28x%29&amp;amp;space;%5Coperatorname%7Bd%7D%5C%21&amp;amp;space;x" /&gt;&lt;/a&gt;&lt;br /&gt;
This is in many ways similar to the frequency density used in histograms.&lt;br /&gt;
&lt;br /&gt;
Since the probability is defined by the integral of the probability density function (i.e. area under the &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;)), the total area under the probability density graph must be 1 in order for the total probability to be 1. This is done by &lt;b&gt;normalizing&lt;/b&gt; the function using a constant multiple.&lt;br /&gt;
&lt;br /&gt;
For example, a &lt;b&gt;continuous uniform distribution&lt;/b&gt; between &lt;i&gt;x&lt;/i&gt; = 0 and &lt;i&gt;x&lt;/i&gt; = 1is rather simple:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="f(x) = \begin{cases} 1, &amp;amp; x \in \left[0, 1\right] \\ 0, &amp;amp; x \notin \left[0, 1\right] \end{cases}" src="http://www.codecogs.com/gif.latex?f%28x%29&amp;amp;space;=&amp;amp;space;%5Cbegin%7Bcases%7D&amp;amp;space;1,&amp;amp;space;&amp;amp;&amp;amp;space;x&amp;amp;space;%5Cin&amp;amp;space;%5Cleft%5B0,&amp;amp;space;1%5Cright%5D&amp;amp;space;%5C%5C&amp;amp;space;0,&amp;amp;space;&amp;amp;&amp;amp;space;x&amp;amp;space;%5Cnotin&amp;amp;space;%5Cleft%5B0,&amp;amp;space;1%5Cright%5D&amp;amp;space;%5Cend%7Bcases%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
It's easy to see that this graph is already normalized since the area is just a 1 by 1 square. This is just the distribution of the variable &lt;i&gt;X&lt;/i&gt; in the question posed in the beginning of this post. Now that we know the probability density of &lt;i&gt;X&lt;/i&gt;, how can we find the probability density of &lt;i&gt;Y&lt;/i&gt;?&lt;br /&gt;
&lt;br /&gt;
Suppose I pick 2 values &lt;i&gt;a&lt;/i&gt; and &lt;i&gt;b&lt;/i&gt; (and &lt;i&gt;a&lt;/i&gt; &amp;lt; &lt;i&gt;b&lt;/i&gt;) What is the probability of &lt;i&gt;X&lt;/i&gt; between these two values? It is simply Pr(&lt;i&gt;a&lt;/i&gt; ≤ &lt;i&gt;X&lt;/i&gt; &amp;lt; &lt;i&gt;b&lt;/i&gt;). By intuition, it should make sense that the probability of &lt;i&gt;Y&lt;/i&gt; between 1/&lt;i&gt;b&lt;/i&gt; and 1/&lt;i&gt;a&lt;/i&gt; (I swapped the order because 1/&lt;i&gt;b&lt;/i&gt; &amp;lt; 1/&lt;i&gt;a&lt;/i&gt;) should be equal to the probability of &lt;i&gt;X&lt;/i&gt; between &lt;i&gt;a&lt;/i&gt; and &lt;i&gt;b&lt;/i&gt;, since &lt;i&gt;x&lt;/i&gt; = &lt;i&gt;a&lt;/i&gt; implies &lt;i&gt;y&lt;/i&gt; = 1/&lt;i&gt;a&lt;/i&gt; and &lt;i&gt;x&lt;/i&gt; = &lt;i&gt;b&lt;/i&gt; implies &lt;i&gt;y&lt;/i&gt; = 1/&lt;i&gt;b&lt;/i&gt;. Therefore, we have the equation:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\Pr\left(a \le X \le b \right) = \Pr\left(\frac{1}{b} \le Y \le \frac{1}{a} \right)" src="http://www.codecogs.com/gif.latex?%5CPr%5Cleft%28a&amp;amp;space;%5Cle&amp;amp;space;X&amp;amp;space;%5Cle&amp;amp;space;b&amp;amp;space;%5Cright%29&amp;amp;space;=&amp;amp;space;%5CPr%5Cleft%28%5Cfrac%7B1%7D%7Bb%7D&amp;amp;space;%5Cle&amp;amp;space;Y&amp;amp;space;%5Cle&amp;amp;space;%5Cfrac%7B1%7D%7Ba%7D&amp;amp;space;%5Cright%29" /&gt;&lt;/a&gt;&lt;br /&gt;
Using the integral form:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\int_a^b f(x)\operatorname{d}\!x = \int_{1/b}^{1/a} g(y)\operatorname{d}\!y" src="http://www.codecogs.com/gif.latex?%5Cint_a%5Eb&amp;amp;space;f%28x%29%5Coperatorname%7Bd%7D%5C%21x&amp;amp;space;=&amp;amp;space;%5Cint_%7B1/b%7D%5E%7B1/a%7D&amp;amp;space;g%28y%29%5Coperatorname%7Bd%7D%5C%21y" /&gt;&lt;/a&gt;&lt;br /&gt;
where &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;) and &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;) are the probability densities of &lt;i&gt;X&lt;/i&gt; and &lt;i&gt;Y&lt;/i&gt; respectively. Differentiate both sides with respect to &lt;i&gt;a&lt;/i&gt; and simplify the expression:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align} \frac{\operatorname{d}}{\operatorname{d}\!a} \int_a^b f(x)\operatorname{d}\!x &amp;amp;= \frac{\operatorname{d}}{\operatorname{d}\!a} \int_{1/b}^{1/a} g(y)\operatorname{d}\!y \\ - \frac{\operatorname{d}}{\operatorname{d}\!a} \int_b^a f(x)\operatorname{d}\!x &amp;amp;= \frac{\operatorname{d}\!\left(1/a\right)}{\operatorname{d}\!a} \left[\frac{\operatorname{d}}{\operatorname{d}\!\left(1/a\right)} \int_{1/b}^{1/a} g(y)\operatorname{d}\!y \right] \\ - f(a) &amp;amp;= -\frac{1}{a^2}g\left(\frac{1}{a}\right) \\ a^2 f(a) &amp;amp;= g\left(\frac{1}{a}\right) \\ \frac{1}{y^2} f\left(\frac{1}{y}\right) &amp;amp;= g\left(y\right) \end{align}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign%7D&amp;amp;space;%5Cfrac%7B%5Coperatorname%7Bd%7D%7D%7B%5Coperatorname%7Bd%7D%5C%21a%7D&amp;amp;space;%5Cint_a%5Eb&amp;amp;space;f%28x%29%5Coperatorname%7Bd%7D%5C%21x&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cfrac%7B%5Coperatorname%7Bd%7D%7D%7B%5Coperatorname%7Bd%7D%5C%21a%7D&amp;amp;space;%5Cint_%7B1/b%7D%5E%7B1/a%7D&amp;amp;space;g%28y%29%5Coperatorname%7Bd%7D%5C%21y&amp;amp;space;%5C%5C&amp;amp;space;-&amp;amp;space;%5Cfrac%7B%5Coperatorname%7Bd%7D%7D%7B%5Coperatorname%7Bd%7D%5C%21a%7D&amp;amp;space;%5Cint_b%5Ea&amp;amp;space;f%28x%29%5Coperatorname%7Bd%7D%5C%21x&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cfrac%7B%5Coperatorname%7Bd%7D%5C%21%5Cleft%281/a%5Cright%29%7D%7B%5Coperatorname%7Bd%7D%5C%21a%7D&amp;amp;space;%5Cleft%5B%5Cfrac%7B%5Coperatorname%7Bd%7D%7D%7B%5Coperatorname%7Bd%7D%5C%21%5Cleft%281/a%5Cright%29%7D&amp;amp;space;%5Cint_%7B1/b%7D%5E%7B1/a%7D&amp;amp;space;g%28y%29%5Coperatorname%7Bd%7D%5C%21y&amp;amp;space;%5Cright%5D&amp;amp;space;%5C%5C&amp;amp;space;-&amp;amp;space;f%28a%29&amp;amp;space;&amp;amp;=&amp;amp;space;-%5Cfrac%7B1%7D%7Ba%5E2%7Dg%5Cleft%28%5Cfrac%7B1%7D%7Ba%7D%5Cright%29&amp;amp;space;%5C%5C&amp;amp;space;a%5E2&amp;amp;space;f%28a%29&amp;amp;space;&amp;amp;=&amp;amp;space;g%5Cleft%28%5Cfrac%7B1%7D%7Ba%7D%5Cright%29&amp;amp;space;%5C%5C&amp;amp;space;%5Cfrac%7B1%7D%7By%5E2%7D&amp;amp;space;f%5Cleft%28%5Cfrac%7B1%7D%7By%7D%5Cright%29&amp;amp;space;&amp;amp;=&amp;amp;space;g%5Cleft%28y%5Cright%29&amp;amp;space;%5Cend%7Balign%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
Explanation:&lt;br /&gt;
Step (2) left side: swap the limits of integral, thus swapping the sign.&lt;br /&gt;
Step (2) right side: use chain rule to get the differentiation with respect to 1/&lt;i&gt;a&lt;/i&gt; instead of &lt;i&gt;a&lt;/i&gt;.&lt;br /&gt;
Step (3) left side: apply fundamental theorem of calculus.&lt;br /&gt;
Step (3) right side: differentiate 1/&lt;i&gt;a&lt;/i&gt; and apply the fundamental theorem of calculus to the integral part.&lt;br /&gt;
Step (4): multiply both sides by -&lt;i&gt;a&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt;.&lt;br /&gt;
Step (5): substitute &lt;i&gt;a&lt;/i&gt; = 1/&lt;i&gt;y&lt;/i&gt; so that &lt;i&gt;g&lt;/i&gt; is in terms of &lt;i&gt;y&lt;/i&gt; (the &lt;i&gt;y&lt;/i&gt; here does not have much to do with the &lt;i&gt;y&lt;/i&gt; in (1) and (2)).&lt;br /&gt;
&lt;br /&gt;
Now we have an expression of &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;), in terms of &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;) (which is the same as &lt;i&gt;f&lt;/i&gt;(1/&lt;i&gt;y&lt;/i&gt;), since &lt;i&gt;x&lt;/i&gt; = 1/&lt;i&gt;y&lt;/i&gt;). Since &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;) is a uniform distribution with &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;) = 1 for all values of &lt;i&gt;x&lt;/i&gt; within [0, 1], we can define &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;) for all values of &lt;i&gt;y&lt;/i&gt; within [1/1, 1/0), or [1, ∞), to be 1/&lt;i&gt;y&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt;. Because &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;) is zero elsewhere, &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;) is zero elsewhere as well. So this is the formula of &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;):&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="g\left(y\right) &amp;amp;= \begin{cases} \frac{1}{y^2}, &amp;amp; x \in \left[1, \infty\right) \\ 0, &amp;amp; x \notin \left[1, \infty\right) \end{cases}" src="http://www.codecogs.com/gif.latex?g%5Cleft%28y%5Cright%29&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cbegin%7Bcases%7D&amp;amp;space;%5Cfrac%7B1%7D%7By%5E2%7D,&amp;amp;space;&amp;amp;&amp;amp;space;x&amp;amp;space;%5Cin&amp;amp;space;%5Cleft%5B1,&amp;amp;space;%5Cinfty%5Cright%29&amp;amp;space;%5C%5C&amp;amp;space;0,&amp;amp;space;&amp;amp;&amp;amp;space;x&amp;amp;space;%5Cnotin&amp;amp;space;%5Cleft%5B1,&amp;amp;space;%5Cinfty%5Cright%29&amp;amp;space;%5Cend%7Bcases%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
While not obvious from the equation, this function is definitely normalized, and can be easily proven to be so using improper integrals.&lt;br /&gt;
&lt;br /&gt;
So, the aim was to find an expected value for the distribution. What is the formula for a continuous distribution? The expected value for a discrete random variable &lt;i&gt;X&lt;/i&gt; is defined by:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\operatorname{E}(X) = \sum_i x_i \Pr\left(X = x_i\right)" src="http://www.codecogs.com/gif.latex?%5Coperatorname%7BE%7D%28X%29&amp;amp;space;=&amp;amp;space;%5Csum_i&amp;amp;space;x_i&amp;amp;space;%5CPr%5Cleft%28X&amp;amp;space;=&amp;amp;space;x_i%5Cright%29" /&gt;&lt;/a&gt;&lt;br /&gt;
Therefore, by analogy, the expected value for a continuous random variable (with probability density &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;))should be:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\operatorname{E}(X) = \int_{-\infty}^{\infty} x f(x) \operatorname{d}\!x" src="http://www.codecogs.com/gif.latex?%5Coperatorname%7BE%7D%28X%29&amp;amp;space;=&amp;amp;space;%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D&amp;amp;space;x&amp;amp;space;f%28x%29&amp;amp;space;%5Coperatorname%7Bd%7D%5C%21x" /&gt;&lt;/a&gt;&lt;br /&gt;
So the next step would be to evaluate this integral for &lt;i&gt;Y&lt;/i&gt;:&lt;br /&gt;
&lt;a href="http://www.codecogs.com/"&gt;&lt;img alt="\begin{align} \operatorname{E}(X) &amp;amp;= \int_{-\infty}^{\infty} y\, g(y) \operatorname{d}\!y \\ &amp;amp;= \int_{-\infty}^1 y \cdot 0 \operatorname{d}\!y + \int_1^{\infty} y \cdot \frac{1}{y^2} \operatorname{d}\!y \\ &amp;amp;= 0 + \int_1^{\infty} \frac{\operatorname{d}\!y}{y} \\ &amp;amp;= \infty \end{align}" src="http://www.codecogs.com/gif.latex?%5Cbegin%7Balign%7D&amp;amp;space;%5Coperatorname%7BE%7D%28X%29&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D&amp;amp;space;y%5C,&amp;amp;space;g%28y%29&amp;amp;space;%5Coperatorname%7Bd%7D%5C%21y&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cint_%7B-%5Cinfty%7D%5E1&amp;amp;space;y&amp;amp;space;%5Ccdot&amp;amp;space;0&amp;amp;space;%5Coperatorname%7Bd%7D%5C%21y&amp;amp;space;+&amp;amp;space;%5Cint_1%5E%7B%5Cinfty%7D&amp;amp;space;y&amp;amp;space;%5Ccdot&amp;amp;space;%5Cfrac%7B1%7D%7By%5E2%7D&amp;amp;space;%5Coperatorname%7Bd%7D%5C%21y&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;0&amp;amp;space;+&amp;amp;space;%5Cint_1%5E%7B%5Cinfty%7D&amp;amp;space;%5Cfrac%7B%5Coperatorname%7Bd%7D%5C%21y%7D%7By%7D&amp;amp;space;%5C%5C&amp;amp;space;&amp;amp;=&amp;amp;space;%5Cinfty&amp;amp;space;%5Cend%7Balign%7D" /&gt;&lt;/a&gt;&lt;br /&gt;
Explanation:&lt;br /&gt;
Step (2): Split the integral into 2 parts, one for &lt;i&gt;x&lt;/i&gt; ≥ 1 and one for &lt;i&gt;x&lt;/i&gt; &amp;lt; 1. This is done because &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;) is defined piecewise.&lt;br /&gt;
Step (3): Integral of zero is zero. Simplification.&lt;br /&gt;
Step (4): Integral of 1/&lt;i&gt;y&lt;/i&gt; is divergent because the natural logarithmic function is unbounded.&lt;br /&gt;
&lt;br /&gt;
It looks like the expected value is infinite. What does that mean? Basically, if one were to simulate this on a real computer program (tried that myself) to calculate expected value, one could get utterly random values stretching from very small to very large.&lt;br /&gt;
&lt;br /&gt;
The expected value of &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;) is infinite - this is a boring conclusion, isn't it? Well, over the steps listed here, I have found a technique that allows me to derive the probability density of one variable based on a formula that links two continuous variables, with the second variable given. So it was not a complete waste of time. This is the general solution for a variable &lt;i&gt;Y&lt;/i&gt; linked to &lt;i&gt;X&lt;/i&gt; by a formula &lt;i&gt;x&lt;/i&gt; = &lt;i&gt;u&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;):&lt;br /&gt;
&lt;a href="http://www.codecogs.com"&gt;&lt;img src="http://www.codecogs.com/gif.latex?g\!\left(y\right)&amp;space;=&amp;space;f\!\left[u\!\left(y\right)\right]&amp;space;\left|\frac{\operatorname{d}\!u}{\operatorname{d}\!y}\right|" alt="g\!\left(y\right) = f\!\left[u\!\left(y\right)\right] \left|\frac{\operatorname{d}\!u}{\operatorname{d}\!y}\right|"/&gt;&lt;/a&gt;&lt;br /&gt;
where &lt;i&gt;f&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;) is the probability density of &lt;i&gt;X&lt;/i&gt; and &lt;i&gt;g&lt;/i&gt;(&lt;i&gt;y&lt;/i&gt;) is the probability density of &lt;i&gt;Y&lt;/i&gt;. The formula does not work if u(x) is multivalued. Still, I think this formula should work under ordinary conditions. If there's any mistakes in this post, feel free to leave a comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-1074723137787775797?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/1074723137787775797/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/11/reciprocal-distribution.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1074723137787775797?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1074723137787775797?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/-A_RTrd86Lo/reciprocal-distribution.html" title="reciprocal distribution" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/11/reciprocal-distribution.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQNRHs7eyp7ImA9WxRXGUg.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-6934859094446140618</id><published>2008-10-25T11:28:00.031-04:00</published><updated>2008-10-25T12:33:15.503-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-25T12:33:15.503-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><title>Ajax snippets</title><content type="html">I decided to post a few snippets from my recent Ajax programming. There are quite a few snippets out there on the Web, but the one's I found were imperfect, so I thought I should post some tricks of my own.&lt;br /&gt;
&lt;br /&gt;
Firstly, declare an &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;xmlHttpRequest&lt;/span&gt; object and create it:&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: 0.8em;"&gt;var xmlHttpRequest = false;&lt;br /&gt;
if (window.XMLHttpRequest)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlHttpRequest = new XMLHttpRequest();&lt;br /&gt;
else if (window.ActiveXObject)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');&lt;/blockquote&gt;&lt;br /&gt;
Next, here's a nifty function that allows you to send POST commands:&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: 0.8em;"&gt;// url = URL you are posting to&lt;br /&gt;
// data = data to be posted, e.g. 'variA=1&amp;amp;varB=2'&lt;br /&gt;
// action = pointer to a function that is executed&lt;br /&gt;
// when posting is complete; it must accept&lt;br /&gt;
// arguments: errorCode &amp;amp; response;&lt;br /&gt;
// errorCode will be 0 if no error&lt;br /&gt;
function ajaxPost(url, data, action) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlHttpRequest.open('POST', url, true);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlHttpRequest.send(data);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlHttpRequest.onreadystatechange = function() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (xmlHttpRequest.readyState == 4) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (xmlHttpRequest.status == 200) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;action(0, xmlHttpRequest.responseText);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;action(xmlHttpRequest.status, '');&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br /&gt;
}&lt;/blockquote&gt;Now, the hard part - this is a piece of code that searches recursively throughout a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;form /&amp;gt;&lt;/span&gt; element, so that all the data fields (e.g. &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;input /&amp;gt;&lt;/span&gt;) are collected into the POST request:&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: 0.8em;"&gt;// node = HTML element, usually &amp;lt;form /&amp;gt;&lt;br /&gt;
function getFormData(node) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var data = '';&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;switch (String(node.tagName).toLowerCase()) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 'input':&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;switch (String(node.type).toLowerCase()) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 'checkbox':&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data += node.name + '=' + escape(node.checked ? node.value : '') + '&amp;amp;';&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 'hidden':&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data += node.name + '=' + escape(node.value) + '&amp;amp;';&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 'radio':&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (node.checked)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data += node.name + '=' + escape(node.value) + '&amp;amp;';&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 'text':&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data += node.name + '=' + escape(node.value) + '&amp;amp;';&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 'select':&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data += node.name + '=' + escape(node.options[node.selectedIndex].value) + '&amp;amp;';&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 'textarea':&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data += node.name + '=' + escape(node.value) + '&amp;amp;';&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;default:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (var i = 0; i &amp;lt; node.childNodes.length; i++) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (node.childNodes[i].nodeType == 1) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data += getFormData(node.childNodes[i]); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return data; &lt;br /&gt;
}&lt;/blockquote&gt;The hardest part was to actually prevent the infinite loop that kept happening as a result of this iteration. Later, I realized that the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;var&lt;/span&gt; in the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;for&lt;/span&gt; loop was essential for it to work - if only JavaScript had complained that &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;i&lt;/span&gt; was undefined or something. Sigh.&lt;br /&gt;
&lt;br /&gt;
And now, the sample code that actually uses these abstract functions:&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: 0.8em;"&gt;// formId = id of the &amp;lt;form /&amp;gt; element&lt;br /&gt;
function submitForm(formId) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!xmlHttpRequest)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var formTag = document.getElementById(formId);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ajaxPost(formTag.action, getFormData(formTag), showResponse);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// display the response in a message box&lt;br /&gt;
function showResponse(errorCode, response) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(errorCode + ':' + response);&lt;br /&gt;
}&lt;/blockquote&gt;Simply place this function inside your &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;onclick&lt;/span&gt; attribute of the "Submit" button in your form.&lt;br /&gt;
&lt;br /&gt;
Thanks to these sources for teaching me basic Ajax (many of the snippets above are derived from what I found on these sites):&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://captain.at/howto-ajax-form-post-get.php"&gt;http://captain.at/howto-ajax-form-post-get.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://degraeve.com/reference/simple-ajax-example.php"&gt;http://degraeve.com/reference/simple-ajax-example.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://xul.fr/en-xml-ajax.html"&gt;http://xul.fr/en-xml-ajax.html&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;Feel free to comment, if I missed something or made a mistake.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-6934859094446140618?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/6934859094446140618/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/10/ajax-snippets.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/6934859094446140618?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/6934859094446140618?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/1mYJKSX4aJk/ajax-snippets.html" title="Ajax snippets" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/10/ajax-snippets.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMGQX05eCp7ImA9WxRQGEg.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-3938865602568922211</id><published>2008-10-12T18:27:00.000-04:00</published><updated>2008-10-12T18:27:00.320-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-12T18:27:00.320-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Chemistry" /><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><category scheme="http://www.blogger.com/atom/ns#" term="Physics" /><title>problem-solving skills</title><content type="html">&lt;i&gt;The following post pertains to most scientific word problems, i.e. physics, chemistry &amp;amp; math problems. It doesn't necessarily apply to humanities or other subjects. The information here is based on my own views and experiences. Science here refers to a generalized curriculum that also includes mathematics.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;There is a thing that isn't taught frequently in schools: &lt;b&gt;problem-solving skills&lt;/b&gt;. More often than not, people often understand the basic concepts that were taught during lectures/classes, but are unable to apply them to homework or test problems. Worse still, some students who couldn't understand a concept would be forced to "memorize" concepts, which doesn't work most of the time. Personally, I usually assume the responsibility of teaching how to understand concepts and work through problem to the instructor, but this is hardly true, mostly because of the lack of time and attention devoted to scientific curriculums. Unfortunately, this leads to more of a vicious cycle, because the lack of a solid scientific foundation in elementary school, middle school, and high school could only cause further problems upstream. And this is problem one reason why many students dislike science: to them, it's an exotic thing that they could never understand.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;From the perspective of someone who knows science, I find in impossible to believe why people have such a difficult time with science. Neither do many of the science teachers. What they often do (and to my disappointment) is that they would try to teach things at a level that is beyond what the students are capable of. They often attempt to explain pure concepts and fail to establish links between what is being explained and what has already been explained. The most crucial link (as far as I believe) to understanding a concept is to link it do something that is already known. From a psychological perspective, this quite logical: a concept that is isolated - has not been linked to any other concepts - will be very difficult to remember. This is one reason why I'm not an advocate of using mnemonics. Many use mnemonics purely for fun and often do grasp the reason behind why things are. Of course, there are some things that &lt;i&gt;do&lt;/i&gt; need blatant memorization, but in general, scientific topics often do not need them, because science is based on logic and empirical knowledge (however, there are things that are purely "conventional" [e.g. "7" colors of a rainbow, direction of a current, right-handedness of the 3D-Cartesian system, etc.] and students &lt;i&gt;must know&lt;/i&gt; so.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;In order for students to understand science, it would become necessary to show how problems should be tackled. One approach - which some instructors use - is to provide an "exhaustive" list of the ways in which a problem, based on some concept, could manifest itself in various different ways, and to teacher the students how those problems should be solved. An alternate approach is to provide a few examples of how problems are solved, and &lt;i&gt;hope&lt;/i&gt; the students can extrapolate those skills. I personally find neither satisfying. The first approach is by no means exhaustive: there is an infinite variation in which problems could come, figuratively speaking, and this often requires the student to memorize unnecessary knowledge. The second approach expects the student to know how problem-solving skills can be extrapolated. But the problem is that some students&lt;i&gt; may not even know&lt;/i&gt; how to solve a problem.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;My suggestion is to actually teach the problem-solving skills in the most general way possible. And this is what this post will be about - the most general way (that I can think of) in which scientific problems can be solved. This makes it redundant to teach specific steps for solving each &amp;amp; every type of problem that may or may not be encountered, since a student can simply learn just the basic rules for problem-solving.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Clarify&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The first step to any word problem is to strip the problem of useless information. In some sense, a word problem is really the convoluted version of something simple. Some types of information will be useful to solve one particular problem, while the same information may be useless in some other problem. So there's no general rule to determine which things to remove and which shouldn't be removed.&lt;br /&gt;
&lt;br /&gt;
Other than removing redundant information, it is necessary to highlight important information, and - especially important - understand what the question is asking for.&lt;br /&gt;
&lt;br /&gt;
Let's consider the following word problem:&lt;br /&gt;
&lt;blockquote&gt;A baseball falls from the rooftop in 5 seconds. Determine the height of the rooftop.&lt;/blockquote&gt;It's quite obvious that the falling object itself is not going to be useful here. So let's make that word problem a bit simpler:&lt;br /&gt;
&lt;blockquote&gt;object falls from rooftop;&lt;br /&gt;
time taken (&lt;i&gt;t&lt;/i&gt;) = 5 s;&lt;br /&gt;
height (&lt;i&gt;H&lt;/i&gt;) of rooftop = ?&lt;/blockquote&gt;I've removed some adjectives and verbs to make things especially clear (even though this problem itself might be pretty easy to understand for someone familiar with basic physics). Often, in science problems, numbers are quite important, although this is not necessarily always true, since some problem-writers tend to put in redundant numbers which aren't going to be used at all.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Sketch&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
When a problem has been simplified by removing redundant information, it becomes easier to sketch the problem. The usual way to do it is to start with a blank page, and start relating the information that you have read from the problem with knowledge and concepts learned during classes. Basically, try to construct a diagram of some sort (and don't be concerned about neatness) that describes the situation described in the problem. For example, in the problem discuss above, you might consider drawing an object falling from height = &lt;i&gt;H&lt;/i&gt; to height = 0. This step is not absolutely necessary, but it will help you if you get stuck.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Divide &amp;amp; Conquer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
When a problem is too big and contains too much information, it becomes necessary to convert it into smaller problems. This is how several equations can be chained together to find a single result using multiple variables. For example&lt;br /&gt;
&lt;blockquote&gt;A photon strikes an electron of a gaseous helium atom, causing the electron to be ejected. Given E&lt;sub&gt;I&lt;/sub&gt;(He) = 1520 kJ mol&lt;sup&gt;-1&lt;/sup&gt;, what is the wavelength of the photon?&lt;/blockquote&gt;Now this problem is actually quite involved. Let's start by clarifying the problem:&lt;br /&gt;
&lt;blockquote&gt;1 photon strikes 1 electron of 1 He&lt;sub&gt;(g)&lt;/sub&gt; atom;&lt;br /&gt;
electron ejected;&lt;br /&gt;
E&lt;sub&gt;I&lt;/sub&gt;(He) = 1520 kJ mol&lt;sup&gt;-1&lt;/sup&gt;;&lt;br /&gt;
photon wavelength (&lt;i&gt;λ&lt;/i&gt;) = ?&lt;/blockquote&gt;So we are given ionization energy (E&lt;sub&gt;I&lt;/sub&gt;), and we are asked to find wavelength. Let's start by working backwards: how does one get the wavelength (as far as chemistry is concerned)? The equation that is usually used to find wavelength in chemistry problems is:&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt; = &lt;i&gt;λ&lt;/i&gt; &lt;i&gt;ν&lt;/i&gt; (&lt;i&gt;c&lt;/i&gt; = speed of light, &lt;i&gt;ν&lt;/i&gt; = frequency)&lt;br /&gt;
Which variables are known? &lt;i&gt;c&lt;/i&gt; is known - no problem there. What is &lt;i&gt;ν&lt;/i&gt;? What is the usual way of finding frequency (other than using the previous equation)? Which equation contains a frequency term? Here it is:&lt;br /&gt;
&lt;i&gt;E&lt;/i&gt; = &lt;i&gt;h&lt;/i&gt; &lt;i&gt;ν&lt;/i&gt; (&lt;i&gt;E&lt;/i&gt; = energy, &lt;i&gt;h&lt;/i&gt; = Planck constant)&lt;br /&gt;
&lt;i&gt;h&lt;/i&gt; is, again, a constant that can be found easily. But where does energy, &lt;i&gt;E&lt;/i&gt;, come in? It seems that the problem has mentioned the word "energy" somewhere, but it's not in the right form: it's the ionization energy (of every mole of gaseous He). Did we ionize anything? Yes, we "ejected an electron" - that's ionization right there. How many moles of He did we ionize? One atom. How many moles is that? (These are a chain of questions that should be thought of while analyzing the problem, and don't have to be written down)&lt;br /&gt;
&lt;br /&gt;
The relationship between atoms and moles is (to derive this, just look at the units of &lt;i&gt;N&lt;/i&gt;&lt;sub&gt;A&lt;/sub&gt;, which is mol&lt;sup&gt;-1&lt;/sup&gt;, and compare that with the units of number of moles, which is mol; see how that cancels out so that the number of atoms has no units?):&lt;br /&gt;
(number of atoms) = (number of moles) × &lt;i&gt;N&lt;/i&gt;&lt;sub&gt;A&lt;/sub&gt;&lt;br /&gt;
Since we have the number of atoms (just 1), and we know what &lt;i&gt;N&lt;/i&gt;&lt;sub&gt;A&lt;/sub&gt; is, we can easily find the number of moles. With the number of moles at hand, we can use:&lt;br /&gt;
(ionization energy of &lt;i&gt;n&lt;/i&gt; mol) = &lt;i&gt;n&lt;/i&gt; mol × (ionization energy of each mol)&lt;br /&gt;
Again, this can simply be derived by looking at the units of ionization energy, which implies that we must multiply it by the number of moles to get rid of the mol&lt;sup&gt;-1&lt;/sup&gt;. Now, with the ionization energy of &lt;i&gt;n&lt;/i&gt; mol (which in this case will be for 1 atom), we can equate this energy with the energy that we desperately needed for &lt;i&gt;E&lt;/i&gt; = &lt;i&gt;h&lt;/i&gt; &lt;i&gt;ν&lt;/i&gt;. Now the problem is complete, we just need to plug in the numbers. This is a typical example of how a problem can lead to several smaller problems, and each individual problem must be dealt with separately&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Algebra&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Most of the time, one should not solve the problem without equations, especially for unfamiliar problems. Try to list every formula that might be related to the problem, and see which ones are applicable here (this is why when remembering formulas, &lt;i&gt;do&lt;/i&gt; remember &lt;i&gt;when&lt;/i&gt; they are applicable). For example, an object in free fall (the problem discussed above) will typically accelerate at a constant rate due to gravity (air resistance ignored). Therefore, the equations of motion for objects in free fall can be used here:&lt;br /&gt;
&lt;i&gt;s&lt;/i&gt; = &lt;i&gt;u t&lt;/i&gt; + 0.5 &lt;i&gt;a t&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;v&lt;/i&gt; = &lt;i&gt;u&lt;/i&gt; + &lt;i&gt;a t&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;v&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; = &lt;i&gt;u&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; + 2 &lt;i&gt;a s&lt;/i&gt;&lt;br /&gt;
In this problem, none of the variables are given directly. But some are given implicitly. For example, &lt;i&gt;a&lt;/i&gt; = &lt;i&gt;g&lt;/i&gt; = 9.81 m s&lt;sup&gt;-2&lt;/sup&gt; (acceleration of gravity), while &lt;i&gt;u&lt;/i&gt; = 0 m s&lt;sup&gt;-1&lt;/sup&gt; (initial velocity) and &lt;i&gt;t&lt;/i&gt; = 5 s (time taken). Hence, the first equation is most applicable because we have just one variable missing: &lt;i&gt;s&lt;/i&gt;, which is the distance traveled by the falling object, i.e. the height of the rooftop. As you can see here, it is important to establish relationships between things that are already known (knowledge) and things that might vary from situation to situation (the problem). With sufficient practice, this will become very easy for known problems.&lt;br /&gt;
&lt;br /&gt;
It is also important to realize that sometimes equations don't give the answer directly, or one may have to construct the equation using a set of known rules. For example:&lt;br /&gt;
&lt;blockquote&gt;The mean of 3 consecutive numbers is 5. What are these 3 numbers?&lt;/blockquote&gt;In this case, one should always start by constructing an equation &lt;i&gt;in terms of unknown variables&lt;/i&gt;. Don't fear unknown variables. Without them, many complicated problems could go unsolved. So start by writing the equations in terms of them, and worry about finding them later.&lt;br /&gt;
&lt;br /&gt;
In this problem, let's call the 3 consecutive numbers: &lt;i&gt;a&lt;/i&gt;, &lt;i&gt;b&lt;/i&gt;, and &lt;i&gt;c&lt;/i&gt;. From the equation for mean:&lt;br /&gt;
(&lt;i&gt;a&lt;/i&gt; + &lt;i&gt;b&lt;/i&gt; + &lt;i&gt;c&lt;/i&gt;) / 3 = 5&lt;br /&gt;
Because there are 3 different unknown variables, we need 3 non-equivalent equations (by that, I mean 3 equations that are &lt;i&gt;not equivalent&lt;/i&gt; to each other). It's easy to construct a few more:&lt;br /&gt;
&lt;i&gt;b&lt;/i&gt; = &lt;i&gt;a&lt;/i&gt; + 1&lt;br /&gt;
&lt;i&gt;c&lt;/i&gt; = &lt;i&gt;b&lt;/i&gt; + 1&lt;br /&gt;
Now we have 3 equations. The next step would be to solve them, and this is why it is necessary to learn basic algebraic skills. (Be careful with equations, label the variables correctly: some variables may not be equal to another, so subscripts may be required to differentiate them.) &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Skill&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The process of solving problems is a skill that can only be acquired through practice. Therefore, it is necessary for a student to learn this skill from day one of science class. Over a sufficiently long period of time, a student should be capable of solving problems with ease. But this is by no means a short period of time. Thus, I would say that this skill is &lt;i&gt;absolutely essential&lt;/i&gt; and should've been taught from the beginning. Once a student has grasped this skill even partially, practice and further practice will be able to allow the student to learn the skill even better (like a positive feedback loop). Somethings can only be acquired with hindsight - when a students learns a method of solving something from the instructor, hindsight and practice will be able to provide the foresight necessary to predict how a certain problem should be solved, without going through all these stages mentioned. At the optimal level, a students will be capable of solving problems without even thinking any of these steps. It will become a natural habit that always goes unnoticed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-3938865602568922211?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/3938865602568922211/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/10/problem-solving-skills.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3938865602568922211?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3938865602568922211?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/mXI5H5gIZVY/problem-solving-skills.html" title="problem-solving skills" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/10/problem-solving-skills.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IHSH44fip7ImA9WxRRGUQ.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-4240022152846546005</id><published>2008-10-02T21:37:00.002-04:00</published><updated>2008-10-02T22:05:39.036-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-02T22:05:39.036-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><title>addons for Firefox</title><content type="html">Okay, just a quick post. I've been using quite a few Firefox add-ons, and there are some I consider very useful.&lt;br /&gt;
&lt;br /&gt;
These are my recommended add-ons (in alphabetical order):&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1865"&gt;AdBlock Plus&lt;/a&gt;&lt;/b&gt; - most of the time, I don't even notice this add-on. But I have to admit, the only reason why I didn't notice was that I &lt;i&gt;didn't&lt;/i&gt; see any ads. I consider AdBlock to be a very useful extension, and the best thing is that you probably won't notice it.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1843"&gt;Firebug&lt;/a&gt;&lt;/b&gt; - the most useful tool for analyzing webpages for any web developer. (If you aren't a web developer, then it may not be useful to you.) In general, you would rather look at the neatly generated HTML code in Firebug than to look at the HTML page source itself (which is usually messy), and it also provides tools to view the CSS style of each element. You can even dynamically change the webpage you are viewing with Firebug!&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/2410"&gt;Foxmarks Bookmark Synchronizer&lt;/a&gt;&lt;/b&gt; - if you use bookmarks on various computers or OS's, then you might want this so that you can synchronizes your bookmarks across computers. Most of the time, it works pretty well at synchronizing, but from my experience, it is not a "perfect" solution (there are some weird "glitches" occasionally, especially if you don't know what you are doing). Still, it's really useful and definitely worth using.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/2464"&gt;FoxyProxy&lt;/a&gt;&lt;/b&gt; - this is really useful if you surf using proxies. If you use Tor often, and want Firefox to use Tor only when necessary, this can be a time-saver indeed. Once it knows your basic filters, it will automatically use the Tor proxy when you need it. If you want to turn it on temporarily, you can just click the icon on the right of the status bar. It certainly saves a lot of time. (If you don't use proxies, then this is not applicable to you.)&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1419"&gt;IE Tabs&lt;/a&gt;&lt;/b&gt; - this is my favorite way of viewing pages the require Internet Explorer. Instead of view IE in its own window, you just click and it creates a tab within Firefox that emulates IE. Again, a time-saver, and you don't even have to run Internet Explorer.&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;Note: &lt;/b&gt;This is &lt;i&gt;not&lt;/i&gt; an ad of any kind (although my tone was a bit like that); I'm just suggesting add-ons that I personally consider useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-4240022152846546005?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/4240022152846546005/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/10/addons-for-firefox.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/4240022152846546005?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/4240022152846546005?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/3dWyo3k7xHg/addons-for-firefox.html" title="addons for Firefox" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/10/addons-for-firefox.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcEQnc_fSp7ImA9WxRSGEU.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-6027533169869129358</id><published>2008-09-18T21:48:00.001-04:00</published><updated>2008-09-20T00:13:23.945-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-20T00:13:23.945-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><category scheme="http://www.blogger.com/atom/ns#" term="Physics" /><title>error propagation</title><content type="html">Recently, I've been working on my physics lab reports. The main theoretical concerns are about error analysis. This means there's a lot of equations to mess around: specifically the propagation of errors.&lt;br /&gt;
&lt;br /&gt;
The first time I learned about error propagation (under a different name) was at pre-college level high school (i.e. AS-Level). It sounded simply, and the basic equations were as follows (in summarized form):&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{a \pm b} &amp;amp;= \error_a + \error_b
\\
\error_{Ba} &amp;amp;= B \error_a
\\
{\error_{ab} \over \left|ab\right|} = {\error_{a \over b} \over \left|a \over b\right|}  &amp;amp;= {\error_a \over \left|a\right|} + {\error_b \over \left|b\right|}
\\
{\error_{a^B} \over \left|a^B\right| } &amp;amp;= \left|B\right| {\error_a \over \left|a\right|}
\end{align*}" title="\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{a \pm b} &amp;amp;= \error_a + \error_b
\\
\error_{Ba} &amp;amp;= B \error_a
\\
{\error_{ab} \over \left|ab\right|} = {\error_{a \over b} \over \left|a \over b\right|}  &amp;amp;= {\error_a \over \left|a\right|} + {\error_b \over \left|b\right|}
\\
{\error_{a^B} \over \left|a^B\right| } &amp;amp;= \left|B\right| {\error_a \over \left|a\right|}
\end{align*}" alt="\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{a \pm b} &amp;amp;= \error_a + \error_b
\\
\error_{Ba} &amp;amp;= B \error_a
\\
{\error_{ab} \over \left|ab\right|} = {\error_{a \over b} \over \left|a \over b\right|}  &amp;amp;= {\error_a \over \left|a\right|} + {\error_b \over \left|b\right|}
\\
{\error_{a^B} \over \left|a^B\right| } &amp;amp;= \left|B\right| {\error_a \over \left|a\right|}
\end{align*}" style="vertical-align:-2pt;" /&gt;&lt;br /&gt;
Notice that:&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\newcommand{\error}{\operatorname{\boldsymbol{\sigma}}}
\error_u \over \left|u\right|" title="\newcommand{\error}{\operatorname{\boldsymbol{\sigma}}}
\error_u \over \left|u\right|" alt="\newcommand{\error}{\operatorname{\boldsymbol{\sigma}}}
\error_u \over \left|u\right|" style="vertical-align:-2pt;" /&gt;&lt;br /&gt;
is simply the fractional error of &lt;i&gt;u&lt;/i&gt;, whatever &lt;i&gt;u&lt;/i&gt; might be.&lt;br /&gt;
&lt;br /&gt;
However, the above equations can be replaced with quadratures if the uncertainty is a standard error and the measurements are independent:&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\newcommand{\error}{\operatorname{\boldsymbol{\sigma}}}
\begin{align*}
\error_{a \pm b}^2 &amp;amp;= \error_a^2 + \error_b^2
\\
\left({\error_{ab} \over ab}\right)^2 = \left({\error_{a \over b} \over {a \over b}}\right)^2 &amp;amp;= \left(\error_a \over a\right)^2 + \left(\error_b \over b\right)^2
\end{align*}" title="\newcommand{\error}{\operatorname{\boldsymbol{\sigma}}}
\begin{align*}
\error_{a \pm b}^2 &amp;amp;= \error_a^2 + \error_b^2
\\
\left({\error_{ab} \over ab}\right)^2 = \left({\error_{a \over b} \over {a \over b}}\right)^2 &amp;amp;= \left(\error_a \over a\right)^2 + \left(\error_b \over b\right)^2
\end{align*}" alt="\newcommand{\error}{\operatorname{\boldsymbol{\sigma}}}
\begin{align*}
\error_{a \pm b}^2 &amp;amp;= \error_a^2 + \error_b^2
\\
\left({\error_{ab} \over ab}\right)^2 = \left({\error_{a \over b} \over {a \over b}}\right)^2 &amp;amp;= \left(\error_a \over a\right)^2 + \left(\error_b \over b\right)^2
\end{align*}" style="vertical-align:-2pt;" /&gt;&lt;br /&gt;
&lt;br /&gt;
Here's the general formula that applies to any multivariable function &lt;i&gt;f&lt;/i&gt; of &lt;i&gt;a&lt;/i&gt;, &lt;i&gt;b&lt;/i&gt;, &lt;i&gt;c&lt;/i&gt;, etc:&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{f(a, b, c, \,\cdots)} = \left| \partial f \over \partial a \right| \error_a + \left| \partial f \over \partial b \right| \error_b + \left| \partial f \over \partial c \right| \error_c + \cdots
\end{align*}" title="\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{f(a, b, c, \,\cdots)} = \left| \partial f \over \partial a \right| \error_a + \left| \partial f \over \partial b \right| \error_b + \left| \partial f \over \partial c \right| \error_c + \cdots
\end{align*}" alt="\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{f(a, b, c, \,\cdots)} = \left| \partial f \over \partial a \right| \error_a + \left| \partial f \over \partial b \right| \error_b + \left| \partial f \over \partial c \right| \error_c + \cdots
\end{align*}" style="vertical-align:-2pt;" /&gt;&lt;br /&gt;
&lt;br /&gt;
Again, if quadratures are to be used (if uncertainties are standard errors and the variables are independent)&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{f(a, b, c, \,\cdots)}^2 = \left( {\partial f \over \partial a} \error_a \right)^2 + \left( {\partial f \over \partial b} \error_b \right)^2 + \left( {\partial f \over \partial c} \error_c \right)^2 + \cdots
\end{align*}" title="\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{f(a, b, c, \,\cdots)}^2 = \left( {\partial f \over \partial a} \error_a \right)^2 + \left( {\partial f \over \partial b} \error_b \right)^2 + \left( {\partial f \over \partial c} \error_c \right)^2 + \cdots
\end{align*}" alt="\newcommand{\error}{\operator{\boldsymbol{\sigma}}}
\begin{align*}
\error_{f(a, b, c, \,\cdots)}^2 = \left( {\partial f \over \partial a} \error_a \right)^2 + \left( {\partial f \over \partial b} \error_b \right)^2 + \left( {\partial f \over \partial c} \error_c \right)^2 + \cdots
\end{align*}" style="vertical-align:-2pt;" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;(Note: most of the above formulas are approximations)&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-6027533169869129358?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/6027533169869129358/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/09/error-propagation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/6027533169869129358?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/6027533169869129358?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/v230DI7t6LI/error-propagation.html" title="error propagation" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/09/error-propagation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QNRng4eyp7ImA9WxRTGU8.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-5516016699007868597</id><published>2008-09-08T21:55:00.001-04:00</published><updated>2008-09-08T21:56:37.633-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-08T21:56:37.633-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>electric field integral</title><content type="html">During my physics class, I had an encounter with a tough integral. I was trying to derive the electric field for an infinite line of charges, but got stuck because I couldn't integrate:&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\int{\mathrm{d}x \over (x^2 + y^2)^{3 \over 2} }" title="\int{\mathrm{d}x \over (x^2 + y^2)^{3 \over 2} }" alt="\int{\mathrm{d}x \over (x^2 + y^2)^{3 \over 2} }" style="vertical-align:-2pt;" /&gt; (&lt;i&gt;y&lt;/i&gt; is a constant)&lt;br /&gt;
There are many sources about how the integral can be integrated, but none of them (as far as I have found) indicate how the final result was obtained. So here's one way of deriving the answer (&lt;b&gt;credit&lt;/b&gt;: &lt;a href="http://physicsforums.com/showpost.php?p=1860297"&gt;HallsofIvy at Physics Forums&lt;/a&gt;):&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\begin{align*}
&amp; \int{\mathrm{d}x \over (x^2 + y^2)^{3 \over 2} }
\\&amp;= \int{\mathrm{d}(y \tan \theta) \over [(y \tan \theta)^2 + y^2]^{3 \over 2}}
\\&amp;= \int{y \sec^2 \theta \,\mathrm{d}\theta \over [y^2 (\tan^2 \theta + 1)]^{3 \over 2}}
\\&amp;= \int{y \sec^2 \theta \,\mathrm{d}\theta \over y^3 \sec^3 \theta}
\\&amp;= \int{\mathrm{d}\theta \over y^2 \sec \theta}
\\&amp;= {1 \over y^2} \int \cos \theta \,\mathrm{d}\theta
\\&amp;= {1 \over y^2} \sin \theta + C
\\&amp;= {1 \over y^2} {x \over \sqrt{x^2 + y^2}} + C
\\&amp;= {x \over y^2 \sqrt{x^2 + y^2}} + C
\end{align*}" title="\begin{align*}
&amp; \int{\mathrm{d}x \over (x^2 + y^2)^{3 \over 2} }
\\&amp;= \int{\mathrm{d}(y \tan \theta) \over [(y \tan \theta)^2 + y^2]^{3 \over 2}}
\\&amp;= \int{y \sec^2 \theta \,\mathrm{d}\theta \over [y^2 (\tan^2 \theta + 1)]^{3 \over 2}}
\\&amp;= \int{y \sec^2 \theta \,\mathrm{d}\theta \over y^3 \sec^3 \theta}
\\&amp;= \int{\mathrm{d}\theta \over y^2 \sec \theta}
\\&amp;= {1 \over y^2} \int \cos \theta \,\mathrm{d}\theta
\\&amp;= {1 \over y^2} \sin \theta + C
\\&amp;= {1 \over y^2} {x \over \sqrt{x^2 + y^2}} + C
\\&amp;= {x \over y^2 \sqrt{x^2 + y^2}} + C
\end{align*}" alt="\begin{align*}
&amp; \int{\mathrm{d}x \over (x^2 + y^2)^{3 \over 2} }
\\&amp;= \int{\mathrm{d}(y \tan \theta) \over [(y \tan \theta)^2 + y^2]^{3 \over 2}}
\\&amp;= \int{y \sec^2 \theta \,\mathrm{d}\theta \over [y^2 (\tan^2 \theta + 1)]^{3 \over 2}}
\\&amp;= \int{y \sec^2 \theta \,\mathrm{d}\theta \over y^3 \sec^3 \theta}
\\&amp;= \int{\mathrm{d}\theta \over y^2 \sec \theta}
\\&amp;= {1 \over y^2} \int \cos \theta \,\mathrm{d}\theta
\\&amp;= {1 \over y^2} \sin \theta + C
\\&amp;= {1 \over y^2} {x \over \sqrt{x^2 + y^2}} + C
\\&amp;= {x \over y^2 \sqrt{x^2 + y^2}} + C
\end{align*}" style="vertical-align:-2pt;" /&gt;&lt;br /&gt;
Okay, just a brief explanation:&lt;br /&gt;
In the 2&lt;sup&gt;nd&lt;/sup&gt; equation, substitute &lt;i&gt;x&lt;/i&gt; = &lt;i&gt;y&lt;/i&gt; tan &lt;i&gt;θ&lt;/i&gt; and d&lt;i&gt;x&lt;/i&gt; = &lt;i&gt;y&lt;/i&gt; sec&lt;sup&gt;2&lt;/sup&gt; &lt;i&gt;θ&lt;/i&gt;&lt;br /&gt;
In the 4&lt;sup&gt;th&lt;/sup&gt; equation, simplify the equation with tan&lt;sup&gt;2&lt;/sup&gt; &lt;i&gt;θ&lt;/i&gt; + 1 = sec&lt;sup&gt;2&lt;/sup&gt; &lt;i&gt;θ&lt;/i&gt;&lt;br /&gt;
In the 8&lt;sup&gt;th&lt;/sup&gt; equation, simplify with:&lt;br /&gt;
&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\begin{align*}
\textup{since} \qquad x &amp;= y \tan \theta
\\ x &amp;= y {\sin \theta \over \cos \theta}
\\ x &amp;= y \sin \theta \sec \theta
\\ x &amp;= y \sin \theta \sqrt{\sec^2 \theta}
\\ x &amp;= y \sin \theta \sqrt{\tan^2 \theta + 1} \quad \Leftarrow \textup{from }\sec^2 \theta = \tan^2 \theta + 1
\\ x &amp;= \sin \theta \sqrt{y^2 \left(\tan^2 \theta + 1\right)}
\\ x &amp;= \sin \theta \sqrt{\left(y \tan \theta\right)^2 + y^2}
\\ x &amp;= \sin \theta \sqrt{x^2 + y^2} \qquad \Leftarrow \textup{since }x = y \tan \theta
\\ {x \over \sqrt{x^2 + y^2}} &amp;= \sin \theta
\end{align*}" title="\begin{align*}
\textup{since} \qquad x &amp;= y \tan \theta
\\ x &amp;= y {\sin \theta \over \cos \theta}
\\ x &amp;= y \sin \theta \sec \theta
\\ x &amp;= y \sin \theta \sqrt{\sec^2 \theta}
\\ x &amp;= y \sin \theta \sqrt{\tan^2 \theta + 1} \quad \Leftarrow \textup{from }\sec^2 \theta = \tan^2 \theta + 1
\\ x &amp;= \sin \theta \sqrt{y^2 \left(\tan^2 \theta + 1\right)}
\\ x &amp;= \sin \theta \sqrt{\left(y \tan \theta\right)^2 + y^2}
\\ x &amp;= \sin \theta \sqrt{x^2 + y^2} \qquad \Leftarrow \textup{since }x = y \tan \theta
\\ {x \over \sqrt{x^2 + y^2}} &amp;= \sin \theta
\end{align*}" alt="\begin{align*}
\textup{since} \qquad x &amp;= y \tan \theta
\\ x &amp;= y {\sin \theta \over \cos \theta}
\\ x &amp;= y \sin \theta \sec \theta
\\ x &amp;= y \sin \theta \sqrt{\sec^2 \theta}
\\ x &amp;= y \sin \theta \sqrt{\tan^2 \theta + 1} \quad \Leftarrow \textup{from }\sec^2 \theta = \tan^2 \theta + 1
\\ x &amp;= \sin \theta \sqrt{y^2 \left(\tan^2 \theta + 1\right)}
\\ x &amp;= \sin \theta \sqrt{\left(y \tan \theta\right)^2 + y^2}
\\ x &amp;= \sin \theta \sqrt{x^2 + y^2} \qquad \Leftarrow \textup{since }x = y \tan \theta
\\ {x \over \sqrt{x^2 + y^2}} &amp;= \sin \theta
\end{align*}" style="vertical-align:-2pt;" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-5516016699007868597?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/5516016699007868597/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/09/electric-field-integral.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/5516016699007868597?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/5516016699007868597?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/e_DdARoHnvE/electric-field-integral.html" title="electric field integral" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/09/electric-field-integral.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4CSHY_eCp7ImA9WxRTFkg.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-8025790331846147111</id><published>2008-09-05T17:28:00.001-04:00</published><updated>2008-09-05T17:42:49.840-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-05T17:42:49.840-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Physics" /><title>E-potential / E-potential-energy</title><content type="html">&lt;i&gt;Sig&lt;/i&gt;&lt;i&gt;h, I haven't updated SciLearn for a while. Homework has been keeping me busy recently. Still, I decided to publish a short post about electrostatics.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Okay, today I encountered something that I never realized/thought of properly. What is the difference between &lt;a href="http://en.wikipedia.org/wiki/Electric_potential"&gt;&lt;b&gt;electric potential&lt;/b&gt;&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Electric_potential_energy"&gt;&lt;b&gt;electric potential energy&lt;/b&gt;&lt;/a&gt;?&lt;br /&gt;
&lt;br /&gt;
The main difference can be easily found by analyzing the units:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;electric potential&lt;/b&gt; is a quantity in &lt;a href="http://en.wikipedia.org/wiki/Volt"&gt;&lt;b&gt;volts&lt;/b&gt;&lt;/a&gt; or - equivalently - &lt;b&gt;&lt;a href="http://en.wikipedia.org/wiki/Joule"&gt;joules&lt;/a&gt; per &lt;a href="http://en.wikipedia.org/wiki/Coulomb"&gt;coulomb&lt;/a&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;electric potential energy&lt;/b&gt; is &lt;i&gt;energy&lt;/i&gt;, in &lt;a href="http://en.wikipedia.org/wiki/Joule"&gt;&lt;b&gt;joules&lt;/b&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;The difference is just:&lt;br /&gt;
&lt;blockquote&gt;&lt;b&gt;electric potential&lt;/b&gt; is &lt;b&gt;electric potential energy&lt;/b&gt; &lt;i&gt;divided&lt;/i&gt; by the &lt;b&gt;charge of the &lt;a href="http://en.wikipedia.org/wiki/Test_particle"&gt;test particle&lt;/a&gt;&lt;/b&gt;.&lt;/blockquote&gt;Ain't that simple?&lt;br /&gt;
&lt;br /&gt;
You can draw a similar relationship between &lt;a href="http://en.wikipedia.org/wiki/Electric_field"&gt;&lt;b&gt;electric field&lt;/b&gt;&lt;/a&gt; (&lt;a href="http://en.wikipedia.org/wiki/Newton"&gt;N&lt;/a&gt;&lt;a href="http://en.wikipedia.org/wiki/Coulomb"&gt;C&lt;/a&gt;&lt;sup&gt;-1&lt;/sup&gt;) and &lt;b&gt;electric &lt;a href="http://en.wikipedia.org/wiki/Force_field_%28physics%29"&gt;force field&lt;/a&gt;&lt;/b&gt; (&lt;a href="http://en.wikipedia.org/wiki/Newton"&gt;N&lt;/a&gt;) (since they are simply &lt;b&gt;&lt;a href="http://en.wikipedia.org/wiki/Gradient"&gt;gradients&lt;/a&gt;&lt;/b&gt; of the electric potential and electric potential energy respectively).&lt;br /&gt;
&lt;br /&gt;
Note: all of these also apply to &lt;a href="http://en.wikipedia.org/wiki/Gravitation"&gt;gravitation&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-8025790331846147111?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/8025790331846147111/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/09/e-potential-e-potential-energy.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/8025790331846147111?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/8025790331846147111?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/LpfswO_cMDM/e-potential-e-potential-energy.html" title="E-potential / E-potential-energy" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/09/e-potential-e-potential-energy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EHQH47fSp7ImA9WxRUEk4.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-8189229971673421238</id><published>2008-08-22T23:25:00.001-04:00</published><updated>2008-11-20T22:53:51.005-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-20T22:53:51.005-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>differential table</title><content type="html">This is a table that lists everything in differentials, so it can be used for differentiation and integration at the same time.&lt;br /&gt;&lt;br /&gt;I'm not sure if everyone can find this useful, since some might prefer non-differential forms because they are easier to understand and use - so I don't think this table would be suitable for calculus beginners.&lt;br /&gt;&lt;br /&gt;Okay, here's what the symbols in my table means:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;k&lt;/i&gt; is a constant;&lt;/li&gt;&lt;li&gt;&lt;i&gt;f&lt;/i&gt;, &lt;i&gt;g&lt;/i&gt; are functions of a variable &lt;i&gt;t&lt;/i&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;And here's the table (click the image if the equations get cropped):&lt;br /&gt;&lt;a href="http://www.forkosh.dreamhost.com/mathtex.cgi?\begin{array}{ll}d \left( f \cdot g \right) = df \cdot g + f \cdot dg &amp;d \left( \frac{f}{g} \right) = \frac{df \cdot g - f \cdot d g}{g^2} \\d \left( f^k \right) = k f^{k - 1} df &amp;d \left( f^g \right) = g f^{g - 1} \, df + f^g \ln f dg \\d \left( k^f \right) = k^f \ln k \, df &amp;d \log_k f = d \left( \frac{\ln f}{\ln k} \right) = \frac{df}{f \ln k} \\d \left( e^t \right) = e^t dt &amp;d \ln t = \frac{dt}{t} \\d \sin t = \cos f \, dt &amp;d \cos t = - \sin t \, dt \\d \tan t = \sec^2 t \, dt &amp;d \cot t = - \csc^2 t \, dt \\d \sec t = \sec t \tan t \, dt &amp;d \csc t = - \csc t \cot t \, dt \\d \arcsin t = - d \arccos t = \frac{d t}{\sqrt{1 - t^2}} \\d \arctan t = - d \operatorname{arccot} t = \frac{d t}{1 + t^2} \\d \operatorname{arcsec} f = - d \operatorname{arccsc} t = \frac{dt}{|t| \sqrt{-1 + t^2}} \\d \sinh t = \cosh t \, dt &amp;d \cosh t = \sinh t \, dt \\d \tanh t = \operatorname{sech}^2 t \, dt &amp;d \coth t = - \operatorname{csch}^2 t \, dt \\d \operatorname{sech} t = - \operatorname{sech} t \tanh t \, dt &amp;d \operatorname{csch} t = - \operatorname{csch} \coth t \, dt \\d \operatorname{arsinh} t = \frac{dt}{\sqrt{1 + t^2}} &amp;d \operatorname{arcosh} t = \frac{dt}{\sqrt{-1 + t^2}} \\d \operatorname{artanh} t = d \operatorname{arcoth} t = \frac{dt}{1 - t^2} \\d \operatorname{arsech} t = - \frac{dt}{t \sqrt{1 - t^2}} &amp;d \operatorname{arcsch} t = - \frac{dt}{|t| \sqrt{1 + t^2}}\end{array}"&gt;&lt;img src="http://www.forkosh.dreamhost.com/mathtex.cgi?\begin{array}{ll}d \left( f \cdot g \right) = df \cdot g + f \cdot dg &amp;d \left( \frac{f}{g} \right) = \frac{df \cdot g - f \cdot d g}{g^2} \\d \left( f^k \right) = k f^{k - 1} df &amp;d \left( f^g \right) = g f^{g - 1} \, df + f^g \ln f dg \\d \left( k^f \right) = k^f \ln k \, df &amp;d \log_k f = d \left( \frac{\ln f}{\ln k} \right) = \frac{df}{f \ln k} \\d \left( e^t \right) = e^t dt &amp;d \ln t = \frac{dt}{t} \\d \sin t = \cos f \, dt &amp;d \cos t = - \sin t \, dt \\d \tan t = \sec^2 t \, dt &amp;d \cot t = - \csc^2 t \, dt \\d \sec t = \sec t \tan t \, dt &amp;d \csc t = - \csc t \cot t \, dt \\d \arcsin t = - d \arccos t = \frac{d t}{\sqrt{1 - t^2}} \\d \arctan t = - d \operatorname{arccot} t = \frac{d t}{1 + t^2} \\d \operatorname{arcsec} f = - d \operatorname{arccsc} t = \frac{dt}{|t| \sqrt{-1 + t^2}} \\d \sinh t = \cosh t \, dt &amp;d \cosh t = \sinh t \, dt \\d \tanh t = \operatorname{sech}^2 t \, dt &amp;d \coth t = - \operatorname{csch}^2 t \, dt \\d \operatorname{sech} t = - \operatorname{sech} t \tanh t \, dt &amp;d \operatorname{csch} t = - \operatorname{csch} \coth t \, dt \\d \operatorname{arsinh} t = \frac{dt}{\sqrt{1 + t^2}} &amp;d \operatorname{arcosh} t = \frac{dt}{\sqrt{-1 + t^2}} \\d \operatorname{artanh} t = d \operatorname{arcoth} t = \frac{dt}{1 - t^2} \\d \operatorname{arsech} t = - \frac{dt}{t \sqrt{1 - t^2}} &amp;d \operatorname{arcsch} t = - \frac{dt}{|t| \sqrt{1 + t^2}}\end{array}" title="\begin{array}{ll}d \left( f \cdot g \right) = df \cdot g + f \cdot dg &amp;d \left( \frac{f}{g} \right) = \frac{df \cdot g - f \cdot d g}{g^2} \\d \left( f^k \right) = k f^{k - 1} df &amp;d \left( f^g \right) = g f^{g - 1} \, df + f^g \ln f dg \\d \left( k^f \right) = k^f \ln k \, df &amp;d \log_k f = d \left( \frac{\ln f}{\ln k} \right) = \frac{df}{f \ln k} \\d \left( e^t \right) = e^t dt &amp;d \ln t = \frac{dt}{t} \\d \sin t = \cos f \, dt &amp;d \cos t = - \sin t \, dt \\d \tan t = \sec^2 t \, dt &amp;d \cot t = - \csc^2 t \, dt \\d \sec t = \sec t \tan t \, dt &amp;d \csc t = - \csc t \cot t \, dt \\d \arcsin t = - d \arccos t = \frac{d t}{\sqrt{1 - t^2}} \\d \arctan t = - d \operatorname{arccot} t = \frac{d t}{1 + t^2} \\d \operatorname{arcsec} f = - d \operatorname{arccsc} t = \frac{dt}{|t| \sqrt{-1 + t^2}} \\d \sinh t = \cosh t \, dt &amp;d \cosh t = \sinh t \, dt \\d \tanh t = \operatorname{sech}^2 t \, dt &amp;d \coth t = - \operatorname{csch}^2 t \, dt \\d \operatorname{sech} t = - \operatorname{sech} t \tanh t \, dt &amp;d \operatorname{csch} t = - \operatorname{csch} \coth t \, dt \\d \operatorname{arsinh} t = \frac{dt}{\sqrt{1 + t^2}} &amp;d \operatorname{arcosh} t = \frac{dt}{\sqrt{-1 + t^2}} \\d \operatorname{artanh} t = d \operatorname{arcoth} t = \frac{dt}{1 - t^2} \\d \operatorname{arsech} t = - \frac{dt}{t \sqrt{1 - t^2}} &amp;d \operatorname{arcsch} t = - \frac{dt}{|t| \sqrt{1 + t^2}}\end{array}" alt="\begin{array}{ll}d \left( f \cdot g \right) = df \cdot g + f \cdot dg &amp;d \left( \frac{f}{g} \right) = \frac{df \cdot g - f \cdot d g}{g^2} \\d \left( f^k \right) = k f^{k - 1} df &amp;d \left( f^g \right) = g f^{g - 1} \, df + f^g \ln f dg \\d \left( k^f \right) = k^f \ln k \, df &amp;d \log_k f = d \left( \frac{\ln f}{\ln k} \right) = \frac{df}{f \ln k} \\d \left( e^t \right) = e^t dt &amp;d \ln t = \frac{dt}{t} \\d \sin t = \cos f \, dt &amp;d \cos t = - \sin t \, dt \\d \tan t = \sec^2 t \, dt &amp;d \cot t = - \csc^2 t \, dt \\d \sec t = \sec t \tan t \, dt &amp;d \csc t = - \csc t \cot t \, dt \\d \arcsin t = - d \arccos t = \frac{d t}{\sqrt{1 - t^2}} \\d \arctan t = - d \operatorname{arccot} t = \frac{d t}{1 + t^2} \\d \operatorname{arcsec} f = - d \operatorname{arccsc} t = \frac{dt}{|t| \sqrt{-1 + t^2}} \\d \sinh t = \cosh t \, dt &amp;d \cosh t = \sinh t \, dt \\d \tanh t = \operatorname{sech}^2 t \, dt &amp;d \coth t = - \operatorname{csch}^2 t \, dt \\d \operatorname{sech} t = - \operatorname{sech} t \tanh t \, dt &amp;d \operatorname{csch} t = - \operatorname{csch} \coth t \, dt \\d \operatorname{arsinh} t = \frac{dt}{\sqrt{1 + t^2}} &amp;d \operatorname{arcosh} t = \frac{dt}{\sqrt{-1 + t^2}} \\d \operatorname{artanh} t = d \operatorname{arcoth} t = \frac{dt}{1 - t^2} \\d \operatorname{arsech} t = - \frac{dt}{t \sqrt{1 - t^2}} &amp;d \operatorname{arcsch} t = - \frac{dt}{|t| \sqrt{1 + t^2}}\end{array}" style="vertical-align:-2pt;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can tell me if this is useful or not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-8189229971673421238?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/8189229971673421238/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/08/differential-table.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/8189229971673421238?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/8189229971673421238?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/VqR76kOhzkM/differential-table.html" title="differential table" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/08/differential-table.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMGQ3c4fCp7ImA9WxdbGU4.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-7822192436396862455</id><published>2008-08-16T20:16:00.002-04:00</published><updated>2008-08-16T20:20:22.934-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-16T20:20:22.934-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Blog Information" /><title>trademark?</title><content type="html">&lt;span style="font-weight: bold;"&gt;Oops. &lt;/span&gt;While I don't think anyone uses 'SciLearn' as a blog name in its entirety, I just hope that no-one complains that I'm using it. Would you call that a trademark issue?&lt;br /&gt;&lt;br /&gt;Changing the name of a blog won't be easy, even for a no-name blog that no-one knows. (This also means that the URL has to be changed, and that means: broken links.)&lt;br /&gt;&lt;br /&gt;I just hope that I might come up with a catchier name than 'SciLearn' someday.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-7822192436396862455?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/7822192436396862455/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/08/trademark.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/7822192436396862455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/7822192436396862455?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/Fa5toyuPhNY/trademark.html" title="trademark?" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/08/trademark.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMBQ3o5fCp7ImA9WxdbGU4.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-3048701361832197670</id><published>2008-08-11T15:39:00.010-04:00</published><updated>2008-08-16T20:20:52.424-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-16T20:20:52.424-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><title>unspecified specs</title><content type="html">Recently I was looking all around the web for a good laptop to buy, so perhaps I should share some of the new knowledge I learned about laptop specifications.&lt;br /&gt;&lt;br /&gt;There are tons of stuff that you should look out for in laptops, and it's hard to look at them all. So here are some basic specs to look out for. ("^" means the higher the better; "~" means the lower the better)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;processor (a.k.a. CPU)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is what determines basic performance of your computer, as in computational speed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Factors to consider:&lt;/b&gt;&lt;br /&gt;L2 cache (in MB)^&lt;br /&gt;clock rate (in GHz)^&lt;br /&gt;&lt;br /&gt;For normal uses, a laptop doesn't need an extreme high-end processor, unless you want to dedicate it to number-crunching and complex mathematical calculations. A moderate to fairly high speed CPU is good enough in most cases.&lt;br /&gt;&lt;br /&gt;Typical brands: &lt;a href="http://intel.com/"&gt;Intel&lt;/a&gt;, &lt;a href="http://amd.com/"&gt;AMD&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;graphics card&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This determines how your computer will fare with heavy graphic-intensive applications, including 3D applications &amp;amp; games.&lt;br /&gt;&lt;br /&gt;It's hard to determine the performance of graphics card by plainly looking at the specs. In general, the second digit is the one that determines speed, while the first digit is the generation of the graphics card. For detailed info, &lt;a href="http://forum.notebookreview.com/showthread.php?t=275056"&gt;check this thread&lt;/a&gt;. Also, take note of the amount of dedicated graphics memory available (in MB)^. You can also use benchmarks as a guide, but remember that benchmarks only provide a rough comparison between graphics cards.&lt;br /&gt;&lt;br /&gt;Typical brands: &lt;a href="http://nvidia.com/"&gt;NVIDIA&lt;/a&gt;, &lt;a href="http://ati.amd.com/products"&gt;ATI (AMD)&lt;/a&gt;, &lt;a href="http://intel.com/products/graphics"&gt;Intel&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;system memory&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Factors to consider:&lt;/b&gt;&lt;br /&gt;latency~&lt;br /&gt;bandwidth^&lt;br /&gt;size (MB)^&lt;br /&gt;&lt;br /&gt;The minimum RAM nowadays is typically 512MB, so you should aim at something higher than that to achieve the best performance. Any addition of RAM, up to 2GB, will give a noticeable performance boost. Most laptops allow you to upgrade the RAM fairly easily. (&lt;a href="http://bigbruin.com/reviews05/memorybuy?file=1"&gt;Another detailed article&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;hard drive&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Factors to consider:&lt;/b&gt;&lt;br /&gt;rotational speed (in rpm)^&lt;br /&gt;size (in GB)^&lt;br /&gt;&lt;br /&gt;The size of the hard driver mainly matters if you want to store a lot of stuff. However, the real bottleneck here is the rotational speed of the hard drive. Typical speeds include 5400rpm and 7200rpm. The reason is simple: swap memory uses the hard drive, which needs to be fast enough in order to serve its purpose. Otherwise, you may encounter considerable lag in performance.&lt;br /&gt;&lt;br /&gt;These are the main and often most important things to consider when getting a laptop. Of course, there are plenty of other things that should be taken into consideration:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;screen size &amp;amp; quality&lt;/li&gt;&lt;li&gt;CD/DVD and other optical media reader/writer &lt;/li&gt;&lt;li&gt;Ethernet &amp;amp; wireless cards&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I/O systems (i.e. USB plugs, SD memory readers, FireWire, etc.)&lt;/li&gt;&lt;li&gt;built-in microphone, speaker &amp;amp; webcam&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-3048701361832197670?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/3048701361832197670/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/08/unspecified-specs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3048701361832197670?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/3048701361832197670?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/7NLRDd6xm5o/unspecified-specs.html" title="unspecified specs" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/08/unspecified-specs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYMSH8-fyp7ImA9WxdUGUo.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-1611561887176140813</id><published>2008-07-27T21:51:00.010-04:00</published><updated>2008-08-05T19:16:29.157-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-05T19:16:29.157-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Physics" /><title>In all its glory</title><content type="html">While on a &lt;a href="http://freiddy.blogspot.com/2008/08/universal-address.html"&gt;plane trip&lt;/a&gt;, I saw a strange phenomenon:&lt;br /&gt;
&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;a href="http://bp1.blogger.com/_7Ix7g8J0iac/SJZzkma7Q5I/AAAAAAAAAIU/MTcrdgbjvSo/s1600-h/halo2.JPG" imageanchor="1" style="border: 0pt none ; background-color: transparent; margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://bp1.blogger.com/_7Ix7g8J0iac/SJZzkma7Q5I/AAAAAAAAAIU/jq-EM5zGTZc/s320-R/halo2.JPG" style="border: 0pt none ;" /&gt;&lt;/a&gt;&lt;/div&gt;See it? Let's make that a little clearer by adding contrast.&lt;br /&gt;
&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;a href="http://bp3.blogger.com/_7Ix7g8J0iac/SJciMNlGasI/AAAAAAAAAIc/ChMmvoaMmDc/s1600-h/halo2-modified.jpg" imageanchor="1" style="border: 0pt none ; background-color: transparent; margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://bp3.blogger.com/_7Ix7g8J0iac/SJciMNlGasI/AAAAAAAAAIc/UFhLJyzylc8/s320-R/halo2-modified.jpg" style="border: 0pt none ;" /&gt;&lt;/a&gt;&lt;/div&gt;Cool, ain't it? First, I thought it was just a reflection of the window on the other side of the plane, but then I guess it wasn't, since there wasn't a window open. The faint apparition-like halo may have been just an illusion. Maybe I was gazing too much at the window. Maybe not...&lt;br /&gt;
&lt;br /&gt;
After some brief searching, I found the best explanation for it: &lt;a href="http://en.wikipedia.org/wiki/Glory_%28optical_phenomenon%29"&gt;Glory&lt;/a&gt;. It's a "glory", a refractive effect caused by the sun shining onto the clouds.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-1611561887176140813?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/1611561887176140813/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/07/air-halo.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1611561887176140813?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1611561887176140813?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/9B83g_yJDE8/air-halo.html" title="In all its glory" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp1.blogger.com/_7Ix7g8J0iac/SJZzkma7Q5I/AAAAAAAAAIU/jq-EM5zGTZc/s72-Rc/halo2.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/07/air-halo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08CSXgyeCp7ImA9WxdVFkk.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-935352931382953260</id><published>2008-07-20T12:14:00.003-04:00</published><updated>2008-07-21T10:17:48.690-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-21T10:17:48.690-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>Codejamming</title><content type="html">I tried the Codejam Qualification Round a few days ago, and it feels pretty hard for my level. I managed to score 55/75, and the 20 points lost was because of a tiny error in my program for question C (at least that's what I believe should be the problem; I tried the new, fixed program on a test data and this time it worked).&lt;br /&gt;
&lt;br /&gt;
If you want to see the questions, please go to &lt;a href="http://code.google.com/codejam"&gt;Google Codejam&lt;/a&gt;. I can offer the solution for any readers (see note at the very bottom).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;font size="4"&gt;A. Saving the Universe&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;
This one should've been really easy, but unfortunately I screwed a lot things up, and ended up submitted several incorrect entries before getting the right answer.&lt;br /&gt;
&lt;br /&gt;
Here's how I solved this problem:&lt;br /&gt;
Go through every query, from beginning to end, and make the &lt;b&gt;best switch&lt;/b&gt; that minimizes the total number of switches. Make sure a counter is used to keep track of how many switches are made.&lt;br /&gt;
&lt;br /&gt;
The real question here is: what constitutes a "best switch"? Well, after some thought, I realized that the &lt;b&gt;best switch&lt;/b&gt;&lt;i&gt; was the switch that maximizes the number of queries processed before changing to another search engine&lt;/i&gt;. So all I had to do was to try switching to each search engine and check how many queries it can process before it has to switch to another search engine. That was easy: just a simple maximization problem.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="4"&gt;&lt;b&gt;B.&amp;nbsp; Train Timetable&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;
While this is supposed to be a fairly easy problem, my solution kinda overcomplicated things, and it took me a whole day to figure out where the "bug" was.&lt;br /&gt;
&lt;br /&gt;
Before I go onto the solution, I would like to note that a simple way to incorporate the "turnaround time", &lt;i&gt;T&lt;/i&gt;, into the solution is to just assume that each train arrives &lt;i&gt;T&lt;/i&gt; minutes later than what the schedule says (or equivalently, each train needs to depart &lt;i&gt;T&lt;/i&gt; minutes earlier than what the schedule says).&lt;br /&gt;
&lt;br /&gt;
My solution was to simply simulate all the trains as they go from station A &amp;amp; B and back. At every &lt;b&gt;critical moment in time&lt;/b&gt; (explained later), the total number of trains that leave a station is counted. If somehow, the number of trains left at some station X is negative, then that means there's a deficiency in the number of trains. This deficiency is then added to the "required number of trains at station X" (this is what the whole question is asking for!) and the number of trains left at the station X is reset to zero. At the end of the day (when all the critical moments are processed/simulated), the "required number of trains at station X" is then output.&lt;br /&gt;
&lt;br /&gt;
Note that I use the term "critical" to differentiate between moments of time that are uninteresting (e.g. when a train is mid-way/at a station, and nothing is happening) and those that are worthwhile to process (e.g. when a train departs or arrives). The simulator &lt;i&gt;only&lt;/i&gt; needs to simulate critical moments in time.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="4"&gt;&lt;b&gt;C. Fly Swatter&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;
This one was actually fairly easy, until I realized that I forgot to make a certain check to process the area. Okay, first things first.&lt;br /&gt;
&lt;br /&gt;
This question simply asks you to find the ratio of the &lt;b&gt;fly swatter area&lt;/b&gt; to a &lt;b&gt;circular area&lt;/b&gt; of radius &lt;i&gt;R&lt;/i&gt;... Oh wait, no: it says the &lt;i&gt;fly is a sphere&lt;/i&gt; (of radius &lt;i&gt;f&lt;/i&gt;), not a point! This might make things confusing. Since the fly is a sphere and not a point, it actually makes the fly easier to hit.&lt;br /&gt;
&lt;br /&gt;
After some thought, I realized that an equivalent situation is when the area of the fly swatter has been extended by a distance of &lt;i&gt;f&lt;/i&gt;, yet the fly is point-sized (positioned at the center of the spherical fly).&lt;br /&gt;
&lt;br /&gt;
Now finding the fly swatter area is not easy. Instead of finding the area that is covered by the fly swatter, I decided to find the area of the holes in the fly swatter (which are either just squares or squares that are cut by circular arcs).&lt;br /&gt;
&lt;br /&gt;
The side-length of each square is nearly the same side-length as the ones drawn in the Google Codejam diagram, but it must be subtracted by 2&lt;i&gt;f&lt;/i&gt;. In order to find the areas of the squares that aren't perfect squares but cut by circular arcs (I call them "pseudo-squares"), you should set up a coordinate system and use integration. Now don't just do numeric integration (it'll take forever to get 6 decimal places), because an integral like:&lt;br /&gt;
&lt;img alt="\int^{x_2}_{x_1} \left( \sqrt{R^2 - x^2} - y_1 \right) dx" src="http://www.forkosh.dreamhost.com/mathtex.cgi?%5Cint%5E%7Bx_2%7D_%7Bx_1%7D%20%5Cleft%28%20%5Csqrt%7BR%5E2%20-%20x%5E2%7D%20-%20y_1%20%5Cright%29%20dx" style="vertical-align: -2pt;" title="\int^{x_2}_{x_1} \left( \sqrt{R^2 - x^2} - y_1 \right) dx" /&gt;&lt;br /&gt;
can actually be simplified so that it's in terms of square roots and arcsines, which is less computationally intensive. In order to simplify calculations, don't bother calculating the area of the squares of the other quadrants of the fly swatter, since one quadrant is enough (it is symmetric, as the question states). Beware of cases when the width or height of the squares (or "pseudo-squares")  is negative, which is often as a result of subtracting the actual height or width of the squares (or "pseudo-squares") by 2&lt;i&gt;f&lt;/i&gt;. In such a case, make sure you check for this situation, and treat the square's area as zero.&lt;br /&gt;
&lt;br /&gt;
After that, the rest is pure logic and iteration. Just be careful with the signs and how you get all those coordinates, and the rest should be pretty easy.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to ask me to email a copy of my code (in Python) for any of these 3 questions. (The code for question C has been corrected already, by the way.) I'm fairly confident that they are correct, but you can verify them with the Google Codejam Qualification Round practice questions just to be sure. You can put requests in the comments.&lt;br /&gt;
&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-935352931382953260?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/935352931382953260/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/07/codejamming.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/935352931382953260?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/935352931382953260?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/t-940fN-y3Y/codejamming.html" title="Codejamming" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/07/codejamming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IHQ3k8fyp7ImA9WxdWGEo.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-4260076566711510182</id><published>2008-07-10T05:15:00.005-04:00</published><updated>2008-07-12T12:18:52.777-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-12T12:18:52.777-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><title>Getting oriented with Ubuntu (for Windows users)</title><content type="html">Okay, just for the record here, I'm also a beginner, just-migrated-from-Windows kinda person. But still I think I should share some of my own thoughts and experience about &lt;a href="http://ubuntu.com/"&gt;Ubuntu&lt;/a&gt; - from a newbie's perspective.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;font size="4"&gt;Installation &lt;/font&gt;&lt;/b&gt;&lt;br /&gt;
First things first: Ubuntu installation. This is the easiest part actually: just follow the instructions. One of the things that was unclear for me (and just to make sure I didn't make any mistakes as a newbie) was the Linux partitioning process. You see, a Windows-adapted user would think that one partition is enough (and I thought NTFS was good enough), but it's not!&lt;br /&gt;
&lt;br /&gt;
(For a detailed review of Ubuntu partitioning, just go to &lt;a href="http://psychocats.net/ubuntu/partitioning"&gt;this neat article&lt;/a&gt;.) Ubuntu needs a minimum of 2 partitions (1 would still work, but not recommended).&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;One is the "/" partition, which is the root of the folder tree system. (Kinda like your ordinary "C:" drive, but not exactly the same.) This one should be moderately small, &gt;5GB minimum, I think. (This drive is a &lt;b&gt;must&lt;/b&gt;.)&lt;/li&gt;
&lt;li&gt;The other is the swap drive, which is basically a partition used specifically as a swap memory (i.e. a "page file" as Windows calls it). This one is somewhat small, ~2GB maybe. (I chose 5GB, just in case I needed more.)&lt;/li&gt;
&lt;li&gt;You can create an additional "/home" drive to store all your data files. If you choose to do so, just fill the remainder of your free space for this drive. (I did so myself.) The fact that the "/home" directory &lt;b&gt;looks&lt;/b&gt; as if it's a subdirectory of the "/" root directory doesn't matter, since physically they are separate partitions.&lt;/li&gt;
&lt;/ul&gt;
After you understand things become easy. You can make the swap drive and "/home" drive as "logical drives" instead of "primary", if you want.&lt;br /&gt;
&lt;br /&gt;
You might wonder if Ubuntu would support all your drivers. In my situation, things went fairly smoothly (referring to drivers). The only thing I had to do was to force the nVidia driver, which wasn't open-source, to be enabled (it's under &lt;i&gt;System &gt; Administration &gt; Hardware Drivers&lt;/i&gt;). While it's true some things won't work here, like the QuickPlay buttons (rejoyce! that pesky QuickPlay won't work in Ubuntu!), or the Fingerprint Sensor (frankly, it started out useful, then became really annoying, because my arm sometimes touches it while typing, and hence activating the sensor unintentionally). Everything else seems to work: 3D acceleration, touchpad, mute and volume keys... Strangely easy.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="4"&gt;&lt;b&gt;Getting used to the interface&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;
This part requires lot's and lot's of practice. Just to get people understand the basic interface, I'll explain this briefly. Note that "GNOME" is a word used to describe the kind of graphics Linux provides. Aside from the colorful GNOME interface, there's also what is called "KDE", although I've never seen that before (or I've seen it somewhere but didn't know).&lt;br /&gt;
&lt;br /&gt;
The "bar" on top is the place where you:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Applications: load a program (or game, utility, accessory).&lt;/li&gt;
&lt;li&gt;Places: open the File Browser to view files and folders/directories. (This is equivalent to opening the Explorer in Windows.) It also has some Networking stuff in there too.&lt;/li&gt;
&lt;li&gt;System: manage settings and configuration stuff (i.e. "Control Panel" in the form of a menu). Most of them are fairly straightforward and user-friendly.&lt;/li&gt;
&lt;li&gt;There should be some icons right after the three menu items, and you can drag and place your favorite icons here (kinda like a "Quick Launch"). &lt;/li&gt;
&lt;li&gt;On the far right, there's a panel that looks like the Windows "Notification Area". It has the clock and some miscellaneous icons.&lt;/li&gt;
&lt;/ul&gt;
Okay, then there's the bottom "bar", which is a bit like the "Taskbar". This "panel", as it is technically called, allows you to see all the currently loaded programs (within the same workspace, which I'll explain next). Also, you are allowed to divide your desktop into several workspaces (default is 2, one left and one right, I think). The workspaces are just to help organize stuff. The tiny workspace icon on the far right (but to the left of the Trash, i.e. "Recycle Bin") allows you to preview with a tiny thumbnail-like icon. You can switch between workspaces by using &lt;i&gt;Ctrl+Alt+Left&lt;/i&gt;, &lt;i&gt;Right&lt;/i&gt;, &lt;i&gt;Up&lt;/i&gt; or &lt;i&gt;Down&lt;/i&gt; (assuming you never modified the default keyboard shortcuts), or by focusing the desktop and scroll your mouse wheel.&lt;br /&gt;
&lt;br /&gt;
Okay, aside from the interface difference, I think the rest of the interface are fairly easy to understand, like the windows etc.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="4"&gt;&lt;b&gt;Installing programs&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;
This is going to be an essential, yet simple skill. It's not like Windows where you buy a disc or download a binary EXE installer file to install applications. All you need to know is that nearly all of the designed-for-Linux programs (free, open-source ones, of course) can be installed by simply visiting &lt;i&gt;System &gt; Administration &gt; Synaptic Package Manager&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
I think this program is specially designed for beginnerz who don't know a thing about the Linux file system or the command line (Terminal). So let's see how this thing works. First load it, then you'll see a list of weird-looking names. Those are the programs. Suppose you want to install &lt;a href="http://blender.org/"&gt;Blender&lt;/a&gt;, then you just search for "blender", place a check-mark on the "blender" program that you found, and click "Apply" to install it. Note that you can't run all these 3 programs at the same time without having them conflicting:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Update Manager&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Synaptic Package Manager&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Add/Remove...&lt;/b&gt; (which is an even more beginner version of the Synaptic Package Manager, for installing or removing programs).&lt;/li&gt;
&lt;/ul&gt;
If you ever see something like:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;i&gt;sudo apt-get install [some-program-name]&lt;/i&gt;&lt;/blockquote&gt;
then you should know that you are installing a package from the command line.&lt;br /&gt;
(Note: &lt;i&gt;sudo&lt;/i&gt; is a command that gives you "root" permission [i.e. "Admininistrator" permissions])&lt;br /&gt;
&lt;br /&gt;
There are slightly more complex ways of installing programs that you'll eventually have to learn, but don't be overwhelmed. The easiest way to solve them is to look for answers on the Web.&lt;br /&gt;
&lt;br /&gt;
Using Ubuntu&lt;br /&gt;
I'd say the Ubuntu interface is really intuitive, so I don't think there would be too much trouble doing stuff. You might have to wander a little on the first few days, since you probably don't know where things are, but over time you would get used to things. There's the same windows control and similar keyboard shortcuts (mostly), so I think the transition would be smooth.&lt;br /&gt;
&lt;br /&gt;
Just a reminder, Ubuntu's "Explorer" equivalent is called &lt;b&gt;Nautilus&lt;/b&gt; (file system browser) and you should be able to access it simply from the &lt;i&gt;Places&lt;/i&gt; menu (just click one of those items). The equivalent "Internet Explorer" is simply &lt;b&gt;Mozilla Firefox&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="4"&gt;&lt;b&gt;Whining for wine &lt;/b&gt;&lt;/font&gt;&lt;br /&gt;
Ignoring the pun in the title, you should probably be aware of a program called &lt;a href="http://winehq.org/"&gt;&lt;b&gt;Wine&lt;/b&gt;&lt;/a&gt;, since it can allow many kinds of Windows programs to run on Linux. While I don't think it's perfect, it's worth a shot if you really want an important Windows program to run on your Ubuntu. In most cases, however, you should settle for a free, open-source version of a program rather than to force a Windows program to run on Ubuntu, if possible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-4260076566711510182?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/4260076566711510182/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/07/getting-oriented-with-ubuntu-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/4260076566711510182?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/4260076566711510182?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/3OUgK86xA6w/getting-oriented-with-ubuntu-for.html" title="Getting oriented with Ubuntu (for Windows users)" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/07/getting-oriented-with-ubuntu-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUMQ345fCp7ImA9WxdWE08.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-1371012003563493987</id><published>2008-07-04T04:29:00.023-04:00</published><updated>2008-07-06T02:04:42.024-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-06T02:04:42.024-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><category scheme="http://www.blogger.com/atom/ns#" term="Physics" /><title>Dragging energy</title><content type="html">&lt;i&gt;If anyone noticed an error in the equations, feel free to contact me or report it in the comments.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Well, I didn't intend to turn this into a SciLearn post, but seeing as how I actually did a lot of working to get the answer, I might as well share the working and conclusion with everyone else. This is the question I was asking (I asked myself this question when considering whether cars burn more fuel when accelerating slowly or when accelerating rapidly):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;Object &lt;b&gt;A&lt;/b&gt; accelerates uniformly with positive acceleration &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; up to a speed &lt;i&gt;V&lt;/i&gt;, traveling a distance of &lt;i&gt;d&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt;.&lt;br /&gt;
&lt;br /&gt;
An identical object &lt;b&gt;B&lt;/b&gt; accelerates uniformly with positive acceleration &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt; (such that &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; &amp;lt; &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt;) up to the same maximum speed of &lt;i&gt;V&lt;/i&gt; (part 1), and continues to travel at the same speed until the same total distance of &lt;i&gt;d&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; is reached (part 2).&lt;br /&gt;
&lt;br /&gt;
Which object requires greater energy with (1) no drag forces, (2) a linear drag force, or (3) a quadratic drag force?&lt;/blockquote&gt;
&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;a href="http://bp1.blogger.com/_7Ix7g8J0iac/SHBgPU7KOMI/AAAAAAAAAHs/RsqqmrytTKY/s1600-h/Dragging+Energy.png" imageanchor="1" style="border: 0pt none ; background-color: transparent; margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://bp1.blogger.com/_7Ix7g8J0iac/SHBgPU7KOMI/AAAAAAAAAHs/9UrWWzLMzSI/s400-R/Dragging+Energy.png" style="border: 0pt none ;" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
(By the way, I've finally resorted to using &lt;a href="http://latex-project.org/"&gt;LaTeX&lt;/a&gt; for rendering equations. [ &lt;a href="http://mymaths.blogspot.com/2008/07/using-latex-in-blogger.html"&gt;credits&lt;/a&gt; ])&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;font size="4"&gt;Answer for (1)&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;
The answer for (1) is simple and obvious: Both require the same energy, i.e. the kinetic energy at velocity. So for both objects, &lt;i&gt;E&lt;/i&gt; = &lt;i&gt;m&lt;/i&gt; &lt;i&gt;V&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; / 2 where &lt;i&gt;E&lt;/i&gt; is energy &amp;amp; &lt;i&gt;m&lt;/i&gt; is the mass of each object.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;font size="4"&gt;Answer for (2)&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;
(This is going to turn out to be a really long post.) The answer for 2 is a bit complicated. Start by considering object &lt;b&gt;A&lt;/b&gt;:&lt;br /&gt;
&lt;img alt="E_{dragA} = - \int_{0}^{d_a} D_A \, dx" src="http://www.forkosh.dreamhost.com/mathtex.cgi?E_%7BdragA%7D%20=%20-%20%5Cint_%7B0%7D%5E%7Bd_a%7D%20D_A%20%5C,%20dx" style="vertical-align: -2pt;" title="E_{dragA} = - \int_{0}^{d_a} D_A \, dx" /&gt;&lt;br /&gt;
Here, &lt;i&gt;E&lt;/i&gt;&lt;sub&gt;dragA&lt;/sub&gt; is the energy needed to &lt;b&gt;overcome&lt;/b&gt; drag (not work done&lt;b&gt; by&lt;/b&gt; drag, which is why there's a negative sign) and &lt;i&gt;D&lt;/i&gt;&lt;sub&gt;A&lt;/sub&gt; is the drag force.&lt;br /&gt;
&lt;br /&gt;
Since drag is assumed linear:&lt;br /&gt;
&lt;img alt="D_A = - k v" src="http://www.forkosh.dreamhost.com/mathtex.cgi?D_A%20=-%20k%20v" style="vertical-align: -2pt;" title="D_A = - k v" /&gt;&lt;br /&gt;
where &lt;i&gt;v&lt;/i&gt; is the speed of object &lt;b&gt;A&lt;/b&gt; and &lt;i&gt;k&lt;/i&gt; is a constant. v is a function of &lt;i&gt;x&lt;/i&gt;, however, so it must be also substituted.&lt;br /&gt;
&lt;br /&gt;
According to the &lt;a href="http://en.wikipedia.org/wiki/Equations_of_motion#Classic_version"&gt;uniform acceleration equation&lt;/a&gt; &lt;i&gt;v&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; = &lt;i&gt;u&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; + 2 &lt;i&gt;a&lt;/i&gt; &lt;i&gt;s&lt;/i&gt;:&lt;br /&gt;
&lt;img alt="v^2 = 0^2 + 2 a_a x \Rightarrow v = \sqrt{2 a_a x}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?v%5E2%20=%200%5E2%20+%202%20a_a%20x%20%5CRightarrow%20v%20=%20%5Csqrt%7B2%20a_a%20x%7D" style="vertical-align: -2pt;" title="v^2 = 0^2 + 2 a_a x \Rightarrow v = \sqrt{2 a_a x}" /&gt;&lt;br /&gt;
Now we can put these equations back into our original drag energy equation.&lt;br /&gt;
&lt;br /&gt;
Substitute the variables to find the drag energy:&lt;br /&gt;
&lt;img alt="E_{dragA} = \int_{0}^{d_a} k \sqrt{2 a_a x} \, dx = \frac{2}{3} k \sqrt{2 a_a d_a^3}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?E_%7BdragA%7D%20=%20%5Cint_%7B0%7D%5E%7Bd_a%7D%20k%20%5Csqrt%7B2%20a_a%20x%7D%20%5C,%20dx%20=%20%5Cfrac%7B2%7D%7B3%7D%20k%20%5Csqrt%7B2%20a_a%20d_a%5E3%7D" style="vertical-align: -2pt;" title="E_{dragA} = \int_{0}^{d_a} k \sqrt{2 a_a x} \, dx = \frac{2}{3} k \sqrt{2 a_a d_a^3}" /&gt;&lt;br /&gt;
This is how much energy object &lt;b&gt;A&lt;/b&gt; requires to overcome drag.&lt;br /&gt;
&lt;br /&gt;
For object &lt;b&gt;B&lt;/b&gt;, the formula is the same, except the variables are slightly different:&lt;br /&gt;
&lt;img alt="E_{dragB1} = \frac{2}{3} k \sqrt{2 a_b d_b^3}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?E_%7BdragB1%7D%20=%20%5Cfrac%7B2%7D%7B3%7D%20k%20%5Csqrt%7B2%20a_b%20d_b%5E3%7D" style="vertical-align: -2pt;" title="E_{dragB1} = \frac{2}{3} k \sqrt{2 a_b d_b^3}" /&gt;&lt;br /&gt;
Here, &lt;i&gt;d&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt; is the distance traveled during part 1 of the motion.&lt;br /&gt;
&lt;br /&gt;
For part 2 (during which object &lt;b&gt;B&lt;/b&gt; also travels at constant speed until the total distance traveled is the same as that of object &lt;b&gt;A&lt;/b&gt;), we need additional energy to mitigate the constant drag force that occurs at maximum speed &lt;i&gt;V&lt;/i&gt;, until the total distance becomes &lt;i&gt;d&lt;/i&gt;&lt;sub&gt;1&lt;/sub&gt;. Therefore, during this period, the object travels a distance of (&lt;i&gt;d&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; - &lt;i&gt;d&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt;).&lt;br /&gt;
&lt;br /&gt;
Using "energy = force × distance" for a constant drag force &lt;i&gt;D&lt;/i&gt; over a distance of (&lt;i&gt;d&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; - &lt;i&gt;d&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt;) gives:&lt;br /&gt;
&lt;img alt="E_{dragB2} = - D_{B2} (d_a - d_b) = k V (d_a - d_b)" src="http://www.forkosh.dreamhost.com/mathtex.cgi?E_%7BdragB2%7D%20=%20-%20D_%7BB2%7D%20%28d_a%20-%20d_b%29%20=%20k%20V%20%28d_a%20-%20d_b%29" style="vertical-align: -2pt;" title="E_{dragB2} = - D_{B2} (d_a - d_b) = k V (d_a - d_b)" /&gt;&lt;br /&gt;
(The negative sign is, again, because we are calculating energy required to &lt;b&gt;mitigate&lt;/b&gt; drag; anyway, that's not important here.)&lt;br /&gt;
&lt;br /&gt;
Applying the same&amp;nbsp;&lt;i&gt;v&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; = &lt;i&gt;u&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; + 2 &lt;i&gt;a&lt;/i&gt; &lt;i&gt;s&lt;/i&gt; for object &lt;b&gt;A&lt;/b&gt; and &lt;b&gt;B&lt;/b&gt; (part 1):&lt;br /&gt;
&lt;img alt="V^2 = 0^2 + 2 a_a d_a \Rightarrow V = \sqrt{2 a_a d_a}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?V%5E2%20=%200%5E2%20+%202%20a_a%20d_a%20%5CRightarrow%20V%20=%20%5Csqrt%7B2%20a_a%20d_a%7D" style="vertical-align: -2pt;" title="V^2 = 0^2 + 2 a_a d_a \Rightarrow V = \sqrt{2 a_a d_a}" /&gt;&lt;br /&gt;
&lt;img alt="V^2 = 0^2 + 2 a_b d_b \Rightarrow d_b = \frac{V^2}{2 a_b}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?V%5E2%20=%200%5E2%20+%202%20a_b%20d_b%20%5CRightarrow%20d_b%20=%20%5Cfrac%7BV%5E2%7D%7B2%20a_b%7D" style="vertical-align: -2pt;" title="V^2 = 0^2 + 2 a_b d_b \Rightarrow d_b = \frac{V^2}{2 a_b}" /&gt;&lt;br /&gt;
&lt;br /&gt;
The total drag energy for object &lt;b&gt;B&lt;/b&gt; is therefore:&lt;br /&gt;
&lt;img alt="\begin{align*}
 &amp;amp; E_{dragB} \\
 &amp;amp; = E_{dragB1} + E_{dragB1} \\
 &amp;amp; = \frac{2}{3} k \sqrt{2 a_b d_b^3} + k V (d_a - d_b) \leftarrow \textup{substitute} \; d_b = \frac{V^2}{2 a_b} \\ 
 &amp;amp; = \frac{2}{3} k \sqrt{2 a_b \left(\frac{V^2}{2 a_b}\right)^3} + k V \left( d_a - \frac{V^2}{2 a_b} \right) \leftarrow \textup{simplify} \\ 
 &amp;amp; = k V d_a - \frac{k V^3}{6 a_b} \leftarrow \textup{substitute} \; V = \sqrt{2 a_a d_a} \\
 &amp;amp; = k \left( \sqrt{2 a_a d_a} \right) d_a - \frac{k \left( \sqrt{2 a_a d_a} \right)^3}{6 a_b} \leftarrow \textup{simplify} \\
 &amp;amp; = k \sqrt{2 a_a d_a^3} - \frac{k \sqrt{2 a_a^3 d_a^3}}{3 a_b} \leftarrow \textup{factorize} \\
 &amp;amp; = \frac{2}{3} k \sqrt{2 a_a d_a^3} \left( \frac{3}{2} - \frac{a_a}{2 a_b} \right) \\
 &amp;amp; = E_{dragA} \left( \frac{3}{2} - \frac{a_a}{2 a_b} \right)
\end{align*}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?%5Cbegin%7Balign*%7D%0A%20&amp;amp;%20E_%7BdragB%7D%20%5C%5C%0A%20&amp;amp;%20=%20E_%7BdragB1%7D%20+%20E_%7BdragB1%7D%20%5C%5C%0A%20&amp;amp;%20=%20%5Cfrac%7B2%7D%7B3%7D%20k%20%5Csqrt%7B2%20a_b%20d_b%5E3%7D%20+%20k%20V%20%28d_a%20-%20d_b%29%20%5Cleftarrow%20%5Ctextup%7Bsubstitute%7D%20%5C;%20d_b%20=%20%5Cfrac%7BV%5E2%7D%7B2%20a_b%7D%20%5C%5C%20%0A%20&amp;amp;%20=%20%5Cfrac%7B2%7D%7B3%7D%20k%20%5Csqrt%7B2%20a_b%20%5Cleft%28%5Cfrac%7BV%5E2%7D%7B2%20a_b%7D%5Cright%29%5E3%7D%20+%20k%20V%20%5Cleft%28%20d_a%20-%20%5Cfrac%7BV%5E2%7D%7B2%20a_b%7D%20%5Cright%29%20%5Cleftarrow%20%5Ctextup%7Bsimplify%7D%20%5C%5C%20%0A%20&amp;amp;%20=%20k%20V%20d_a%20-%20%5Cfrac%7Bk%20V%5E3%7D%7B6%20a_b%7D%20%5Cleftarrow%20%5Ctextup%7Bsubstitute%7D%20%5C;%20V%20=%20%5Csqrt%7B2%20a_a%20d_a%7D%20%5C%5C%0A%20&amp;amp;%20=%20k%20%5Cleft%28%20%5Csqrt%7B2%20a_a%20d_a%7D%20%5Cright%29%20d_a%20-%20%5Cfrac%7Bk%20%5Cleft%28%20%5Csqrt%7B2%20a_a%20d_a%7D%20%5Cright%29%5E3%7D%7B6%20a_b%7D%20%5Cleftarrow%20%5Ctextup%7Bsimplify%7D%20%5C%5C%0A%20&amp;amp;%20=%20k%20%5Csqrt%7B2%20a_a%20d_a%5E3%7D%20-%20%5Cfrac%7Bk%20%5Csqrt%7B2%20a_a%5E3%20d_a%5E3%7D%7D%7B3%20a_b%7D%20%5Cleftarrow%20%5Ctextup%7Bfactorize%7D%20%5C%5C%0A%20&amp;amp;%20=%20%5Cfrac%7B2%7D%7B3%7D%20k%20%5Csqrt%7B2%20a_a%20d_a%5E3%7D%20%5Cleft%28%20%5Cfrac%7B3%7D%7B2%7D%20-%20%5Cfrac%7Ba_a%7D%7B2%20a_b%7D%20%5Cright%29%20%5C%5C%0A%20&amp;amp;%20=%20E_%7BdragA%7D%20%5Cleft%28%20%5Cfrac%7B3%7D%7B2%7D%20-%20%5Cfrac%7Ba_a%7D%7B2%20a_b%7D%20%5Cright%29%0A%5Cend%7Balign*%7D" style="vertical-align: -2pt;" title="\begin{align*}
 &amp;amp; E_{dragB} \\
 &amp;amp; = E_{dragB1} + E_{dragB1} \\
 &amp;amp; = \frac{2}{3} k \sqrt{2 a_b d_b^3} + k V (d_a - d_b) \leftarrow \textup{substitute} \; d_b = \frac{V^2}{2 a_b} \\ 
 &amp;amp; = \frac{2}{3} k \sqrt{2 a_b \left(\frac{V^2}{2 a_b}\right)^3} + k V \left( d_a - \frac{V^2}{2 a_b} \right) \leftarrow \textup{simplify} \\ 
 &amp;amp; = k V d_a - \frac{k V^3}{6 a_b} \leftarrow \textup{substitute} \; V = \sqrt{2 a_a d_a} \\
 &amp;amp; = k \left( \sqrt{2 a_a d_a} \right) d_a - \frac{k \left( \sqrt{2 a_a d_a} \right)^3}{6 a_b} \leftarrow \textup{simplify} \\
 &amp;amp; = k \sqrt{2 a_a d_a^3} - \frac{k \sqrt{2 a_a^3 d_a^3}}{3 a_b} \leftarrow \textup{factorize} \\
 &amp;amp; = \frac{2}{3} k \sqrt{2 a_a d_a^3} \left( \frac{3}{2} - \frac{a_a}{2 a_b} \right) \\
 &amp;amp; = E_{dragA} \left( \frac{3}{2} - \frac{a_a}{2 a_b} \right)
\end{align*}" /&gt;&lt;br /&gt;
Now that's a weird equation. At least it looks right. If &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; = &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt; then obviously &lt;i&gt;E&lt;/i&gt;&lt;sub&gt;dragA&lt;/sub&gt; = &lt;i&gt;E&lt;/i&gt;&lt;sub&gt;dragB&lt;/sub&gt;, which makes sense. What if &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; &amp;lt; &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt;, as specified by the question? Well, from the equation here, it's obvious that &lt;i&gt;E&lt;/i&gt;&lt;sub&gt;dragA&lt;/sub&gt; &amp;lt; &lt;i&gt;E&lt;/i&gt;&lt;sub&gt;dragB&lt;/sub&gt;. So this is our answer to (2):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;Object &lt;b&gt;B&lt;/b&gt; requires more energy than object &lt;b&gt;A&lt;/b&gt;.&lt;/blockquote&gt;
You can easily find out how much more does it require by using the simplified equation above. (You might be urged to say that the conclusion is "obvious", but I really wanted to confirm this using math. After all I can't just say obvious and put a close to this question, which seems very interesting.)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note: &lt;/b&gt;this equation &lt;b&gt;cannot&lt;/b&gt; be used for &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;a&lt;/sub&gt; &amp;gt; &lt;i&gt;a&lt;/i&gt;&lt;sub&gt;b&lt;/sub&gt;. If so, object &lt;b&gt;B&lt;/b&gt; would have to go backward for part 2 of the motion, in order to negate the extra distance object &lt;b&gt;B&lt;/b&gt; traveled as it slowly accelerated to &lt;i&gt;V&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="4"&gt;&lt;b&gt;Answer for (3)&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;
Alright, now onto question (3)! Okay, we are still using the same equations, except now we use a quadratic relationship between drag and speed:&lt;br /&gt;
&lt;img alt="D = - k v^2" src="http://www.forkosh.dreamhost.com/mathtex.cgi?D%20=%20-%20k%20v%5E2" style="vertical-align: -2pt;" title="D = - k v^2" /&gt; &lt;br /&gt;
Again, &lt;i&gt;k&lt;/i&gt; stands for some constant.&lt;br /&gt;
&lt;br /&gt;
For object &lt;b&gt;A&lt;/b&gt;, start with the integral for &lt;i&gt;E&lt;/i&gt;&lt;sub&gt;dragA&lt;/sub&gt;:&lt;br /&gt;
&lt;img alt="\begin{align*}
 &amp;amp; E_{dragA} \\
 &amp;amp; = - \int_{0}^{d_a} D_A \, dx \\ 
 &amp;amp; = \int_{0}^{d_a} k v^2 \, dx \leftarrow \textup{substitute} \; v = \sqrt{2 a_a x} \\ 
 &amp;amp; = \int_{0}^{d_a} k (\sqrt{2 a_a x})^2 \, dx \\
 &amp;amp; = a_a k d_a^2
\end{align*}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?%5Cbegin%7Balign*%7D%0A%20&amp;amp;%20E_%7BdragA%7D%20%5C%5C%0A%20&amp;amp;%20=%20-%20%5Cint_%7B0%7D%5E%7Bd_a%7D%20D_A%20%5C,%20dx%20%5C%5C%20%0A%20&amp;amp;%20=%20%5Cint_%7B0%7D%5E%7Bd_a%7D%20k%20v%5E2%20%5C,%20dx%20%5Cleftarrow%20%5Ctextup%7Bsubstitute%7D%20%5C;%20v%20=%20%5Csqrt%7B2%20a_a%20x%7D%20%5C%5C%20%0A%20&amp;amp;%20=%20%5Cint_%7B0%7D%5E%7Bd_a%7D%20k%20%28%5Csqrt%7B2%20a_a%20x%7D%29%5E2%20%5C,%20dx%20%5C%5C%0A%20&amp;amp;%20=%20a_a%20k%20d_a%5E2%0A%5Cend%7Balign*%7D" style="vertical-align: -2pt;" title="\begin{align*}
 &amp;amp; E_{dragA} \\
 &amp;amp; = - \int_{0}^{d_a} D_A \, dx \\ 
 &amp;amp; = \int_{0}^{d_a} k v^2 \, dx \leftarrow \textup{substitute} \; v = \sqrt{2 a_a x} \\ 
 &amp;amp; = \int_{0}^{d_a} k (\sqrt{2 a_a x})^2 \, dx \\
 &amp;amp; = a_a k d_a^2
\end{align*}" /&gt;&lt;br /&gt;
&lt;br /&gt;
For object &lt;b&gt;B&lt;/b&gt;, use the same procedure as for question (2):&lt;br /&gt;
&lt;img alt="\begin{align*}
 &amp;amp; E_{dragB} \\
 &amp;amp; = E_{dragB1} +  E_{dragB2} \\
 &amp;amp; = a_b k d_b^2 + ( - D_{B2}) ( d_a - d_b ) \\
 &amp;amp; = a_b k d_b^2 + (k V^2) ( d_a - d_b ) \leftarrow \textup{substitute} \; d_b = \frac{V^2}{2 a_b} \\
 &amp;amp; = a_b k \left( \frac{V^2}{2 a_b} \right)^2 + k V^2 \left( d_a - \frac{V^2}{2 a_b} \right) \leftarrow \textup{simplify} \\
 &amp;amp; = d_a k V^2 - \frac{k V^4}{4 a_b} \leftarrow \textup{substitute} \; V = \sqrt{2 a_a d_a} \\
 &amp;amp; = d_a k \left( \sqrt{2 a_a d_a} \right)^2 - \frac{k \left( \sqrt{2 a_a d_a} \right)^4}{4 a_b} \leftarrow \textup{simplify} \\
 &amp;amp; = 2 a_a k d_a^2 - \frac{k a_a^2 d_a^2}{a_b} \leftarrow \textup{factorize}  \\
 &amp;amp; = a_a k d_a^2 \left( 2 - \frac{a_a}{a_b} \right) \\
 &amp;amp; = E_{dragA} \left( 2 - \frac{a_a}{a_b} \right)
\end{align*}" src="http://www.forkosh.dreamhost.com/mathtex.cgi?%5Cbegin%7Balign*%7D%0A%20&amp;amp;%20E_%7BdragB%7D%20%5C%5C%0A%20&amp;amp;%20=%20E_%7BdragB1%7D%20+%20%20E_%7BdragB2%7D%20%5C%5C%0A%20&amp;amp;%20=%20a_b%20k%20d_b%5E2%20+%20%28%20-%20D_%7BB2%7D%29%20%28%20d_a%20-%20d_b%20%29%20%5C%5C%0A%20&amp;amp;%20=%20a_b%20k%20d_b%5E2%20+%20%28k%20V%5E2%29%20%28%20d_a%20-%20d_b%20%29%20%5Cleftarrow%20%5Ctextup%7Bsubstitute%7D%20%5C;%20d_b%20=%20%5Cfrac%7BV%5E2%7D%7B2%20a_b%7D%20%5C%5C%0A%20&amp;amp;%20=%20a_b%20k%20%5Cleft%28%20%5Cfrac%7BV%5E2%7D%7B2%20a_b%7D%20%5Cright%29%5E2%20+%20k%20V%5E2%20%5Cleft%28%20d_a%20-%20%5Cfrac%7BV%5E2%7D%7B2%20a_b%7D%20%5Cright%29%20%5Cleftarrow%20%5Ctextup%7Bsimplify%7D%20%5C%5C%0A%20&amp;amp;%20=%20d_a%20k%20V%5E2%20-%20%5Cfrac%7Bk%20V%5E4%7D%7B4%20a_b%7D%20%5Cleftarrow%20%5Ctextup%7Bsubstitute%7D%20%5C;%20V%20=%20%5Csqrt%7B2%20a_a%20d_a%7D%20%5C%5C%0A%20&amp;amp;%20=%20d_a%20k%20%5Cleft%28%20%5Csqrt%7B2%20a_a%20d_a%7D%20%5Cright%29%5E2%20-%20%5Cfrac%7Bk%20%5Cleft%28%20%5Csqrt%7B2%20a_a%20d_a%7D%20%5Cright%29%5E4%7D%7B4%20a_b%7D%20%5Cleftarrow%20%5Ctextup%7Bsimplify%7D%20%5C%5C%0A%20&amp;amp;%20=%202%20a_a%20k%20d_a%5E2%20-%20%5Cfrac%7Bk%20a_a%5E2%20d_a%5E2%7D%7Ba_b%7D%20%5Cleftarrow%20%5Ctextup%7Bfactorize%7D%20%20%5C%5C%0A%20&amp;amp;%20=%20a_a%20k%20d_a%5E2%20%5Cleft%28%202%20-%20%5Cfrac%7Ba_a%7D%7Ba_b%7D%20%5Cright%29%20%5C%5C%0A%20&amp;amp;%20=%20E_%7BdragA%7D%20%5Cleft%28%202%20-%20%5Cfrac%7Ba_a%7D%7Ba_b%7D%20%5Cright%29%0A%5Cend%7Balign*%7D" style="vertical-align: -2pt;" title="\begin{align*}
 &amp;amp; E_{dragB} \\
 &amp;amp; = E_{dragB1} +  E_{dragB2} \\
 &amp;amp; = a_b k d_b^2 + ( - D_{B2}) ( d_a - d_b ) \\
 &amp;amp; = a_b k d_b^2 + (k V^2) ( d_a - d_b ) \leftarrow \textup{substitute} \; d_b = \frac{V^2}{2 a_b} \\
 &amp;amp; = a_b k \left( \frac{V^2}{2 a_b} \right)^2 + k V^2 \left( d_a - \frac{V^2}{2 a_b} \right) \leftarrow \textup{simplify} \\
 &amp;amp; = d_a k V^2 - \frac{k V^4}{4 a_b} \leftarrow \textup{substitute} \; V = \sqrt{2 a_a d_a} \\
 &amp;amp; = d_a k \left( \sqrt{2 a_a d_a} \right)^2 - \frac{k \left( \sqrt{2 a_a d_a} \right)^4}{4 a_b} \leftarrow \textup{simplify} \\
 &amp;amp; = 2 a_a k d_a^2 - \frac{k a_a^2 d_a^2}{a_b} \leftarrow \textup{factorize}  \\
 &amp;amp; = a_a k d_a^2 \left( 2 - \frac{a_a}{a_b} \right) \\
 &amp;amp; = E_{dragA} \left( 2 - \frac{a_a}{a_b} \right)
\end{align*}" /&gt;&lt;br /&gt;
Once again, the same conclusion can be drawn, which also answers question (3):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;Object &lt;b&gt;B&lt;/b&gt; requires more energy than object &lt;b&gt;A&lt;/b&gt;.&lt;/blockquote&gt;
In reality, drag works in a very complex way, but for a simplified situation, it seems that cars do burn more fuel when accelerating faster.&lt;br /&gt;
&lt;br /&gt;
Disappointingly, I realized that, upon closer examination of the sketched graphs shown above, I realized that it was surprisingly obvious that object &lt;b&gt;B&lt;/b&gt; would definitely require more energy than object &lt;b&gt;A&lt;/b&gt;, but, at least, we now have some equations that actually describe &lt;b&gt;how much more&lt;/b&gt; energy object &lt;b&gt;B&lt;/b&gt; would require compared to object &lt;b&gt;A&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-1371012003563493987?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/1371012003563493987/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/07/dragging-energy.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1371012003563493987?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1371012003563493987?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/YjDWmbgrn0I/dragging-energy.html" title="Dragging energy" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp1.blogger.com/_7Ix7g8J0iac/SHBgPU7KOMI/AAAAAAAAAHs/9UrWWzLMzSI/s72-Rc/Dragging+Energy.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/07/dragging-energy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUANRXs7fSp7ImA9WxdXGE4.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-2260795180701773204</id><published>2008-06-30T06:30:00.000-04:00</published><updated>2008-06-30T09:49:54.505-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-30T09:49:54.505-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>Inscribed Pentagons</title><content type="html">One of the questions I was thinking when I was bored and looking at tiles for no reason was:&lt;br /&gt;&lt;br /&gt;Is it possible to draw a rectangle that goes through every point of a pentagon?&lt;br /&gt;&lt;br /&gt;For a regular pentagon, the answer is a definite yes. For any other pentagons, I wasn't so sure, but I still tried to draw one. Here's how I did it:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;a href="http://1.bp.blogspot.com/_7Ix7g8J0iac/SGjjzIwGe9I/AAAAAAAAAHg/hXmtopgVF6U/s1600-h/Pentagon-Inscribed+Rectangle.png" imageanchor="1" style="border: 0pt none ; background-color: transparent; margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://1.bp.blogspot.com/_7Ix7g8J0iac/SGjjzIwGe9I/AAAAAAAAAHg/mnWuhY1sIok/s320-R/Pentagon-Inscribed+Rectangle.png" style="border: 0pt none ;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;However, apparently it cannot be done for &lt;i&gt;any &lt;/i&gt;kind of pentagon. Many can be done, but a lot of twisted abberations of pentagons may not be converted to a rectangle, unless you actually leave the drawing at stage 3 (shown in diagram above) and actually call those four red lines a "rectangle".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Still, it was fun to think of such a question, although I'm not sure if it's practical. By the way, do you notice that there will always be at least one side of the pentagon coinciding with a side of the rectangle?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-2260795180701773204?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/2260795180701773204/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/06/inscribed-pentagons.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/2260795180701773204?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/2260795180701773204?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/OM_6H_OucVM/inscribed-pentagons.html" title="Inscribed Pentagons" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_7Ix7g8J0iac/SGjjzIwGe9I/AAAAAAAAAHg/mnWuhY1sIok/s72-Rc/Pentagon-Inscribed+Rectangle.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/06/inscribed-pentagons.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4FQn86fSp7ImA9WxdXF0g.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-1976813048419851565</id><published>2008-06-25T06:06:00.005-04:00</published><updated>2008-06-29T10:48:33.115-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-29T10:48:33.115-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>Transformations</title><content type="html">Matrix transformations is a clean and somewhat simple way of performing simple transformations. (Don't get thrown off by the word "matrix" because it has nothing to do with movies here.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I won't go into detail about &lt;a href="http://en.wikipedia.org/wiki/Matrix_%28mathematics%29"&gt;Matrices&lt;/a&gt;, since they are basic high school math. Instead I'm going to talk about the important practical aspects relevant in geometry and computing. The kinds of transformation that I'm referring to here are called "affine" transformations, according to Wikipedia (which I realized just now). Suppose you have a simple rectangle. A matrix can be used to transform the rectangle by multiplying onto each and every point of the rectangle. That is, suppose the rectangle has four points A, B, C &amp;amp; D (all of which are vectors), then a matrix &lt;font style="font-weight: bold;"&gt;M&lt;/font&gt; can be used to transform onto a new rectangle A', B', C' &amp;amp; D' (notice the prime notation) by this formula:&lt;br /&gt;&lt;br /&gt;A' = &lt;font style="font-weight: bold;"&gt;M&lt;/font&gt; A (notice that this is M times A)&lt;br /&gt;&lt;br /&gt;B' = &lt;font style="font-weight: bold;"&gt;M&lt;/font&gt; B&lt;br /&gt;&lt;br /&gt;C' = &lt;font style="font-weight: bold;"&gt;M&lt;/font&gt; C&lt;br /&gt;&lt;br /&gt;D' = &lt;font style="font-weight: bold;"&gt;M&lt;/font&gt; D&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is a straightforward exercise for computers, as long as they are optimized for matrix multiplication (like some newer graphics cards are). Matrix don't just transform rectangles, though. They can applied to any set of points (in this example there were four of them).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There's another way to transform, which is used more often in computing. They are necessary because normal 2x2 matrices cannot perform "translation" upon 2D points. 3x3 matrices are used instead. However, 3x3 matrices can't multiply 1x2 column vectors, so we use a 1x3 column vector instead, with the first two values the same as the 1x2 column vector and the third value being 1. Now we can also &lt;i&gt;&lt;font&gt;translate &lt;/font&gt;&lt;/i&gt;vectors.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="text-align: center; clear: both;"&gt;&lt;a href="http://2.bp.blogspot.com/_7Ix7g8J0iac/SGeez7vZq7I/AAAAAAAAAHY/L7rRPWN9tyU/s1600-h/Transformation+Matrices.png" imageanchor="1" style="border: 0pt none ; background-color: transparent; margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://2.bp.blogspot.com/_7Ix7g8J0iac/SGeez7vZq7I/AAAAAAAAAHY/4aphDkkLGZc/s320-R/Transformation+Matrices.png" style="border: 0pt none ;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The diagram above shows some sample transformations, how transformation works and how 3x3 matrices can also transform. Remember that transformation is simply "multiplication" of a matrix with a column vector, and that for 3x3 matrices. Also notice that transformation matrices are really a combination of the transformed &lt;font style="font-weight: bold;"&gt;i&lt;/font&gt;-vector and transformed &lt;font style="font-weight: bold;"&gt;j&lt;/font&gt;-vector.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Apparently, it was really easy to use these matrices for transformations in my &lt;a href="http://google.com/search?q=site%3Afreiddy.blogspot.com+mjs"&gt;MJS Analyzer&lt;/a&gt; program. They would certain save a lot of trouble for me. However, note that computer matrix transformations are not exactly alike mathematical ones, since they use &lt;b&gt;row &lt;/b&gt;vectors instead of column vectors, and thus, during multiplication, the matrix is placed &lt;b&gt;after &lt;/b&gt;the vector instead of before. This can lead to some confusion, and the matrix used might look slightly different due to this. (For example, the matrix might be diagonally inverted, i.e., rows become columns and vice versa.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here's a tip that might be useful (although &lt;b&gt;I have not proven the idea&lt;/b&gt;, I think it should be valid):&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;These two transformations are in fact equivalent:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Scale by factor N from center (a, b).&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;and &lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Translate by (-a, -b).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Scale by factor N from center (0, 0).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Translate by (a, b).&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;I found this useful since the .NET &lt;a href="http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.matrix.aspx"&gt;System.Drawing.Drawing2D.Matrix&lt;/a&gt; doesn't provide a scaling from center (a, b). Instead I had to use the second equivalent method since it only provided a scaling from origin.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-1976813048419851565?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/1976813048419851565/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/06/transformations.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1976813048419851565?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1976813048419851565?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/YFgR5LVXVl8/transformations.html" title="Transformations" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_7Ix7g8J0iac/SGeez7vZq7I/AAAAAAAAAHY/4aphDkkLGZc/s72-Rc/Transformation+Matrices.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/06/transformations.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUMRH07eyp7ImA9WxdRGUU.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-4111283714872883242</id><published>2008-06-02T23:39:00.006-04:00</published><updated>2008-06-08T23:31:25.303-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-08T23:31:25.303-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><title>AppData</title><content type="html">When I first got Vista, it took me a little while to adjust to it. Compared to Windows XP, there were quite a few changes to the directory system. (Note: the drive letters are intentionally left out; so &lt;span style="font-style: italic;"&gt;\MyFolder&lt;/span&gt; should mean &lt;span style="font-style: italic;"&gt;C:\MyFolder&lt;/span&gt; if your system is on drive &lt;span style="font-style: italic;"&gt;C:&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;For example, the default user directory in WinXP is normally&lt;span style="font-style: italic;"&gt; \Documents and Settings\[user name]&lt;/span&gt;. Now, in Vista, it has been changed to:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\Users\[user name]&lt;/span&gt;&lt;br /&gt;which is actually a lot simpler than it used to be. I never understood why a long folder name like "&lt;span style="font-style: italic;"&gt;Documents and Settings&lt;/span&gt;" should be used anyway.&lt;br /&gt;&lt;br /&gt;In WinXP, the personal files folder is called "My Documents". In Vista, it is called "Documents", perhaps for simplicity. This means that the new path is:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\Users\[user name]\Documents&lt;/span&gt;&lt;br /&gt;The My Pictures, My Music, and My Videos folders have all been trasferred out of the Documents folder, straight into the default user directory, and they are now located at:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\Users\[user name]\Pictures&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\Users\[user name]\Music&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\Users\[user name]\Videos&lt;/span&gt;&lt;br /&gt;Personally, I think it's a good change, since it makes things a lot simpler (and no more "My" words, which can be considered redundant).&lt;br /&gt;&lt;br /&gt;The Favorites folder is still where it should be:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\Users\[user name]\Favorites&lt;/span&gt;&lt;br /&gt;although I rarely use this folder at all since I'm using Firefox. (Maybe they should add a "Bookmarks" folder, but I doubt that'll happen.)&lt;br /&gt;Same goes for the Desktop folder:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;\Users\[user name]\Desktop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are new folders as well, such as:&lt;br /&gt;\Users\[user name]\Contacts (I'm not sure if this is new, maybe it was there in XP)&lt;br /&gt;\Users\[user name]\Links ("Favorite Links" in the left sidebar of the Vista explorer)&lt;br /&gt;\Users\[user name]\Saved Games (Stores saved Windows games)&lt;br /&gt;\Users\[user name]\Searches (Stores searches)&lt;br /&gt;Although I don't quite remember the last time I used any them.&lt;br /&gt;&lt;br /&gt;Now for the hidden folders. In WinXP, I often had to tweak stuff in the &lt;span style="font-style: italic;"&gt;\Documents and Settings\[user name]\Application Data&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;\Documents and Settings\[user name]\Local Settings&lt;/span&gt; folders, but I couldn't find them when I first got Vista. So here's where they are found now:&lt;br /&gt;&lt;br /&gt;For &lt;span style="font-style: italic;"&gt;\Documents and Settings\All Users\Application Data&lt;/span&gt;,&lt;br /&gt;Go to: &lt;span style="font-style: italic;"&gt;\ProgramData&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For &lt;span style="font-style: italic;"&gt;\Documents and Settings\[user name]\Application Data&lt;/span&gt;,&lt;br /&gt;Go to: &lt;span style="font-style: italic;"&gt;\Users\[user name]\AppData\Roaming&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For &lt;span style="font-style: italic;"&gt;\Documents and Settings\[user name]\Local Settings\Application Data&lt;/span&gt;,&lt;br /&gt;Go to: &lt;span style="font-style: italic;"&gt;\Users\[user name]\AppData\Local&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are some subtleties in this direct one-to-one mapping system I'm presenting here, but it'll suffice for those who are new to the Vista directory system. (If I made any mistakes, feel free to correct me.)&lt;br /&gt;&lt;br /&gt;Anyone noticed that there are hidden, unopenable folders in the default user directory (i.e. \Users\[user name]) named "My Documents", "My Music", "My Pictures", etc.?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-4111283714872883242?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/4111283714872883242/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/06/appdata.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/4111283714872883242?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/4111283714872883242?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/2cOSwxLZtJ4/appdata.html" title="AppData" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/06/appdata.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QMRng7fCp7ImA9WxdSGE0.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-1749371415308643351</id><published>2008-05-24T23:06:00.004-04:00</published><updated>2008-05-26T08:36:27.604-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-26T08:36:27.604-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>True &amp; false</title><content type="html">&lt;blockquote&gt;"Person A says B is telling the truth; person B says C is telling a lie; person C says A is..."&lt;/blockquote&gt;I've seen a lot of questions like these. Often the wording can be so awkward that it confuses me, but eventually I realized that this is not only a logic problem, it can be converted into a simple algebraic problem. So I decided to share this little technique that I use to work out these problems.&lt;br /&gt;&lt;br /&gt;We start by &lt;span style="font-weight: bold;"&gt;defining&lt;/span&gt;:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;True&lt;/span&gt; = +1&lt;br /&gt;&lt;span style="font-style: italic;"&gt;False&lt;/span&gt; = -1&lt;br /&gt;&lt;br /&gt;You might wonder why I chose the numbers this way and not the other way around. Don't worry, it'll be obvious in a second. Now let's figure out how a statement can be distorted by a "liar".&lt;br /&gt;&lt;br /&gt;Suppose we know that person D, a "liar", has secretly taken a cookie. If we ask D, what would he say? He would say he has &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; taken a cookie (or, if he's absurd liar, he might say he has taken two cookies, but that's a more complicated situation that we won't consider). Let's define a variable called "&lt;span style="font-style: italic;"&gt;IsCookieTaken&lt;/span&gt;" and set its value to "&lt;span style="font-style: italic;"&gt;True&lt;/span&gt;". Now here's the critical idea: when a person lies (in a simple way, ignoring any complications), the variable, "&lt;span style="font-style: italic;"&gt;IsCookieTaken&lt;/span&gt;" becomes "&lt;span style="font-style: italic;"&gt;False&lt;/span&gt;", i.e. the inverse of the actual value "&lt;span style="font-style: italic;"&gt;True&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;Apparently, we can classify any Boolean response into a "&lt;span style="font-style: italic;"&gt;True&lt;/span&gt;" value and a "&lt;span style="font-style: italic;"&gt;False&lt;/span&gt;" value (by Boolean, I mean questions that have only two answers, "Yes" or "No", "&lt;span style="font-style: italic;"&gt;True&lt;/span&gt;" or "&lt;span style="font-style: italic;"&gt;False&lt;/span&gt;", Lying or Not Lying, Cookie Taken or Cookie Not Taken, etc.).&lt;br /&gt;&lt;br /&gt;So let's define a variable called "&lt;span style="font-style: italic;"&gt;d&lt;/span&gt;" whose value stands for whether person D is lying or not. If D is lying, we give the variable "&lt;span style="font-style: italic;"&gt;d&lt;/span&gt;" a value of "&lt;span style="font-style: italic;"&gt;False&lt;/span&gt;", or -1. If D is telling the truth, we give "&lt;span style="font-style: italic;"&gt;d&lt;/span&gt;" a value of "&lt;span style="font-style: italic;"&gt;True&lt;/span&gt;", or +1. (Assume we don't know if D is a liar.) What if D says to you, "I'm telling the truth"?&lt;br /&gt;&lt;br /&gt;Now here's the tricky part: we want an algebraic expression that describes his statement "I'm telling the truth". The operator that is crucial here is the multiplication operator. Compare the following (&lt;span style="font-style: italic;"&gt;X&lt;/span&gt; is just some variable):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Suppose &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = -1, then a liar would say &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = +1.&lt;/li&gt;&lt;li&gt;Suppose &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = -1, then -1 × &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = +1.&lt;/li&gt;&lt;/ol&gt;Notice statement 1 and 2 have the same result "+1", and notice how "a liar would say &lt;span style="font-style: italic;"&gt;X&lt;/span&gt;" seems to correspond to "-1 × &lt;span style="font-style: italic;"&gt;X&lt;/span&gt;" in the two sentences. Now look at next two sentences:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Suppose &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = -1, then a truth-teller would say &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = -1.&lt;/li&gt;&lt;li&gt;Suppose &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = -1, then +1 × &lt;span style="font-style: italic;"&gt;X&lt;/span&gt; = -1.&lt;/li&gt;&lt;/ol&gt;Now notice how "a truth-teller would say &lt;span style="font-style: italic;"&gt;X&lt;/span&gt;" seems to correspond to "-1 * &lt;span style="font-style: italic;"&gt;X&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;If someone tells the truth about X, then the "displayed" value of X is the same. If someone tells a lie about X, then the "displayed" value of X is the opposite. By "displayed" I mean the value of X that can be directly quoted from the person's speech. Here's an example:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A liar says, "X = +1"["displayed" value],&lt;br /&gt;then you would guess that X is actually -1[true value].&lt;/li&gt;&lt;li&gt;A truth-teller says, "X = -1"["displayed" value],&lt;br /&gt;then you would guess that X is in fact -1[true value].&lt;/li&gt;&lt;/ul&gt;Now here's the harder-to-grasp part. What if we don't know if the person (say, person D) is lying or not? Well, we use the variable "&lt;span style="font-style: italic;"&gt;d&lt;/span&gt;" that we defined before. Recall &lt;span style="font-style: italic;"&gt;d&lt;/span&gt; = +1 for a truth-teller D, while &lt;span style="font-style: italic;"&gt;d&lt;/span&gt; = -1 for a liar D.&lt;br /&gt;&lt;br /&gt;D said, "I'm telling the truth". Now let's rephrase this into: D said, "&lt;span style="font-style: italic;"&gt;d&lt;/span&gt; = +1". The rephrasing is exactly equivalent to the "I'm telling the truth" phrase, since d = +1 means that D is a truth-teller, but the quotation marks stress the fact that we do &lt;span style="font-weight: bold;"&gt;not &lt;/span&gt;really know that d = +1, but rather D &lt;span style="font-weight: bold;"&gt;said &lt;/span&gt;so (i.e. +1 is the &lt;span style="font-weight: bold;"&gt;displayed&lt;/span&gt; value of D, not the actual value). In other words, D may have "modified" the true value of D, resulting in the "displayed" value. The "modification" process can be considered as multiplication. Now we can form another algebraic expression for it:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;d&lt;/span&gt; × &lt;span style="font-style: italic;"&gt;d&lt;/span&gt; = +1&lt;/blockquote&gt;The initial "&lt;span style="font-style: italic;"&gt;d&lt;/span&gt; ×" part stands for the modifier (i.e. the speaker, modifying the truth), while the second "&lt;span style="font-style: italic;"&gt;d&lt;/span&gt;" part stands for the variable that is being modified.&lt;br /&gt;&lt;br /&gt;Simplify the expression, and you get &lt;span style="font-style: italic;"&gt;d&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt; = +1. This means there are two solutions for &lt;span style="font-style: italic;"&gt;d&lt;/span&gt;, +1 and -1. That is, D could be telling the truth, or he could be a liar, and one cannot determine which without additional information.&lt;br /&gt;&lt;br /&gt;Sounds strange huh? But it D really says, "I'm telling the truth", he could be telling the truth about himself, but he could also be lying about himself. We don't know. But the algebraic way allowed us to get the answer mathematically.&lt;br /&gt;&lt;br /&gt;Now suppose person E says, "I'm telling a lie." This time, the equation is &lt;span style="font-style: italic;"&gt;e&lt;/span&gt; × &lt;span style="font-style: italic;"&gt;e&lt;/span&gt; = -1 accordingly, and there is no real number solution for &lt;span style="font-style: italic;"&gt;e&lt;/span&gt;. What does this mean? Well, it means what E said was a logical fallacy, and would result in contradictions. If E is telling the truth, then E can't say "I'm telling a lie." If E is lying, then E can't say "I'm telling a lie," since this would mean that E is saying the truth.&lt;br /&gt;&lt;br /&gt;However, there are more complicated situations. Suppose:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Person A says, "B would say I'm telling the truth."&lt;/li&gt;&lt;li&gt;Person B says, "A would say A is telling the truth."&lt;/li&gt;&lt;li&gt;Only one of them is telling the truth, and their other is a liar.&lt;/li&gt;&lt;/ol&gt;Now isn't this confusing? Let's simplify these two statements into:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A says [B says (A is truth-teller)]&lt;br /&gt;&lt;/li&gt;&lt;li&gt;B says [A says (A is truth-teller)]&lt;/li&gt;&lt;li&gt;A is opposite of B&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Apparently, there are &lt;span style="font-weight: bold;"&gt;two &lt;/span&gt;layers of "modification" instead of the usual one layer. Again, we convert this into algebraic form using variables "&lt;span style="font-style: italic;"&gt;a&lt;/span&gt;" and "&lt;span style="font-style: italic;"&gt;b&lt;/span&gt;" as well as multiplication.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt; × [&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; × (&lt;span style="font-style: italic;"&gt;a&lt;/span&gt;)] = 1&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt; × [&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; × (&lt;span style="font-style: italic;"&gt;a&lt;/span&gt;)] = 1&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt; = -&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; (This statement implies that if one is negative then the other is positive.)&lt;/li&gt;&lt;/ol&gt;Simplify the equations to get:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span style="font-style: italic;"&gt; b&lt;/span&gt; = 1&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; = 1&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt; = -&lt;span style="font-style: italic;"&gt;b&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Apparently, equation 1 and 2 are the same, but with two equations remaining, we should still be able find &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;b&lt;/span&gt;.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span style="font-style: italic;"&gt; b&lt;/span&gt; = 1&lt;br /&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span style="font-style: italic;"&gt; b&lt;/span&gt; / &lt;span style="font-style: italic;"&gt;a&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt; = 1 / &lt;span style="font-style: italic;"&gt;a&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; = 1 / 1 (Since &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; is either -1 or +1, &lt;span style="font-style: italic;"&gt;a&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt; must be +1.)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; = +1&lt;br /&gt;&lt;span style="font-style: italic;"&gt;a&lt;/span&gt; = -&lt;span style="font-style: italic;"&gt;b&lt;/span&gt; = -1&lt;br /&gt;&lt;/blockquote&gt;So B was telling the truth, while A was lying, and without having to go through all the hassles and confusion, the algebraic method really makes solving similar problems easier.&lt;br /&gt;&lt;br /&gt;Really all this is just a simplified version of &lt;span style="font-weight: bold;"&gt;Boolean algebra&lt;/span&gt;. There's even a &lt;a href="http://en.wikipedia.org/wiki/Knights_and_Knaves"&gt;whole article on this&lt;/a&gt;, but with a strange name (it's a little too specific, but then again, I don't even know what the real name of this kind of logic puzzle is).&lt;br /&gt;&lt;ul&gt;&lt;li&gt;There are lot's of questions like these, but this "simplified-Boolean" method does have limits. For example: of two people A &amp;amp; B, A says "Either I am a liar or B is a truth-teller." You can use "trial &amp;amp; error" for this question. (Answers will still be posted here.) &lt;a href="http://ux1.eiu.edu/%7Ecfbxb/class/1900/formal/ch3/knkn/knight.htm"&gt;A formal method to solve this question can be found here&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-1749371415308643351?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/1749371415308643351/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/05/true-false.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1749371415308643351?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/1749371415308643351?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/-b_HLqS4AdA/true-false.html" title="True &amp; false" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/05/true-false.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUINRHw_eip7ImA9WxdSEko.&quot;"><id>tag:blogger.com,1999:blog-6230074663135239660.post-7559839076523216270</id><published>2008-05-19T01:22:00.005-04:00</published><updated>2008-05-20T04:53:15.242-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-20T04:53:15.242-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Computers" /><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics" /><title>Base 64</title><content type="html">Apparently there's this really neat way of transferring information that I never even noticed: base-64.&lt;br /&gt;&lt;br /&gt;Firstly, there's the great binary: 0 and 1.&lt;br /&gt;Then there's the octal: 0 ~ 7.&lt;br /&gt;And who could forget the decimal: 0 ~ 9.&lt;br /&gt;Last but not least there's the hexadecimal: 0 ~ 9, A ~ F.&lt;br /&gt;&lt;br /&gt;But now, the newcomer is base-64: A~Z, a~z, 0~9, +, /.&lt;br /&gt;Apparently, a few days before I even saw this article, I had noticed that:&lt;br /&gt;"with all the possible letters, capital and lowercase, and all the numbers, there are only 62 characters, so I need 2 more to make a perfect 64."&lt;br /&gt;&lt;br /&gt;So now I see this come true (long before I even thought of this)... Anyway, the last two characters are merely by convention (MIME convention, to be exact). Now, I can, theoretically, encode any array of bytes into a string of keyboard-inputable characters. (Using characters like "âéïõù" simply won't do: most of us don't have those on our keyboards so they are hard to type.)&lt;br /&gt;&lt;br /&gt;This is a really neat idea, except for one thing: one byte is 8-bits; one base-64 number is 6-bits. So there is the possibility of "left-over" bits at the end. No problem: this is handled by the "=" character.&lt;br /&gt;&lt;br /&gt;For a simple string in which every character is a byte, each 3 bytes (3 × 8-bits = 24-bits) can be converted into 4 base-64 numbers (4 × 6-bits = 24-bits). Thus, there is the possibility of one or two bytes left over at the end of the string, unconverted. What happens now is that the remaining byte(s) required to cover three full bytes is filled in by a padding character, usually a &lt;span style="font-family:courier new;"&gt;0x00&lt;/span&gt; character. For example, suppose that one byte with a value of &lt;span style="font-family:courier new;"&gt;0x20&lt;/span&gt; remains after all the byte-triplets are converted. Then, two extra &lt;span style="font-family:courier new;"&gt;0x00&lt;/span&gt; bytes are appended, making the last triplet (&lt;span style="font-family:courier new;"&gt;0x20&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;0x00&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;0x00&lt;/span&gt;). This is then converted into base-64, as normal, but then two "=" characters are appended to indicate that two blank bytes are added, so that these bytes are removed when the string is decoded back into bytes. If, instead, two bytes remain, then one padding character is added and one "=" character is added to the end of the converted string.&lt;br /&gt;&lt;br /&gt;Alright, that's my brief introduction (really brief) to base-64. For detailed info, see the &lt;a href="http://en.wikipedia.org/wiki/Base64#Example"&gt;Wikipedia article&lt;/a&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Does Python have an easy-to-use way of encoding a string into base-64 in the built-in modules?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6230074663135239660-7559839076523216270?l=scilearn.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://scilearn.blogspot.com/feeds/7559839076523216270/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://scilearn.blogspot.com/2008/05/base-64.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/7559839076523216270?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6230074663135239660/posts/default/7559839076523216270?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SciLearn/~3/UhCLOKmwXMs/base-64.html" title="Base 64" /><author><name>Freiddie</name><uri>http://www.blogger.com/profile/03865249073406225407</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09201075625279266355" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://scilearn.blogspot.com/2008/05/base-64.html</feedburner:origLink></entry></feed>
