{"id":14,"date":"2011-12-25T16:22:06","date_gmt":"2011-12-26T00:22:06","guid":{"rendered":"http:\/\/algorithmiclucidity.wordpress.com\/?p=14"},"modified":"2012-07-03T21:40:06","modified_gmt":"2012-07-04T04:40:06","slug":"the-derivative-of-the-natural-logarithm","status":"publish","type":"post","link":"http:\/\/zackmdavis.net\/blog\/2011\/12\/the-derivative-of-the-natural-logarithm\/","title":{"rendered":"The Derivative of the Natural Logarithm"},"content":{"rendered":"<p>Most people learn during their study of the differential and integral calculus that the derivative of the natural logarithm ln <em>x<\/em> is the reciprocal function 1\/<em>x<\/em>. Indeed, sometimes the natural logarithm is <em>defined<\/em> as <span class='MathJax_Preview'><img src='http:\/\/zackmdavis.net\/blog\/wp-content\/plugins\/latex\/cache\/tex_366524ca2170c8c1b35e23953d85218f.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\" \\int_1^x \\frac{1}{t}\\,dt\" \/><\/span><script type='math\/tex'> \\int_1^x \\frac{1}{t}\\,dt<\/script>. However, on observing the graphs of ln <em>x<\/em> and 1\/<em>x<\/em>, the inquisitive seeker of knowledge can hardly fail to notice a disturbing anomaly:<\/p>\n<p><a href=\"http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/lnx3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-thumbnail wp-image-51\" title=\"y=ln(x)\" src=\"http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/lnx3.png?w=150\" alt=\"y=ln(x)\" width=\"150\" height=\"150\" srcset=\"http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/lnx3.png 348w, http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/lnx3-150x150.png 150w, http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/lnx3-300x300.png 300w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a> <a href=\"http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/reciprocalx2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-thumbnail wp-image-52\" title=\"y=1\/x\" src=\"http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/reciprocalx2.png?w=150\" alt=\"y=1\/x\" width=\"150\" height=\"150\" srcset=\"http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/reciprocalx2.png 348w, http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/reciprocalx2-150x150.png 150w, http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/reciprocalx2-300x300.png 300w, http:\/\/zackmdavis.net\/blog\/wp-content\/uploads\/2011\/12\/reciprocalx2-299x300.png 299w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>The natural logarithm is only defined for <em>positive<\/em> numbers; no part of its graph lies in quadrants II or III. But the reciprocal function is defined for all nonzero numbers. So (one <em>cannot<\/em> help oneself but wonder) how could the latter be the derivative of the former? If the graph of the natural logarithm isn't <em>there<\/em> to be differentiated in the left half of the plane, how could its derivative be defined in that region?<br \/>\n<!--more--><br \/>\nSome would-be explorers lose all hope or sanity in the face of such bizarre and inexplicable mysteries, but even those brave souls who manage to retain their wits are not guaranteed success: many (who can say but that most?) will die never knowing the answer. But not you, dear reader!\u2014for in this very post, I will share with you the <em>true secret<\/em> of the derivative of the natural logarithm! Some people may find some of what I am about to say somewhat disturbing, even frightening. But if your love of truth exceeds your fear of the unknown, keep reading, and I will show you the strange world that lies beneath these familiar and seemingly innocent graphs.<\/p>\n<p>You see, dear reader, the natural logarithm is not what we think it is. Your typical person-in-the-street hears talk of the natural logarithm and says, \"Oh, sure, I know all about ln <em>x<\/em>; that's just the exponent you put on base <em>e<\/em> to get <em>x<\/em>.\" And, to be fair, it is. But it's also so much more! Ask our person-in-the-street what exponent you put on base <em>e<\/em> to get negative three, and no doubt she will regard you as mad. \"Manifestly,\" we can imagine her replying, \"<em>manifestly<\/em> there's no such thing. The exponential function <em>e<sup>x<\/sup><\/em> is always positive.\" And, to be fair, it is\u2014<em>if<\/em> you <em>arbitrarily restrict your mind<\/em> to the mundane, oppressive, and <em>boring<\/em> magisterium of the so-called \"real\" numbers!<\/p>\n<p>Probably the dear reader is already familiar with the numbers which are said to be <em>complex<\/em>, those of the form a + b<em>i<\/em>, where <em>i<\/em> is the square root of negative one. (To those who object that taking the square root of a negative number is a feat that simply cannot be done, the proper reply is only, <em>\"Watch me!\"<\/em>) The reader may furthermore recall the Euler formula <em>e<sup>ix<\/sup><\/em> = cos <em>x<\/em> + <em>i<\/em>sin <em>x<\/em>, source of the much-marveled-at identity <em>e<\/em><sup>\u03c0<em>i<\/em><\/sup> = -1. With these prerequisites understood, it's quite reasonable to suspect that if we have a complex exponential, its inverse must be the complex logarithm, and that true apprehension of the nature of such is the key insight that will let us resolve the mystery at hand. And this does, in fact, turn out to be the case\u2014but <em>not so fast<\/em>.<\/p>\n<p>There is a difficulty here that must be explained. The dear reader may still yet furthermore recall that to say that a function is invertible is to say that it is both <em>injective<\/em> (which is to say that every element in the codomain is mapped to by <em>at most<\/em> one element in the domain, which is to say that distinct inputs have distinct outputs) and <em>surjective<\/em> (which is to say that every element in the codomain is mapped to by <em>at least<\/em> one element in the domain, which is to say that our codomain only includes actual outputs of our function). And dear reader, it turns out (to our great horror and distress) that the complex exponential is <em>not injective<\/em>! Was our dream of a complex logarithm nothing but a gaudy delusion?<\/p>\n<p>On further consideration, however, it becomes clear that the situation is not so bad as all that. Probably the dear reader has faced analogous difficulties before. Recall that positive numbers actually have <em>two<\/em> square roots, a positive one and a negative one, and yet we casually designate the positive one as the <em>principal<\/em> square root, yielding us a square root function. We use a similar technique to define inverse trigonometric functions. Is it ugly? Yes. But does it work? Apparently.<\/p>\n<p>So we can perform the same kind of surgical horror in order to get a proper function out of the complex logarithm idea: pick a ray emanating from the origin in the complex plane and <em>cut<\/em> the logarithm there\u2014but I'll spare the dear reader the grisly details, which can be found in any standard text on complex analysis.<\/p>\n<p>There is, however, another point of view. The reason a function needs to be injective in order to be invertible is because <em>functions<\/em> are <em>defined<\/em> such that each input has a unique output. There are reasons for defining it that way, but it is ultimately only a <em>definition<\/em>, a convention for what we mean when we use the world <em>function<\/em>, and mere definitions can't coerce true facts into being something other than what they are. Just because a non-injective function doesn't have an inverse function doesn't mean we can't talk about that-which-inverts-it; it only means that for clear communication, we should avoid calling the inverting-thing a <em>function<\/em>. Just call it a <em>multifunction<\/em> or a <em>relation<\/em> instead. (One can even imagine that if the history of mathematical inquiry had gone differently, we might call multifunctions <em>functions<\/em> and functions (say) <em>deterministic functions<\/em>, although some would argue that it is useless and idle to speculate about worlds that are not our own.)<\/p>\n<p>So if we understand the complex logarithm multifunction as that-which-inverts the complex exponential, then we can understand the logarithm of a negative number -<em>x<sub>0<\/sub><\/em> as ln <em>x<sub>0<\/sub><\/em> + (2<em>n<\/em>+1)\u03c0<em>i<\/em> where <em>n<\/em> \u2208 \u2124, because <em>e<\/em><sup>ln <em>x<sub>0<\/sub><\/em> + (2<em>n<\/em>+1)\u03c0<em>i<\/em><\/sup> = <em>e<\/em><sup>ln <em>x<sub>0<\/sub><\/em><\/sup><em>e<\/em><sup>(2<em>n<\/em>+1)\u03c0<em>i<\/em><\/sup> = -<em>e<\/em><sup>ln <em>x<sub>0<\/sub><\/em><\/sup> = -<em>x<sub>0<\/sub><\/em>.<\/p>\n<p>But now we are ready to resolve the mystery that we set out to explain, of why the reciprocal function is the derivative of the natural logarithm even though no real number is the logarithm of a negative number, for now it is plain to see that the logarithm of a negative number is complex, but the <em>derivative<\/em> of the logarithm is real, because the imaginary part is a constant that drops out when we take the derivative:<\/p>\n<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http:\/\/zackmdavis.net\/blog\/wp-content\/plugins\/latex\/cache\/tex_3f885b65a4c5b6a3c5120013befa7e02.gif' style='vertical-align: middle; border: none;' class='tex' alt=\" f'(-x_0) = \\lim_{h \\to 0} \\frac{f(-x_0+h)-f(x_0)}{h} = \\lim_{h \\to 0} \\frac{(\\ln{(x_0 - h)} + (2n+1)\\pi i) - (\\ln{x_0} + (2n+1)\\pi i)}{h}\" \/><\/span><script type='math\/tex;  mode=display'> f'(-x_0) = \\lim_{h \\to 0} \\frac{f(-x_0+h)-f(x_0)}{h} = \\lim_{h \\to 0} \\frac{(\\ln{(x_0 - h)} + (2n+1)\\pi i) - (\\ln{x_0} + (2n+1)\\pi i)}{h}<\/script><\/p><\/p>\n<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http:\/\/zackmdavis.net\/blog\/wp-content\/plugins\/latex\/cache\/tex_c7481de8cc6426831737d4f1f5b43939.gif' style='vertical-align: middle; border: none;' class='tex' alt=\" = \\lim_{h \\to 0} \\frac{\\ln{(x_0 - h)} - \\ln{x_0}}{h}\" \/><\/span><script type='math\/tex;  mode=display'> = \\lim_{h \\to 0} \\frac{\\ln{(x_0 - h)} - \\ln{x_0}}{h}<\/script><\/p><\/p>\n<p>\u2014which turns out to be -1\/<em>x<sub>0<\/sub><\/em>, as expected.<\/p>\n<p>Some might object that this argument is so sloppy as to be treacherous, misleading, and invalid: we've brazenly assumed that the definition of the derivative familiar from the study of the single-variable calculus can be applied to this complex-valued thing that <em>isn't even a function<\/em>, with no concern for preciseness, rigor, or even the Cauchy-Riemann conditions. But look. Presented with a procedure that <em>makes sense<\/em> and <em>gives the right answer<\/em>, perhaps the dear reader would be so kind as to cut me some goddam slack? I would be ever so much obliged.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most people learn during their study of the differential and integral calculus that the derivative of the natural logarithm ln x is the reciprocal function 1\/x. Indeed, sometimes the natural logarithm is defined as . However, on observing the graphs &hellip; <a href=\"http:\/\/zackmdavis.net\/blog\/2011\/12\/the-derivative-of-the-natural-logarithm\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[14],"_links":{"self":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/14"}],"collection":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":6,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":70,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/14\/revisions\/70"}],"wp:attachment":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}