<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>nklein software &#187; algebra</title>
	<atom:link href="http://nklein.com/tags/algebra/feed/" rel="self" type="application/rss+xml" />
	<link>http://nklein.com</link>
	<description>software development and consulting</description>
	<lastBuildDate>Tue, 22 May 2012 03:48:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Making Fun Algebra Problems Funner</title>
		<link>http://nklein.com/2010/10/making-fun-algebra-problems-funner/</link>
		<comments>http://nklein.com/2010/10/making-fun-algebra-problems-funner/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 18:55:15 +0000</pubDate>
		<dc:creator>pat</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[algebra]]></category>
		<category><![CDATA[recreational math]]></category>

		<guid isPermaLink="false">http://nklein.com/?p=1481</guid>
		<description><![CDATA[A month ago, a friend posted the following problem on Facebook. I just noticed it this week. The goal is to find the exact length of the radius . I love this kind of math problem.  It has a bunch of features that make it a great, toy math problem. It looks like it&#8217;s going [...]]]></description>
			<content:encoded><![CDATA[<p>A month ago, a friend posted the following problem on Facebook.  I just noticed it this week.<br />
<a rel="attachment wp-att-1483" href="http://nklein.com/2010/10/making-fun-algebra-problems-funner/circle-puzzle/"><img class="aligncenter size-full wp-image-1483" title="circle-puzzle" src="http://nklein.com/wp-content/uploads/2010/10/circle-puzzle.png" alt="Drawing of a circle with radius r sitting on a line with two squares wedged against it.  One square has side-length 1, the other side-length 2.  There are six units between the squares." width="511" height="390" /></a><br />
The goal is to find the exact length of the radius <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_de3adc820dbc4655c45b5555765fe84b.png" title="r" style="vertical-align:-20%;" class="tex" alt="r" />.</p>
<p>I love this kind of math problem.  It has a bunch of features that make it a great, toy math problem.</p>
<blockquote><ul>
<li>It looks like it&#8217;s going to be easy, but at the same time seems at a glance to not have enough information</li>
<li>It looks like a geometry problem but only requires that you know:
<ul>
<li>All radii of a circle have the same length</li>
<li>A radius to a point where a tangent line touches the circle is perpendicular to that tangent line</li>
</ul>
</li>
<li>It requires only very basic algebra:
<ul>
<li>Pythagorean theorem</li>
<li>Solving quadratics</li>
</ul>
</li>
<li>The numbers in the problem are small, non-zero integers</li>
</ul>
</blockquote>
<p>I spent the next 25 minutes and six pieces of paper working the problem.  About 20% of the time that I spent was rechecking my work.  Why did I bother rechecking my work on a toy problem?</p>
<p><em>Warning: Spoilers ahead.  If you like this kind of problem, stop reading now and play with it first.</em></p>
<p><a name="continued"><br />
<h3>The problem with the problem</h3>
<p></a></p>
<p>This problem failed to satisfy one of my other criterion for great, toy puzzle problems.</p>
<blockquote><ul>
<li>The answer is a small natural number (or the current year)</li>
</ul>
</blockquote>
<p>I am notorious for messing up signs when doing large algebra calculations.  I had to check and recheck all of my work to make sure that I hadn&#8217;t done <img src="http://l.wordpress.com/latex.php?latex=5x%20-%20%283x%20-%202%29&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="5x - (3x - 2)" style="vertical-align:-20%;" class="tex" alt="5x - (3x - 2)" /> and gotten <img src="http://l.wordpress.com/latex.php?latex=2x%20-%202&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="2x - 2" style="vertical-align:-20%;" class="tex" alt="2x - 2" /> somewhere.  If I had come up with an integer value for <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_de3adc820dbc4655c45b5555765fe84b.png" title="r" style="vertical-align:-20%;" class="tex" alt="r" />, I&#8217;d have been done.  Instead, the answer involved a half-integer plus a multiple of <img src="http://l.wordpress.com/latex.php?latex=%5Csqrt%7B74%7D&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="\sqrt{74}" style="vertical-align:-20%;" class="tex" alt="\sqrt{74}" />.</p>
<p>What?  <img src="http://l.wordpress.com/latex.php?latex=%5Csqrt%7B74%7D&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="\sqrt{74}" style="vertical-align:-20%;" class="tex" alt="\sqrt{74}" />?!?  Raise your hand if you&#8217;ve ever seen that written anywhere before this problem.</p>
<p>That&#8217;s what I thought.</p>
<p>So, I spent the next hour looking for a different set of numbers to put in for 1, 2, and 6 so that the radius <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_de3adc820dbc4655c45b5555765fe84b.png" title="r" style="vertical-align:-20%;" class="tex" alt="r" /> would come out to an integer.  My approach was Brownian, at best.  I threw Pythagorean triples at a wall until one stuck.</p>
<p>The sticky triple left me with <img src="http://l.wordpress.com/latex.php?latex=%5B50%2C200%2C360%5D&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="[50,200,360]" style="vertical-align:-20%;" class="tex" alt="[50,200,360]" /> to put in place of <img src="http://l.wordpress.com/latex.php?latex=%5B1%2C2%2C6%5D&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="[1,2,6]" style="vertical-align:-20%;" class="tex" alt="[1,2,6]" />.  So, I put the problem down for awhile.</p>
<p>The next time that I was in the car, I realized that the radius for the sticky triple was less than <img src="http://l.wordpress.com/latex.php?latex=200&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="200" style="vertical-align:-20%;" class="tex" alt="200" />.  That meant that the larger box was touching the upper half of the circle instead of the lower half.  The circle had to overlap the box.</p>
<p>So, I was back to the drawing board.  Of course, I&#8217;d have been back to the drawing board at some point anyway because that sticky triple violated both of my small numbers criteria.</p>
<p><em>Warning:  If you want to play around with finding a set of numbers that work, do it before you read the following.  There are even more spoilers ahead.</em></p>
<h3>Infinitely many combinations to get an integer radius</h3>
<p>When I next sat down to play (pronounced: /OBSESS/) with this problem, I quickly hit upon the following way to take any Pythagorean triple <img src="http://l.wordpress.com/latex.php?latex=%28a%2C%20b%2C%20c%29&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="(a, b, c)" style="vertical-align:-20%;" class="tex" alt="(a, b, c)" /> and make a version of the above puzzle where the radius <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_de3adc820dbc4655c45b5555765fe84b.png" title="r" style="vertical-align:-20%;" class="tex" alt="r" /> is an integer.<br />
<a rel="attachment wp-att-1486" href="http://nklein.com/2010/10/making-fun-algebra-problems-funner/circle-puzzle-triple/"><img class="aligncenter size-full wp-image-1486" title="circle-puzzle-triple" src="http://nklein.com/wp-content/uploads/2010/10/circle-puzzle-triple.png" alt="Same sort of diagram as above except radius is c, boxes are height c-b and c-a, and some (a,b,c) triangles are drawn in" width="633" height="346" /></a></p>
<p>In fact, using a 3-4-5 triangle, it is obvious that had the distance between the blocks in the original problem been 7 instead of 6, the radius would have been a small natural number.</p>
<p>Now.  Now, I had infinitely many ways to construct this problem so that the radius was an integer.  But, did I have all of the ways?</p>
<h3>All your configuration are belong to us</h3>
<p>When looking at that last diagram, the first question that comes to mind (for me) is: <q>Do I really need to use the same Pythagorean triple on the left and right triangles?</q>  The answer, of course, is <q>No.</q></p>
<p>If I have two Pythagorean triples <img src="http://l.wordpress.com/latex.php?latex=%28a_1%2Cb_1%2Cc_1%29&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="(a_1,b_1,c_1)" style="vertical-align:-20%;" class="tex" alt="(a_1,b_1,c_1)" /> and <img src="http://l.wordpress.com/latex.php?latex=%28a_2%2Cb_2%2Cc_2%29&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="(a_2,b_2,c_2)" style="vertical-align:-20%;" class="tex" alt="(a_2,b_2,c_2)" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_fa25a1c273232af978e96f1ea4331d79.png" title="d" style="vertical-align:-20%;" class="tex" alt="d" /> is any (positive) divisor of both <img src="http://l.wordpress.com/latex.php?latex=c_1&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="c_1" style="vertical-align:-20%;" class="tex" alt="c_1" /> and <img src="http://l.wordpress.com/latex.php?latex=c_2&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="c_2" style="vertical-align:-20%;" class="tex" alt="c_2" />, then I can start with an <img src="http://l.wordpress.com/latex.php?latex=a_1-b_1-c_1&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="a_1-b_1-c_1" style="vertical-align:-20%;" class="tex" alt="a_1-b_1-c_1" /> triangle on the left and an <img src="http://l.wordpress.com/latex.php?latex=a_2-b_2-c_2&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="a_2-b_2-c_2" style="vertical-align:-20%;" class="tex" alt="a_2-b_2-c_2" /> triangle on the right.  I can then scale up the left triangle by <img src="http://l.wordpress.com/latex.php?latex=c_2%2Fd&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="c_2/d" style="vertical-align:-20%;" class="tex" alt="c_2/d" /> and scale the right triangle up by <img src="http://l.wordpress.com/latex.php?latex=c_1%2Fd&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="c_1/d" style="vertical-align:-20%;" class="tex" alt="c_1/d" />.  Now, both triangles have the same hypotenuse.</p>
<p>This means that if the left block has height <img src="http://l.wordpress.com/latex.php?latex=c_2%20%28c_1%20-%20b_1%29%2Fd&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="c_2 (c_1 - b_1)/d" style="vertical-align:-20%;" class="tex" alt="c_2 (c_1 - b_1)/d" />, the right block has height <img src="http://l.wordpress.com/latex.php?latex=c_1%28c_2%20-%20b_2%29%2Fd&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="c_1(c_2 - b_2)/d" style="vertical-align:-20%;" class="tex" alt="c_1(c_2 - b_2)/d" />, the distance between the two blocks is <img src="http://l.wordpress.com/latex.php?latex=%28c_2%20a_1%20%2B%20c_1%20a_2%29%2Fd&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="(c_2 a_1 + c_1 a_2)/d" style="vertical-align:-20%;" class="tex" alt="(c_2 a_1 + c_1 a_2)/d" />, and the resulting circle has radius <img src="http://l.wordpress.com/latex.php?latex=c_1c_2%2Fd&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="c_1c_2/d" style="vertical-align:-20%;" class="tex" alt="c_1c_2/d" />.<br />
<a href="http://nklein.com/2010/10/making-fun-algebra-problems-funner/circle-puzzle-two-triples/" rel="attachment wp-att-1515"><img src="http://nklein.com/wp-content/uploads/2010/10/circle-puzzle-two-triples.png" alt="A more general version of the previous diagrams" title="circle-puzzle-two-triples" width="633" height="336" class="aligncenter size-full wp-image-1515" /></a></p>
<p>Does this cover all of the solutions?  Could I possibly have non-integer <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_2028c58b1756381efb66cd2ca9ae9c69.png" title="a_1" style="vertical-align:-20%;" class="tex" alt="a_1" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_9ff693167d454c907a6c4430d1af2afe.png" title="a_2" style="vertical-align:-20%;" class="tex" alt="a_2" /> such that <img src="http://l.wordpress.com/latex.php?latex=%28c_2a_1%20%2B%20c_1a_2%29%2Fd&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="(c_2a_1 + c_1a_2)/d" style="vertical-align:-20%;" class="tex" alt="(c_2a_1 + c_1a_2)/d" /> is still integer?</p>
<p>Well, for the problem to be formulated entirely with integers, we certainly need the hypotenuse of the right triangles to be an integer.  Further, to make the blocks integer heights then both of the legs of the right triangles along the vertical radius must also be integer.  So, if the triangle on the left had hypotenuse <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_de3adc820dbc4655c45b5555765fe84b.png" title="r" style="vertical-align:-20%;" class="tex" alt="r" />, vertical leg <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_97f4a1ba736119e3cd4de6fca35efd6b.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> and horizontal leg <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" />, then we know that <img src="http://l.wordpress.com/latex.php?latex=a%20%3D%20%5Csqrt%7Br%5E2%20-%20b%5E2%7D&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="a = \sqrt{r^2 - b^2}" style="vertical-align:-20%;" class="tex" alt="a = \sqrt{r^2 - b^2}" /> where both <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_de3adc820dbc4655c45b5555765fe84b.png" title="r" style="vertical-align:-20%;" class="tex" alt="r" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_97f4a1ba736119e3cd4de6fca35efd6b.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> are integers.  Thus, <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> must be the square root of an integer.</p>
<p>It is easy to see that if <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> were a non-integer rational number, then its square would also be a non-integer rational number.  So, either <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> is integer or it is the irrational square root of an integer.</p>
<p>So, can <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> be an irrational number?  If <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> were an irrational number, then the horizontal leg of the other triangle would have to be some integer <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_18a633fc025e2f1a862f7c8de3b31d6c.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> minus the irrational <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> for the distance between the two blocks to be an integer.  Let&#8217;s say the vertical leg of the triangle on the right is <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_ed45436c4512976c4600afab449577d8.png" title="\beta" style="vertical-align:-20%;" class="tex" alt="\beta" />.   Just like <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_97f4a1ba736119e3cd4de6fca35efd6b.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> in the first triangle, <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_ed45436c4512976c4600afab449577d8.png" title="\beta" style="vertical-align:-20%;" class="tex" alt="\beta" /> must be an integer.  We also know that <img src="http://l.wordpress.com/latex.php?latex=%28n-a%29%5E2%20%3D%20r%5E2%20-%20%5Cbeta%5E2&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="(n-a)^2 = r^2 - \beta^2" style="vertical-align:-20%;" class="tex" alt="(n-a)^2 = r^2 - \beta^2" />.  This, in turn, means that <img src="http://l.wordpress.com/latex.php?latex=a%20%3D%20%28%5Cbeta%5E2%20%2B%20n%5E2%20%2B%20a%5E2%20-%20r%5E2%29%20%2F%20%282n%29&#038;bg=FFFFCC&#038;fg=000000&#038;s=0" title="a = (\beta^2 + n^2 + a^2 - r^2) / (2n)" style="vertical-align:-20%;" class="tex" alt="a = (\beta^2 + n^2 + a^2 - r^2) / (2n)" />.  The right hand side is clearly rational, so <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3cad95c81df4676e1b14e93cbb0b18ae.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> could not have been irrational.</p>
<p>So, there you have it:  all of the numbers that make this problem have all integers on the drawing and an integer answer.</p>
]]></content:encoded>
			<wfw:commentRss>http://nklein.com/2010/10/making-fun-algebra-problems-funner/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finding the Perfect Hyperbola</title>
		<link>http://nklein.com/2010/02/finding-the-perfect-hyperbola/</link>
		<comments>http://nklein.com/2010/02/finding-the-perfect-hyperbola/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 20:53:18 +0000</pubDate>
		<dc:creator>pat</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[algebra]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[vecto]]></category>

		<guid isPermaLink="false">http://nklein.com/?p=1189</guid>
		<description><![CDATA[For an application that I&#8217;m working on, I needed a way to scale quantities that range (theoretically) over the real numbers (though practically are probably between plus and minus three) into positive numbers. I wanted the function to be everywhere increasing, I wanted , and I wanted control of the derivative at . The easy [...]]]></description>
			<content:encoded><![CDATA[<p>For an application that I&#8217;m working on, I needed a way to scale quantities that range (theoretically) over the real numbers (though practically are probably between plus and minus three) into positive numbers.  I wanted the function to be everywhere increasing, I wanted <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_c1cb7a5bdd50535b670e023bf91a94fc.png" title="f(0) = 1" style="vertical-align:-20%;" class="tex" alt="f(0) = 1" />, and I wanted control of the derivative at <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_055bb38e2223c10cbcfd8330867c873f.png" title="x = 0" style="vertical-align:-20%;" class="tex" alt="x = 0" />.</p>
<p>The easy choice is: <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_1664c465b5fa480b7e4896c0ece77e57.png" title="f(x) = e^{\alpha x}" style="vertical-align:-20%;" class="tex" alt="f(x) = e^{\alpha x}" />.  This is monotonically increasing.  <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_c1cb7a5bdd50535b670e023bf91a94fc.png" title="f(0) = 1" style="vertical-align:-20%;" class="tex" alt="f(0) = 1" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_ed9cb8fb0eee1cd2d3a17d75a4c58847.png" title="f^\prime(0) = \alpha" style="vertical-align:-20%;" class="tex" alt="f^\prime(0) = \alpha" />.</p>
<p>I needed to scale three such quantities and mush them together.  I thought it&#8217;d be spiffy then to have three different functions that satisfy my criteria.  The next logical choice was <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_7b757a3e18f1bca442c93c1065331ed4.png" title="f(x) = 1 + \mathrm{tanh} (\alpha x)" style="vertical-align:-20%;" class="tex" alt="f(x) = 1 + \mathrm{tanh} (\alpha x)" />.  It is everywhere positive and increasing.  And, it has <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_ed9cb8fb0eee1cd2d3a17d75a4c58847.png" title="f^\prime(0) = \alpha" style="vertical-align:-20%;" class="tex" alt="f^\prime(0) = \alpha" />.</p>
<p>Now, I needed third function that was always positive, always increasing, had <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_c1cb7a5bdd50535b670e023bf91a94fc.png" title="f(0) = 1" style="vertical-align:-20%;" class="tex" alt="f(0) = 1" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_ed9cb8fb0eee1cd2d3a17d75a4c58847.png" title="f^\prime(0) = \alpha" style="vertical-align:-20%;" class="tex" alt="f^\prime(0) = \alpha" />.  One choice was:  <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_5e73c987e194dae7b18809999c7cedd6.png" title="f(x) = e^{e^{\alpha x} - 1}" style="vertical-align:-20%;" class="tex" alt="f(x) = e^{e^{\alpha x} - 1}" />.  But, that seemed like overkill.  It also meant that I really had to keep my <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_a7175a60e504c64ad51e7119b44ee9aa.png" title="\alpha" style="vertical-align:-20%;" class="tex" alt="\alpha" /> tiny if I didn&#8217;t want to scale things into the stratosphere.</p>
<h3>Playing with hyperbolas</h3>
<p><a href="http://nklein.com/wp-content/uploads/2010/02/hyperbola.png"><img src="http://nklein.com/wp-content/uploads/2010/02/hyperbola-300x300.png" alt="" title="hyperbola" width="300" height="300" class="alignright size-medium wp-image-1191" /></a>So, I thought&#8230; why don&#8217;t I make a hyperbola, rotate it, and shift it so that the apex of one side of the hyperbola is at <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_899c0ad792ee5fca9071f5bbeb6fc9ad.png" title="(0,1)" style="vertical-align:-20%;" class="tex" alt="(0,1)" />.  And, I can adjust the parameters of the hyperbola so that <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_2213bb99d8be759f217ca55bd95edd12.png" title="f'(0) = \alpha" style="vertical-align:-20%;" class="tex" alt="f'(0) = \alpha" />.  After a variety of false starts where I tried to keep the hyperbola general until the very end (<img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_65fc2db1a4b8c991b7049c4fe78eed83.png" title="\frac{x^2}{a^2} - \frac{y^2}{b^2} = r^2" style="vertical-align:-20%;" class="tex" alt="\frac{x^2}{a^2} - \frac{y^2}{b^2} = r^2" />, rotated by <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_0004c76178a1d078888badee6891a8bd.png" title="\theta" style="vertical-align:-20%;" class="tex" alt="\theta" /> degrees, and shifted by <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_ed45436c4512976c4600afab449577d8.png" title="\beta" style="vertical-align:-20%;" class="tex" alt="\beta" />), I quickly got bogged down in six or seven incredibly ugly equations in eight or nine variables.</p>
<p>So, it was time to start trying to make it easy from the beginning.   I noticed that if was going to rotate it by an angle <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_0004c76178a1d078888badee6891a8bd.png" title="\theta" style="vertical-align:-20%;" class="tex" alt="\theta" /> in the clockwise direction, then I needed <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_b4a257df561663115406a382c2fdfb00.png" title="\phi = \frac{\pi}{2} - \theta" style="vertical-align:-20%;" class="tex" alt="\phi = \frac{\pi}{2} - \theta" /> to be such that <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_1537f3082a10cb5448ec9dabe01a0d12.png" title="\tan \phi = \alpha" style="vertical-align:-20%;" class="tex" alt="\tan \phi = \alpha" /> if my slope was going to work out right in the end.<a href="http://nklein.com/wp-content/uploads/2010/02/triangle.png"><img src="http://nklein.com/wp-content/uploads/2010/02/triangle-150x150.png" alt="" title="triangle" width="150" height="150"  style="clear: right;" class="alignright size-thumbnail wp-image-1192" /></a>   So, I&#8217;m looking at the basic triangle on the right then to determine all of my sines and cosines and such.</p>
<p>Based on that triangle, it was also obvious that the asymptote for my starting hyperbola had to have <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_16d704e03ab06854b6f15c35ef6b6c63.png" title="\frac{b}{a} = \frac{1}{\alpha}" style="vertical-align:-20%;" class="tex" alt="\frac{b}{a} = \frac{1}{\alpha}" />.  I played around a bit then with making <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_cbc4d0c9418a975cd07b3481c3233e22.png" title="a = \alpha" style="vertical-align:-20%;" class="tex" alt="a = \alpha" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_76ad81f0c9a6b05231a9d44eb84b8637.png" title="b = 1" style="vertical-align:-20%;" class="tex" alt="b = 1" />.  In the end, I found things simplified sooner if I started with <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_bfc64db88044b1bed880f65ab006c520.png" title="a = 1" style="vertical-align:-20%;" class="tex" alt="a = 1" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_56f3ac4506d4d0fd32c01984d7ea7fa5.png" title="b = \frac{1}{\alpha}" style="vertical-align:-20%;" class="tex" alt="b = \frac{1}{\alpha}" />.</p>
<p>I also needed <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_de3adc820dbc4655c45b5555765fe84b.png" title="r" style="vertical-align:-20%;" class="tex" alt="r" /> to be such that the point <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_6351922e40bc95d55bb60e1fe4fb18fd.png" title="(-r,0)" style="vertical-align:-20%;" class="tex" alt="(-r,0)" /> rotate up so that its <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_e561f1e00880abb7e58816455af00a48.png" title="y" style="vertical-align:-20%;" class="tex" alt="y" />-coordinate was <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_e04a0c4d52e7f8537abf80bb9beb4a8a.png" title="1" style="vertical-align:-20%;" class="tex" alt="1" />.  This meant that <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_82520310515e5f6f8a4d1dd2a84c782a.png" title="r \sin \theta = 1" style="vertical-align:-20%;" class="tex" alt="r \sin \theta = 1" /> or <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_5f02e0b2b4a7ef37d5076f74f518a6ca.png" title="r = \frac{1}{\sin \theta} = \sqrt{1 + \alpha^2}" style="vertical-align:-20%;" class="tex" alt="r = \frac{1}{\sin \theta} = \sqrt{1 + \alpha^2}" />.</p>
<p>So, my starting hyperbola then was: <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_f0b77c1ca12c3756fceacceb7ee4ac21.png" title="x^2 - \alpha^2 y^2 = 1 + \alpha^2" style="vertical-align:-20%;" class="tex" alt="x^2 - \alpha^2 y^2 = 1 + \alpha^2" />.</p>
<p>From there, I had to rotate the <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_1a507c5494969dc6de305770cadc6630.png" title="x" style="vertical-align:-20%;" class="tex" alt="x" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_e561f1e00880abb7e58816455af00a48.png" title="y" style="vertical-align:-20%;" class="tex" alt="y" /> by <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_0004c76178a1d078888badee6891a8bd.png" title="\theta" style="vertical-align:-20%;" class="tex" alt="\theta" /> in the clockwise direction.  This gave me:<br />
<center><img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_d54c652aea88202bb256c37f3d486786.png" title="(x\cos\theta - y\sin\theta)^2 - \alpha^2 (x\sin\theta + y\cos\theta)^2 = 1 + \alpha^2" style="vertical-align:-20%;" class="tex" alt="(x\cos\theta - y\sin\theta)^2 - \alpha^2 (x\sin\theta + y\cos\theta)^2 = 1 + \alpha^2" /></center></p>
<p>A little multiplying out leads to:<br />
<center><img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_802799f8a59061e695ae8624b0a1a115.png" title="(x^2\cos^2\theta - 2xy\sin\theta\cos\theta + y^2\sin^2\theta) \\ - \alpha^2(x^2\sin^2\theta + 2xy\sin\theta\cos\theta + y^2\cos^2\theta) = 1 + \alpha^2" style="vertical-align:-20%;" class="tex" alt="(x^2\cos^2\theta - 2xy\sin\theta\cos\theta + y^2\sin^2\theta) \\ - \alpha^2(x^2\sin^2\theta + 2xy\sin\theta\cos\theta + y^2\cos^2\theta) = 1 + \alpha^2" /></center></p>
<p>From there, using <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_ba506e83b38225aee1a949dfefa8f98b.png" title="cos^2\theta = \frac{\alpha^2}{1 + \alpha^2}" style="vertical-align:-20%;" class="tex" alt="cos^2\theta = \frac{\alpha^2}{1 + \alpha^2}" />, <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_63a5ce798225d66ffd828cbf6adc0d27.png" title="sin^2\theta = \frac{1}{1 + \alpha^2}" style="vertical-align:-20%;" class="tex" alt="sin^2\theta = \frac{1}{1 + \alpha^2}" />, and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_31893ba13c851bec319d1e84fa273c4f.png" title="\sin\theta\cos\theta = \frac{\alpha}{1 + \alpha^2}" style="vertical-align:-20%;" class="tex" alt="\sin\theta\cos\theta = \frac{\alpha}{1 + \alpha^2}" />, we come to:</p>
<p><center><img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_932ad4d95a72a6cae8c353b9bce95524.png" title="\frac{-2\alpha(1 + \alpha^2)xy + ( 1 - \alpha^4 )y^2}{1 + \alpha^2} = -2\alpha{}xy +  (1 - \alpha^2)y^2 = 1 + \alpha^2" style="vertical-align:-20%;" class="tex" alt="\frac{-2\alpha(1 + \alpha^2)xy + ( 1 - \alpha^4 )y^2}{1 + \alpha^2} = -2\alpha{}xy +  (1 - \alpha^2)y^2 = 1 + \alpha^2" /></center></p>
<p>The only step remaining was to shift it all over so that when <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_409ec858a4679ef8370133dc2076b0b0.png" title="y = 1" style="vertical-align:-20%;" class="tex" alt="y = 1" />, we end up with <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_055bb38e2223c10cbcfd8330867c873f.png" title="x = 0" style="vertical-align:-20%;" class="tex" alt="x = 0" />.  Plugging in <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_409ec858a4679ef8370133dc2076b0b0.png" title="y = 1" style="vertical-align:-20%;" class="tex" alt="y = 1" />, we see that <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_1150678e298fe9f8e85ddc65f9fec594.png" title="-2x\alpha + 1 - \alpha^2 = 1 + \alpha" style="vertical-align:-20%;" class="tex" alt="-2x\alpha + 1 - \alpha^2 = 1 + \alpha" />.  That equation balances when <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_5ced797303d05efbca9c01afa8b0c01d.png" title="x = -\alpha" style="vertical-align:-20%;" class="tex" alt="x = -\alpha" />.  We want it to balance when <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_055bb38e2223c10cbcfd8330867c873f.png" title="x = 0" style="vertical-align:-20%;" class="tex" alt="x = 0" />, so we&#8217;re going to substitute <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_eb4abeadbac893437197dcaef65065d0.png" title="(x - \alpha)" style="vertical-align:-20%;" class="tex" alt="(x - \alpha)" /> in place of the <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_1a507c5494969dc6de305770cadc6630.png" title="x" style="vertical-align:-20%;" class="tex" alt="x" /> in the above equation to get:<br />
<center><img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_fa1ee19decc1e63df0780f88c698e267.png" title="-2\alpha(x - \alpha)y + (1 - \alpha^2)y^2 = 1 + \alpha^2" style="vertical-align:-20%;" class="tex" alt="-2\alpha(x - \alpha)y + (1 - \alpha^2)y^2 = 1 + \alpha^2" /></center></p>
<p>We can easily verify that the point <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_899c0ad792ee5fca9071f5bbeb6fc9ad.png" title="(0,1)" style="vertical-align:-20%;" class="tex" alt="(0,1)" /> is on the curve.  And, we can implicitly differentiate the above to get:<br />
<center><img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_e3c61432dce722a22bd63f345ff46dfb.png" title="-2\alpha(x - \alpha)\frac{dy}{dx} - 2\alpha{}y + 2(1 - \alpha^2)y\frac{dy}{dx} = 0" style="vertical-align:-20%;" class="tex" alt="-2\alpha(x - \alpha)\frac{dy}{dx} - 2\alpha{}y + 2(1 - \alpha^2)y\frac{dy}{dx} = 0" /></center><br />
Plopping <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_055bb38e2223c10cbcfd8330867c873f.png" title="x = 0" style="vertical-align:-20%;" class="tex" alt="x = 0" /> and <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_409ec858a4679ef8370133dc2076b0b0.png" title="y = 1" style="vertical-align:-20%;" class="tex" alt="y = 1" /> in there, we find that <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_72e4810a86292a1519a296309402d06c.png" title="\frac{dy}{dx} = \alpha" style="vertical-align:-20%;" class="tex" alt="\frac{dy}{dx} = \alpha" />.</p>
<p>This is pretty good as it goes.  The only step is to complete the square to find a nicer expression for <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_e561f1e00880abb7e58816455af00a48.png" title="y" style="vertical-align:-20%;" class="tex" alt="y" /> in terms of <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_1a507c5494969dc6de305770cadc6630.png" title="x" style="vertical-align:-20%;" class="tex" alt="x" />.  We start by adding <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_62383f7ea78be0903e109947ea724843.png" title="\left[ \frac{\alpha}{\sqrt{1 - \alpha^2}} (x - \alpha) \right]^2" style="vertical-align:-20%;" class="tex" alt="\left[ \frac{\alpha}{\sqrt{1 - \alpha^2}} (x - \alpha) \right]^2" /> to both sides to get:<br />
<center><img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_9e6cf43c71372d26b0e06677ad2ac25c.png" title="\left[ \sqrt(1 - \alpha^2)y - \frac{\alpha}{\sqrt{1 - \alpha^2}(x - \alpha)} \right]^2 = 1 + \alpha^2 + \frac{\alpha}{1 - \alpha^2} (x-\alpha)^2" style="vertical-align:-20%;" class="tex" alt="\left[ \sqrt(1 - \alpha^2)y - \frac{\alpha}{\sqrt{1 - \alpha^2}(x - \alpha)} \right]^2 = 1 + \alpha^2 + \frac{\alpha}{1 - \alpha^2} (x-\alpha)^2" /></center></p>
<p>This is easy enough to solve for <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_e561f1e00880abb7e58816455af00a48.png" title="y" style="vertical-align:-20%;" class="tex" alt="y" /> by taking the square root of both sides and shuffling some things about:<br />
<center><img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_bec4a5b2c46a0636d3a736f5a68e1a5b.png" title="y = \frac{\alpha}{1 - \alpha^2}(x - \alpha) + \frac{1}{\sqrt{1 - \alpha^2}} \sqrt{1 + \alpha^2 + \frac{\alpha^2}{1 - \alpha^2}(x - \alpha)^2}" style="vertical-align:-20%;" class="tex" alt="y = \frac{\alpha}{1 - \alpha^2}(x - \alpha) + \frac{1}{\sqrt{1 - \alpha^2}} \sqrt{1 + \alpha^2 + \frac{\alpha^2}{1 - \alpha^2}(x - \alpha)^2}" /></center></p>
<p>Here are all three curves with <img src="http://nklein.com/wp-content/plugins/easy-latex/cache/tex_3fa6bf5c636b83a0ae3d01c31d078f76.png" title="\alpha = \frac{1}{4}" style="vertical-align:-20%;" class="tex" alt="\alpha = \frac{1}{4}" />.  The exponential is in black, the hyperbolic tangent is in red, and the hyperbola is in blue:<br />
<center><a href="http://nklein.com/wp-content/uploads/2010/02/final.png"><img src="http://nklein.com/wp-content/uploads/2010/02/final.png" alt="" title="final" width="522" height="322" class="alignnone size-full wp-image-1218" /></a></center></p>
<p>The first image on the page here was made with Zach&#8217;s <a href="http://www.xach.com/lisp/vecto/">Vecto</a> library with some post-processing in the GIMP.  (Here is the source file: <a href="http://nklein.com/wp-content/uploads/2010/02/hyperbola.lisp">hyperbola.lisp</a>.) The second image was made entirely within the GIMP.  And, the last image was made using <a href="http://fooplot.com/">Foo Plot</a> and the GIMP.</p>
]]></content:encoded>
			<wfw:commentRss>http://nklein.com/2010/02/finding-the-perfect-hyperbola/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clifford Algebras for the Non-Mathie</title>
		<link>http://nklein.com/2009/05/clifford-algebras-for-the-non-mathie/</link>
		<comments>http://nklein.com/2009/05/clifford-algebras-for-the-non-mathie/#comments</comments>
		<pubDate>Sun, 17 May 2009 15:18:53 +0000</pubDate>
		<dc:creator>pat</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Clifford Algebras]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[algebra]]></category>
		<category><![CDATA[non-mathies]]></category>

		<guid isPermaLink="false">http://nklein.com/?p=379</guid>
		<description><![CDATA[I was at a party last night. I mentioned to someone that I was a math geek. She asked, What kind of math are you into now? I said, I really want to learn about Clifford Algebras. She replied, What are they like? Me, I did the deer in headlights thing. I had no idea [...]]]></description>
			<content:encoded><![CDATA[<p>I was at <a href="http://misfit.org/geekprom/index.htm">a party</a> last night.  I mentioned to someone that I was a math geek.</p>
<p>She asked, <q>What kind of math are you into now?</q></p>
<p>I said, <q>I really want to learn about Clifford Algebras.</q></p>
<p>She replied, <q>What are they like?</q></p>
<p>Me, I did the deer in headlights thing.  I had no idea of her math level.  I had my doubts that she&#8217;d ever done Calculus.  I would guess that the quadratic equation was the defining aspect of what she thought of as <q>Algebra</q>.  I didn&#8217;t know where to start.</p>
<p>In thinking back now, I could have at least said something constructive.</p>
<h3>What I Could Have Said</h3>
<p>So, the algebra you learned about in high school was just the tip of a huge body of mathematics.  If you take away the idea that you have to plug a number in for <em>x</em> and just look at the what you can do with the <em>x</em>&#8216;s still in there, there is a whole structure going on.  At more advanced levels, mathematicians work with those structures and other structures like them.</p>
<p>Do you know what a vector is?  One of the easiest ways to think about it is this.  Suppose you&#8217;ve got a number on the number line.  You can kinda think of that number as a one-dimensional vector.  It tells you which direction to go (positive or negative) from zero and how far to go.  Now, if you take something with more dimensions than a line, like a a two-dimensional surface or three-dimensional space, you can still have the idea of what direction to go from zero and how far to go.  You just have to broaden your idea of <q>which direction to go</q>.</p>
<p>So, the algebra that you did through high school is all centered on having <em>x</em> represent a number (a one-dimensional vector).  But, things get a lot hairier if you let <em>x</em> represent a three-dimensional or an eight-dimensional vector.  People generally agree about how to add vectors.  Now, you&#8217;ve got to pick some way to multiply two vectors together.</p>
<p>Clifford Algebras are one system for multiplying vectors together.</p>
<h3>If No One is Hyperventilating, Continue&#8230;</h3>
<p>You can multiply a number by a vector to get another vector.  You can also multiply a vector by a vector to get a bivector.  You can multiply a vector by a bivector to get a trivector.  Etc.  Actually, the <q>etc.</q> is misleading there.  It doesn&#8217;t go on forever.  With Clifford Algebras, you have to pick how many dimensions your vector has.  You can&#8217;t multiply a three-dimensional vector by a four-dimensional vector.</p>
<p>Plus, if you started with a two-dimensional vector, then bivectors are as big as you get.  If you multiply a two-dimensional bivector by a two-dimensional vector, you get a two-dimensional vector.  If you multiply a two-dimensional bivector by another two-dimensional bivector, you just get a number.</p>
<p>But, all of this is probably more than you wanted to know&#8230;. at a party&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://nklein.com/2009/05/clifford-algebras-for-the-non-mathie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

