<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kiran Channayanamath on Medium]]></title>
        <description><![CDATA[Stories by Kiran Channayanamath on Medium]]></description>
        <link>https://medium.com/@ckiran2508?source=rss-d03ae94d8e94------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ghHZZqT5YmgdBL4m</url>
            <title>Stories by Kiran Channayanamath on Medium</title>
            <link>https://medium.com/@ckiran2508?source=rss-d03ae94d8e94------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:44:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ckiran2508/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deriving the Boltzmann factor]]></title>
            <link>https://medium.com/@ckiran2508/boltzmann-distribution-bb35e9c60946?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb35e9c60946</guid>
            <category><![CDATA[boltzmann]]></category>
            <category><![CDATA[boltzmann-distribution]]></category>
            <category><![CDATA[entropy]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 04:34:45 GMT</pubDate>
            <atom:updated>2026-08-20T06:31:28.841Z</atom:updated>
            <content:encoded><![CDATA[<p>On a higher level the Boltzmann factor and distribution gives an estimate about energy probabilities of a gas distribution at a certain temperature.</p><p>In this article we will intuitively derive the mathematical result of this distribution viz the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/167/1*Zj3x7LH05igC_4t2vP43bw.png" /></figure><p>We will first familiarize ourselves with an understanding of entropy from statistical mechanics. Normally we come across entropy as a measure of disorder in a system. But this definition is often inadequate in explaining what it really quantifies. So we will take the expression of entropy from statistical mechanics and use it as starting point to understand it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*HJUiiutZD7b_fYZdXjP4PQ.png" /></figure><p>In the above expression for entropy S,</p><ol><li><strong>k</strong> is the Boltzmann constant, who value is 1.3806 x 10^-23 J/K,</li><li><strong>W </strong>represents the number of microstates or possible arrangements in a system.</li></ol><p>Since <strong>k</strong> is a constant we will ignore its details for now. We will dig in to understand what microstates really mean.</p><p>Lets first consider a problem where there are 3 chocolates and 3 people, and we need to distribute the chocolates such that any person can get 0 or more (maximum 3). In how many ways can we do this.</p><p>This is also popularly called the stars and bars problem and can be solved by combinatorics.</p><p>Below are some of the possible combinations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vlIOAHgpwprqTr5SsWUePA.png" /></figure><p>Now to get the count of all combinations, let us view the problem this way, in the diagram above we can see that there are two boundary lines among three people, now by re-arranging the boundary lines in different positions, we can represent all the possible distributions, take any one combination from above, treat all boundaries and chocolates in a specific positions/slots, that way we get 5 positions/slots as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*ckMY65ky1VutL7dnHi5iMA.png" /></figure><p>The problem is now finding number of ways selecting 2 positions for each boundary line out of 5 positions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*iMsdPaWKPKME7CzP-6mReA.png" /></figure><p>So there are 10 ways of selecting 2 positions for boundary lines out 5, which also means the 3 chocolates can be distributed among 3 people in 10 different ways.</p><p>Lets now qualitatively see the different ways the chocolates being distributed among the 3 people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*pBCmLlWBopQi80S5tNE8BA.png" /></figure><p>Each way of distributing the chocolates can named as a microstate, now we will define something called a macrostate which represents a macrosopic property. In this case, lets define the following macrostates.</p><ol><li>Macrostate 1 -&gt; Number of microstates where person 1 gets all 3 chocolates. viz 1 .</li><li>Macrostate 2-&gt; Number of microstates where person 1 gets 2 chocolates. viz 2.</li><li>Macrostate 3 -&gt; Number of microstates where person 1 gets 1 chocolate. viz 3</li><li>Macrostate 4 -&gt; Number of microstates where person 1 gets no chocolate. viz 4.</li></ol><p>If we were to randomly pick 1 out of the 10 microstates, the probability of picking a microstate which represents Macrostate 4 is more likely to happen as Macrostate 4 has the maximum microstates viz 4.</p><p>We can generalize this by saying that the likeliness or the probability of finding a system in a particular macrostate directly depends on how many microstates that given macrostate can have. This is an important finding and we will use this idea in the later section.</p><p>Now we will generalize the distribution problem by saying for <strong>N</strong> number of people and <strong>k</strong> number of chocolates, the number ways the distribution can happen is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*IbsAkoiRIhyEV4F9K5Ix0g.png" /></figure><p>Now we will consider a gas based system to explore about entropy and the Boltzmann distribution. Below are some of the details about the system.</p><ol><li>The system consists of a monatomic gas having a certain atomic count ( Avagadro magnitude 10²³ ) in an enclosure.</li><li>The energy held by these atoms is only in linear motion or kinetic energy.</li><li>The system has a fixed total energy and it is the sum of kinetic energy of all the atoms.</li><li>The system is in thermal equillibrium, i.e no significant energy exchange outside the system.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*dVV7ZaFKVy4HuzqpUBPiqQ.png" /></figure><p>The whole point of doing the chocolate distribution problem is that we can now extend that understanding to the system described as above. If the system has <strong>N</strong> atoms and a total energy of <strong>E</strong> joules, then problem can be phrased as in how many ways can <strong>E</strong> joules of energy get distributed among <strong>N</strong> atoms.</p><p>From the chocolate distribution exercise we know the count is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*insCKWROAWEqJpj0VtAkpA.png" /></figure><p>The resulting number is the total <strong>microstates</strong> <strong>W </strong>this gas filled system can have, and this system having the fixed <strong>E</strong> joules of energy is treated as a <strong>macrostate</strong>.</p><p>Now in this system, lets say at the beginning that just 1 atom alone out of all the <strong>N</strong> atoms has the total energy <strong>E</strong> joules and the remaining <strong>N-1</strong> atoms have <strong>0</strong> total energy we can still say that the system has a total energy of <strong>E</strong> joules. The difference is the microstate count. In this scenario, the microstate count if one calculates, is just <strong>1, </strong>while the total microsates this system can have for the same macrostate or energy <strong>E </strong>is given by the expression in the last snip.</p><p>The point that I am trying to make here is for a system with energy <strong>E</strong> joules given a choice between having one microsate vs some maximum number, it always tries to reach this maximum number. Once reached the system is said to be in equillibrium.</p><p>If we look at Entropy expression <strong>S = k ln(W),</strong> it is a representation of microstate count.</p><p>We will now try to reason why there is a log operator <strong>(lnW)</strong> and not just <strong>kW</strong> in the Entropy expression.</p><p>Consider two systems each with 3 molecules and having 3 joules of total energy. The total microstates each can have using our recent findings is 10. The two systems are in thermal equillibrium therefore there is no energy exchange between the two or in other words the macrostate value of 3 joules for each system remain fixed. Now if we were to find the total microstates considering both systems, then the answer would be 10 x 10 =100. Now add another such system, the count becomes 1000, while the molecules and energy count increased linearly, the microstate count increased exponentially, therefore even for small increments of gas or energy the microstates count explodes, while entropy being a directly measure of microstates and to have additive nature for entropy change, we take the log of the microstates. Now in the considered set of systems, the total entropy can be expressed as .</p><p>In simple words by taking log of the microstates, entropy becomes a much smaller/manageable number to express and can directly be added when systems are combined.</p><p>Next we will try to answer the question which is for a system in equillibrium and for any single atom what is the probability that it has certain energy <strong>E_i, </strong>where <strong>0 &lt; E_i &lt; E_total. </strong>This is the question that Boltzmann’s factor or Boltzmann’s distribution tries to answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*45HMHa94VIm74e_659CKuQ.png" /></figure><p>The way one can think about this problem is, if an atom has a certain energy <strong>E_i </strong>joules, then the rest of the system (we call it the reservior) has <strong>E_total — E_i </strong>joules, now the likeliness that this atom will have energy <strong>E_i </strong>will depend on the number of microstates the atom itself has for <strong>E_i </strong>and the reservior can have for <strong>E_total — E_i </strong>joules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*LTrazgTbMC0p3OzFZA4uZw.png" /></figure><p>Therefore we can say that greater the product of the count of microstates the atom can have for <strong>E_i</strong> and the reservior for <strong>E_total-E_i</strong>,<strong> </strong>the greater is the probability.</p><ol><li>When <strong>E_i = E_total, </strong>the reservior will have <strong>zero</strong> joules to distribute among the <strong>N-1</strong> atoms, therefore the microstate count for the reservior will be <strong>zero</strong>, and hence the probability of having an atom with <strong>E_total </strong>joules is also <strong>zero.</strong></li><li>When <strong>E_i = 0, </strong>the reservior will have complete <strong>E_total </strong>joules to distribute among the <strong>N-1 </strong>atoms, therefore the micostates count for reservior is maximum. But for the atom with <strong>zero </strong>joules of energy its microstate count is <strong>zero</strong>. Therefore the product is again <strong>zero </strong>and so is the probability.</li><li>Now for any other energy <strong>E_i</strong> that is between <strong>0 &lt; E_i &lt; E_total</strong>, the microstate count for the atom will remain <strong>one</strong>, as the atom itself has only <strong>one</strong> way of storing this energy i.e as kinetic energy. With this we can write the probability expression as following.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*pTnNvrOI8YFay4KnrtUmCw.png" /></figure><p>We will try to get concrete result for the proportionality expression above, we have seen that the microstate expression is a combinatorics expression involving atomic count and of course the total energy. Evaluating the microstates with combinatorics is impractical for large counts and energies. Therefore we will try to get a relation without combinatorics and that involves macroscopic quantities.</p><p>The atom that we had considered was part of a system that had sizeable amount of total energy and sizeable count of atoms as well. Now we will imagine that the reservior has expanded to nearly infinite total energy and atoms, one is free to imagine such a large system. We will enforce the condition that the average energy per atom to remain same before and after expansion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*akTikR6G9J4bu9---qXDXQ.png" /></figure><p>The reason for having the reservior with nearly infinite energy is that we can now say <strong>E_i</strong> to be infinitesimally small amount compared to <strong>E_large</strong> i.e E_large &gt;&gt; E_i, and this allows us to write the Taylor expansion for the entropy expression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*xi_PsOoY-x6LLXP8OE2v3Q.png" /></figure><p>Simplifying</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*5VOed_bG_P4tWOz9iGmN3A.png" /></figure><p>After the above simplifications, we have a form that looks much like the Boltzmann’s factor, we have almost eliminated the total energy <strong>E_inf</strong> from the equation, we will still have to simplify for <strong>dS/dE.</strong></p><p>The term <strong>dS/dE </strong>gives the rate of entropy change with rise in energy, we can somehow guess that it is related to the inverse of the average energy a macroscopic quantity, we will however try to finding the exact relation of it with the average energy.</p><p>So now we have reasonable understanding about microstates, macrostate and entropy. Next we will study how entropy responds when energy is added.</p><p>We will consider a system that Avagadro order of atomic count with a total energy of <strong>E</strong>. We will divide the total energy into much smaller chunks so much so that the energy range becomes continuous<strong>, </strong>as in this case when two atoms interact/collide the energy exchange is not like whole 1J or whole 2J transferred, it can be any value between 1J and 2J. Therefore now we will define <strong>ε </strong>which can be incredibly small least unit of energy that can be transferred, one is free to imagine any small number they can think of. The total units of energy <strong>q = E/ε </strong>units are available in the system.</p><p>We will first simplify our entropy expression, so that we will have a form that is compatible to take derivatives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*XHXe6CG1P6_-u-SGlnWYiQ.png" /></figure><p>Now because <strong>N</strong> and <strong>q</strong> are very large numbers we can apply Stirling’s approximation that will eliminate factorial operators in the expression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*p3sd4mNqR39g4lpxq0JQsw.png" /></figure><p>A typical Sitrling approximation will have many terms to account for accuracy, but we will take the most simplest form of Stirling approximation as the one mentioned above because for macroscopic counts this gives very accurate results.</p><p>Now when applied to the whole Entropy term we get something as following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*q-KSK7nZY39EmGXig3DM-w.png" /></figure><p>Replacing <strong>q</strong> with <strong>E/ε</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*fphdIQUo5nC6YvmIgxyMZA.png" /></figure><p>Now we will take derivative of the above expression w.r.t <strong>E</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*0RLn70pSsRTWWmpQMmzO_w.png" /></figure><p>Here <strong>N </strong>we know will be of Avagadro’s order (x 10²³), <strong>E </strong>lets assume we have around 100kJ of energy, and so <strong>N/E </strong>is still a very large number, but we are allowed to choose <strong>ε </strong>to be any small number and we will choose <strong>ε </strong>such that <strong>εN/E </strong>≈ 0.</p><p>With this consideration we can use the fact ln(1 + x) = x, when x ≈ 0, and we will rewrite the above expression as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*BisLnOyYATkA7NdKalNc1Q.png" /></figure><p><strong>E/N</strong> gives the average energy of each atom, this average energy is macroscopically seen as temperature <strong>T</strong>. Therefore we will use the form <strong>E_avg = k_b*T.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/207/1*AsxbiPzIEAvr6t0G4GxZZg.png" /></figure><p>This is an important result. We have basically come at Thermodynamic definition of entropy using statistical entropy. We will use this result to finally deduce the Boltzmann’s distribution.</p><p>Relating this with the earlier probability statement that we made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*1hM0gP-pxq5VoT8ZOc0GhQ.png" /></figure><p>Now we will normalize the probabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*0dTioMJCv-BRcKfw3afTyA.png" /></figure><p>There we have it the Boltzmann factor and the normalization or the partition function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*MYHqZ2JVbPjS5vJ7xFjo3A.png" /></figure><p>This is a result purely from classical mechanics, therefore it has limitations.</p><ol><li>We have literally treated the atoms as billard balls where the atoms had energy only in linear motion. But in reality the atoms have multiple ways of storing energy in other words many degrees of freedom.</li><li>We choose our energy unit so small, that we made the energy spectrum conitnuous. But in real world Quantum mechanics forbids that.</li><li>This distribution works well for higher temperature and low density systems, otherwise the log approximation no longer holds i.e <strong>ln(1 + εN/E ) ≠</strong> <strong>εN/E, </strong>as <strong>εN/E &gt; 0.</strong></li></ol><p>Further reading.</p><ol><li>Maxwell-Boltzmann distribution.</li><li>Partition function and Equipartition theorem.</li></ol><p>That is it for this post. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb35e9c60946" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Divergence and Curl]]></title>
            <link>https://medium.com/@ckiran2508/divergence-and-curl-49f2aaf44d31?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/49f2aaf44d31</guid>
            <category><![CDATA[divergence]]></category>
            <category><![CDATA[electromagnetism]]></category>
            <category><![CDATA[curl]]></category>
            <category><![CDATA[maxwells-equations]]></category>
            <category><![CDATA[vector-calculus]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Sat, 01 Feb 2025 09:07:33 GMT</pubDate>
            <atom:updated>2025-11-18T16:58:03.202Z</atom:updated>
            <content:encoded><![CDATA[<p>Most of us are familiar of the divergence and curl expressions for a given vector field. In this post we will try to understand divergence and curl qualitatively and try to derive them from their basic mathematical constructs.</p><h3><strong>Divergence</strong></h3><p>Starting with divergence, the divergence of a field at a point gives us a measure of whether the point is behaving as a source(value &gt; 0) or sink ( value &lt; 0) for that field and for a value zero it is neither source nor sink.</p><p>Mathematically divergence for a field <strong>F</strong> at some point <strong>P </strong>is expressed as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*6_03n7j8EsIRzGW_N7z4Qg.png" /><figcaption>Eqn 1.</figcaption></figure><p>We will try to get an understanding of the above expression by doing the following exercise.</p><p>Consider we are calculating flux for some solid surface <strong>S1</strong> in 3D that encloses some point <strong>P, </strong>now consider another solid surface <strong>S2 </strong>that encloses<strong> P </strong>and<strong> </strong>it is enclosed<strong> </strong>by <strong>S1 </strong>also<strong>, </strong>and therefore <strong>S2 </strong>is much closer to <strong>P, </strong>given the nature of the field we get a different flux value for <strong>S2. </strong>Now if we are asked to pick the best approximation of flux at point <strong>P, </strong>among <strong>S1</strong> and <strong>S2</strong>, then by intuition we would go with the flux value from surface <strong>S2.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*rnHjkNd9wseW8WJqZ0L-sg.png" /><figcaption>Fig 1.</figcaption></figure><p>Therefore it is reasonable to think that as we shrink the surface around <strong>P </strong>and calculate the flux we get better approximations for <strong>P, </strong>and so for a surface whose area is infinitesimally small around <strong>P, </strong>we get the best approximation of flux around <strong>P. </strong>We can write that mathematically as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*AKK7ms2PpJZKMGg5o7WRIg.png" /><figcaption>Eqn 2.</figcaption></figure><p>For the next step, we will consider that the surface is directly proportional to its volume, as volume<strong> V </strong>approaches <strong>zero,</strong> surface area<strong> S </strong>also approaches <strong>zero,</strong> so we can make volume <strong>V </strong>as the dependent variable and re-write above expression as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*obJeUZAX5cUToLnEe6NkKA.png" /><figcaption>Eqn 3.</figcaption></figure><p>Now we can conveniently introduce the factor <strong>1/V, </strong>and we get the expression defined in Eqn 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*6_03n7j8EsIRzGW_N7z4Qg.png" /><figcaption>Eqn 4.</figcaption></figure><p>With the introduction of <strong>1/V, </strong>we can see it to be as the ratio of flux at the surface to its volume, this ratio gives the measure of flux per unit volume which for a point like surface at <strong>P </strong>can be called the divergence at <strong>P.</strong></p><p>So in a way we have done a pseudo derivation of the basic form of divergence at some point <strong>P, </strong>and is applicable to any co-ordinate system.</p><p>But in this original form it is of less help to use it to compute divergences at points.</p><p>In the coming steps we will apply the divergence expression in the context of Euclidean co-ordinate system and get a usable form.</p><p>Let us consider a vector field <strong>F (</strong>represented by arrows<strong>) </strong>in a 3D rectangular co-ordinate system, and some point <strong>P </strong>at<strong> &lt;x,y,z&gt;</strong>. We will apply divergence to this point <strong>P.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*1ZMc51CK8jJXzNkctwIHGw.png" /><figcaption>Fig 2.</figcaption></figure><p>A cube <strong>S </strong>is drawn with <strong>P </strong>at its center<strong>, </strong>which acts as a gaussian surface for calculating the flux. The cube although shown visibly large is considered to be infinitesimal such that the field across each face can be considered a constant value, the justification for considering the Gaussian surface as cube is again for that fact that the surface is of infinitesimal size.</p><p>We will write the field vector at <strong>P </strong>as following<strong>,</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*tz17peUO3vimPgFud_JKag.png" /><figcaption>Eqn 5.</figcaption></figure><p>The total flux at <strong>S </strong>is the sum of flux for all <strong>six </strong>faces of the cube.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*voQD1R9ZwEY_MDRqbmL2IQ.png" /><figcaption>Eqn 6.</figcaption></figure><p>We will compute for the first two faces, and by symmetry we can identify for the remaining faces by interchanging the dimensions.</p><p>For the front face we can write the integral as following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*Kp4p9CBFePAL8viS-lmqPQ.png" /><figcaption>Eqn 7.</figcaption></figure><p>The integral for the front face is directly by expressed as the dot product of the field at front and the area for the fact that the field is constant over the front face.</p><p>Now to evaluate the field at the front face, we need a point that lies on the front face, we know that point <strong>P </strong>at <strong>x,y,z</strong> is positioned at the center of the cube, therefore we can say that the point <strong>x+Δx/2,y,z </strong>lies on the front face of the cube. Lets call this point <strong>Q, </strong>and write the field vector at <strong>Q </strong>as follows<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*MlkuOpcM5fvUCoBN8sLlxg.png" /><figcaption>Eqn 8.</figcaption></figure><p>For our dot product we only need the <strong>x-component (F_qx) </strong>of the field vector at <strong>Q</strong>. Next considering that <strong>Δx</strong> is infinitesimal, we will relate <strong>F_qx </strong>and <strong>F_px </strong>by linear approximation or the first order Taylor approximation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uDLjgaorf0-D0OlXErqVBg.png" /><figcaption>Eqn 9.</figcaption></figure><p>Now we will use the boxed result and substitute in <strong>Eqn 7.</strong> for the front face.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*RUTAqVW6SCAwkjgVQgaBFA.png" /><figcaption>Eqn 10.</figcaption></figure><p>For the back face, the area vector <strong>ΔS</strong> will be negative and <strong>Δx </strong>will also be negative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*zoqnwS7ab9JjSn5GyVNP8Q.png" /><figcaption>Eqn 11.</figcaption></figure><p>We add integrals for the front and back and we get the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*Y533PoLmdFsKpG76UgSdtg.png" /><figcaption>Eqn 12.</figcaption></figure><p>By symmetry we get similar results for left, right, top and bottom faces for the respective dimensions. We add them all to get the total surface integral.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*GJiXOF7e1nOjTHIE39lSEA.png" /><figcaption>Eqn 13.</figcaption></figure><p>The surface integral represents the flux through <strong>S, </strong>which is equivalent to the flux through point <strong>P, </strong>this when divided by the volume of <strong>S </strong>is the final divergence expression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*bvbSj_4a2giNxDpB6YVCIQ.png" /><figcaption>Eqn 14.</figcaption></figure><p>In a more simple way we can write as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*9pF-8YAh033N5ThpJRMlMQ.png" /><figcaption>Eqn 15.</figcaption></figure><p>There it is, we have derived the divergence expression for the 3D rectangular co-ordinate system.</p><h3><strong>Curl</strong></h3><p>Curl at a point in a vector field gives a measure of much the field is influencing to cause twirl or rotation at a point, this measure itself is a vector which is normal to the plane of rotation and its direction is given by the right hand thumb rule.</p><p>Mathematically curl for a field <strong>F</strong> at some point <strong>P</strong> can be expressed as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*j22no7YxLgGvC4llPUM9dQ.png" /><figcaption>Eqn 16.</figcaption></figure><p>We will try to understand <strong>Eqn 16, </strong>by doing the following exercise, by applying the same ideologies that we did for divergence.</p><p>Consider a plane surface with our point of interest <strong>P</strong> lying on the surface, this plane is also in under the influence of some vector field <strong>F </strong>shown by the faint gray lines. We will have two loops <strong>L1</strong> and <strong>L2</strong> that lie on this plane and surround the point <strong>P, L2 </strong>is closer to <strong>P </strong>than <strong>L1.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*iwIi42YVF0afTZDe0uWkUA.png" /><figcaption>Fig 3.</figcaption></figure><p>The line integral evaluated at <strong>L1 </strong>and <strong>L2 </strong>can represent the work done by the field <strong>F </strong>for the paths <strong>L1 </strong>and <strong>L2 </strong>if <strong>F </strong>is<strong> </strong>to be considered a force field.<strong> </strong>The direction of traverse is considered counter-clockwise. Now if we are asked to give accurate pick of the line integral for point <strong>P </strong>amongst line integral for <strong>L1</strong> and <strong>L2, </strong>then by intuition it would be the line integral at <strong>L2. </strong>Therefore we easily see a trend where we get more accurate values of line integral at <strong>P </strong>as the loops get smaller around <strong>P, </strong>and when we consider the size of the loop to be infinitesimal(nearly zero), we get the best approximation for the line integral at <strong>P.</strong></p><p>We can write that mathematically as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*SjaMPCTGmJqCpG8UkAtzZw.png" /><figcaption>Eqn 17.</figcaption></figure><p>As the area bounded by the loop is proportional to the loop length we can make above expression depend on the area <strong>S </strong>of the loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*95Pcob4-3s7XXFmr6XRa-g.png" /><figcaption>Eqn 18.</figcaption></figure><p>When we introduce <strong>1/S </strong>to Eqn 19. what we get is the line integral value per unit area, or the rate of change of line integral value per unit increase in area. This in other words can also be defined as the <strong>Curl </strong>of the field at point <strong>P.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*mUqIrUwnh7_O6HjvZSHUwQ.png" /><figcaption>Eqn 19.</figcaption></figure><p>As mentioned before the curl at a point is a vector, the direction of this curl vector is given by the right hand thumb rule, so if the point P rotates counterclockwise then we can imagine right hand fingers pointing in the direction of rotation and the thumb points in the direction of curl vector.</p><p>So just like divergence we did a pseudo derivation of the general form of <strong>Curl. </strong>Now we will set out to apply this expression to the rectangular co-ordinate system and get a usable form of it.</p><p>Let us consider a point <strong>P </strong>at <strong>&lt;x,y,z&gt;</strong> in 3D Euclidean co-ordinates. A vector field <strong>F </strong>of some nature might cause to twirl around <strong>P</strong>.</p><p>To keep matters simple we will consider the vector field having only <strong>y</strong> and <strong>z </strong>components, this way the plane on rotation at any point will be on <strong>Y-Z </strong>plane and the rotation vector will only have the <strong>x-component </strong>i.e normal to <strong>Y-Z </strong>plane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*6IBJvF-oN7QPRv7vqXJCGA.png" /><figcaption>Fig 4.</figcaption></figure><p>The field vector at any point can be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*iKUsUr1ZI4OFQ18AoMt18g.png" /><figcaption>Eqn 20.</figcaption></figure><p>Point <strong>P </strong>is bounded by a rectangular loop <strong>L</strong> of infinitesimal length in <strong>Y-Z</strong> plane, and because of the infinitesimal length, we will allow <strong>y-component (Q) </strong>to remain constant over side <strong>ab </strong>and<strong> cd </strong>for length <strong>Δy, </strong>and <strong>z-component (R) </strong>to remain constant over <strong>bc </strong>and <strong>da </strong>over length <strong>Δz. </strong>However it is important to note that <strong>Q </strong>(y-component) on <strong>ab </strong>and <strong>cd </strong>are not the same, same goes with <strong>bc</strong> and <strong>da</strong> for the <strong>R </strong>(z-component)<strong>.</strong></p><p>We can loosely write the line integral for loop <strong>L </strong>as following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*4Yx98lJvuQGCh_2B1XWIow.png" /><figcaption>Eqn 21.</figcaption></figure><p>Let’s pick the 1st integral and evaluate. Since we have considered the <strong>y-component</strong> of the vector to remain constant over <strong>Δy</strong>, and the integral being the dot product we can write as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*1WAeZOWT8uJo0iVjYGbcqA.png" /><figcaption>Eqn 22.</figcaption></figure><p>Next we will the pick the 3rd integral, and for this term <strong>Δy </strong>will be negative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*8ZwM8wFd25FFK-mX4xJcQA.png" /><figcaption>Eqn 23.</figcaption></figure><p>Adding the 1st and the 3rd integral we see</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*kvmfNSwMRTnU5SQ2gI98vQ.png" /><figcaption>Eqn 24.</figcaption></figure><p>We will again exploit the fact that <strong>Q </strong>is constant over <strong>Δy, </strong>but can change over <strong>Δz, </strong>also <strong>Δz </strong>being infinitesimal<strong> </strong>we can now write</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*dGCvUlhbGqwMjSHOKScaJw.png" /><figcaption>Eqn 25.</figcaption></figure><p>Similarly for the 3rd and the 4th integral terms we can write the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*c5TzMOUkO1E35zdUY0tzHQ.png" /><figcaption>Eqn 26.</figcaption></figure><p>This time we will take advantage of the fact that <strong>R </strong>remains constant over <strong>Δz, </strong>and can change over <strong>Δy, </strong>and <strong>Δy </strong>being infinitesimal we can write.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*bB3gLKOygrxCHZ0QZhv9xg.png" /><figcaption>Eqn 27.</figcaption></figure><p>We can now substitute our findings to <strong>Eqn 21</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*rIhncQv0KCyfcmXL8ODZ8Q.png" /><figcaption>Eqn 28.</figcaption></figure><p>Now when we divide the result with the area of the loop <strong>S, </strong>we get the curl at <strong>P, </strong>which we know is a vector whose direction in our case lies in the <strong>x-dimension</strong> i.e normal to the <strong>Y-Z</strong> plane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*xVcTy4r_WtG1ne5gBZroKw.png" /><figcaption>Eqn 29.</figcaption></figure><p>So we derived <strong>Curl </strong>for a field which had only <strong>y-component(Q)</strong> and <strong>z-component(R), </strong>given the nature of such field<strong>, </strong>the plane of rotation was confined to <strong>Y-Z </strong>plane and we got the curl vector which only has the <strong>x-dimension.</strong></p><p>Now if we allow our field to have the <strong>x-component</strong>, then we will have a field that also exists in <strong>X-Z </strong>plane<strong> </strong>and<strong> X-Y </strong>plane<strong>, </strong>and the final rotation plane at <strong>P </strong>will be the vector sum of the components from each plane and would exists in three dimensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*ETgJsyr1unONY_cBeYmn3Q.png" /><figcaption>Fig 5.</figcaption></figure><p>To get the curl expressions for <strong>X-Z</strong> plane and <strong>X-Y</strong> plane, we can repeat the same series of steps that we did for <strong>Y-Z</strong> plane and we get the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*P0_r1zB8nS1-p8Swyja7Ig.png" /><figcaption>Eqn 30.</figcaption></figure><p>And finally for a field that has <strong>x,y</strong> and <strong>z </strong>components, we can write the curl at any point influenced by this field using the results of the basis vectors from <strong>Eqn 29 </strong>and <strong>Eqn 30</strong>. as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*VM3uuzXdc5cX-P-c1QAYLw.png" /><figcaption>Eqn 31.</figcaption></figure><p>There it is, the expression of <strong>Curl</strong> for the <strong>3D rectangular co-ordinate system</strong>.</p><p>Thanks for reading.</p><p>Further reading.</p><ol><li>Divergence and Curl equivalents for cylindrical and spherical co-ordinate system.</li><li>Gauss’s divergence theorem, Stokes theorem and Green’s theorem.</li></ol><p>References</p><ol><li>Engineering Electromagnetics — William Hayt, John Buck</li><li><a href="https://www.youtube.com/watch?v=rB83DpBJQsE">Divergence and Curl — 3Blue 1Brown</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49f2aaf44d31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stokes Theorem]]></title>
            <link>https://medium.com/@ckiran2508/stokes-theorem-96aa1529c6a1?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/96aa1529c6a1</guid>
            <category><![CDATA[maxwells-equations]]></category>
            <category><![CDATA[derivation]]></category>
            <category><![CDATA[proof]]></category>
            <category><![CDATA[curl-theorem]]></category>
            <category><![CDATA[stokes-theorem]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Thu, 28 Nov 2024 11:27:19 GMT</pubDate>
            <atom:updated>2025-09-30T19:22:01.192Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Stokes theorem</strong> or the <strong>Curl theorem</strong> is again an important result in vector calculus, it shows up in forms as the 3rd and 4th equations in <strong>Maxwell’s equations of electromagnetism</strong>. <strong>Stokes theorem</strong> is mathematically written as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*yj6UyudXrTT61grs0encFg.png" /><figcaption>Eqn 1.</figcaption></figure><p>In this post we are going to prove this result. Please note, just like Divergence theorem there is no formal way to prove the Stokes theorem, we will prove the result using specialized regions and conditions.</p><p>We will begin by considering two surfaces <strong>S</strong> &amp; <strong>R</strong> with boundaries <strong>C</strong> and <strong>C1, S </strong>is a 3D surface (like a bulge) and its boundary <strong>C </strong>also exists in 3 dimensions, we are going to prove the <strong>Stokes theorem</strong> for this surface and boundary.</p><p>The other surface <strong>R </strong>with boundary <strong>C1 </strong>is confined to a <strong>X-Y</strong> plane, each point <strong>&lt;u,v&gt;</strong> in <strong>R </strong>maps to a point in <strong>S </strong>defined by some function <strong>z = f(u,v).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*9STdpjZ5BJmetO0zonDwcg.png" /><figcaption>Snip 1.</figcaption></figure><p>Each co-ordinate point in <strong>S </strong>can be<strong> </strong>defined by the vector position function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*VgPTOKR4zIUVnYc9yr299A.png" /><figcaption>Eqn 2.</figcaption></figure><p><strong>f(u,v) </strong>is a scalar function that gives the magnitude in the z-direction forming the surface <strong>S, &lt;u,v&gt; </strong>are nothing but <strong>&lt;x,y&gt;</strong> values belonging to surface <strong>R.</strong></p><p>Next we let the function <strong>f(u,v)</strong> to have equal 2nd order cross partial derivatives i.e</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*FcPNLanFfmyRfe-go8xhwA.png" /><figcaption>Eqn 3.</figcaption></figure><p>We will write the above condition in less verbose form as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/1*rdHiPEsxuz6uEip8dikaFw.png" /><figcaption>Eqn 4.</figcaption></figure><p>The above condition will be of use later, now we will introduce a vector field that will influence the surface <strong>S.</strong></p><p>The faint gray lines shown in <strong>Snip 1.</strong> represent the vector field, let this vector field take the general form as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*yGDIuKQajsXqtF61nlBrpQ.png" /><figcaption>Eqn 5.</figcaption></figure><p>So now we defined the surface <strong>S </strong>and the vector field <strong>F</strong> that will influence the surface <strong>S </strong>and the boundary <strong>C, </strong>next we will write the game plan for proving the <strong>Stokes theorem</strong>.</p><ol><li>We write the line integral at <strong>C, </strong>and express in a form that it equals line integral at <strong>C1 </strong>using Green’s theorem.</li><li>We again apply Green’s theorem on the line integral at <strong>C1 </strong>and solve for the surface integral at <strong>R.</strong></li><li>Next we solve the right side of Eqn 1. viz the surface integral at <strong>S </strong>and show that it equals the surface integral at <strong>R, </strong>which proves the <strong>Stokes theorem</strong>.</li></ol><p>The left term of <strong>Eqn 1.</strong> is the line integral over some closed path. In our case let us consider an object to trace a closed path along the boundary <strong>C </strong>under the effect of <strong>F. </strong>The line integral can be written as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*AQ1ZKNttFmryec6LJKSkhg.png" /><figcaption>Eqn 6.</figcaption></figure><p>where <strong>dr </strong>is the small chunk of <strong>C </strong>and<strong> f </strong>represents <strong>f(u,v). </strong>To solve <strong>Eqn 6.</strong> we will have to parameterize boundaries <strong>C </strong>and <strong>C1</strong> in terms of a known quantity. We will define the parametric form of <strong>C1 </strong>before hand<strong>, </strong>but we will use it later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*pI9QlzBnUQP_VEaCKHd8-Q.png" /><figcaption>Eqn 7.</figcaption></figure><p>We have introduced a parameter <strong>t </strong>that will drive the <strong>x,y</strong> and <strong>z </strong>values along <strong>C. </strong>Therefore we will differentiate <strong>C </strong>w.r.t <strong>t </strong>as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*XgYzMyJ3CagvvwZb0jHz5A.png" /><figcaption>Eqn 8.</figcaption></figure><p>Now <strong>f(u,v)</strong> is a multivariate function of inputs <strong>u</strong> and <strong>v, </strong>the total derivative of <strong>z=</strong> <strong>f(u,v) </strong>can be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*BGA3eCaK9QjgAyKlxPsErQ.png" /><figcaption>Eqn 9.</figcaption></figure><p>Now both <strong>u</strong> and <strong>v </strong>are a function of <strong>t, </strong>so<strong> </strong>for a differential change in <strong>t </strong>we can write the equation from the previous snip as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*-gdCc7plnEzacPUtbrzndg.png" /><figcaption>Eqn 10.</figcaption></figure><p>in a less verbose form we can write as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*UZbrceoKPHIx2neFbfswRw.png" /><figcaption>Eqn 11.</figcaption></figure><p>Now we can write <strong>dr </strong>as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*4jjk-Z62LDA0hz8vsXVqbA.png" /><figcaption>Eqn 12.</figcaption></figure><p>The line integral from <strong>Eqn 6.</strong> will now look like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vhjodAXb06kIf06XtW_H4Q.png" /><figcaption>Eqn 13.</figcaption></figure><p>we will simplify the dot product as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*FZn2e8oe5FDxcvlGXEElVw.png" /><figcaption>Eqn 14.</figcaption></figure><p>The line integral in the above snip is in a form where we can use it to apply Green’s theorem to surface <strong>R </strong>and boundary <strong>C1</strong> .</p><p>Before we do it, let us first write the general form of Green’s theorem for path <strong>C1, </strong>for some vector field <strong>M i + N j</strong> in <strong>X-Y </strong>plane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*5rk990iZiS8cTByjot0bMA.png" /><figcaption>Eqn 15.</figcaption></figure><p>We have parameterized <strong>C1, </strong>in <strong>Eqn 7</strong>., we will use it to define <strong>dr </strong>and simplify the left hand side of the expression in the above snip and use it as reference to match the terms in <strong>Eqn 14.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*E-mdOJF64SrrV7QxRtuhaw.png" /><figcaption>Eqn 16.</figcaption></figure><p>Now we match the terms of expressions from <strong>Eqn 14</strong> and <strong>Eqn 16</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*TH58UKSOITlI0m676Ad7Ew.png" /><figcaption>Eqn 17.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*FI2Hr5guhOnOn1gmMmwifg.png" /><figcaption>Snip 2.</figcaption></figure><p>Therefore what we see is that the line integral over path <strong>C </strong>for the field <strong>F= Pi+Qj+Rk </strong>is also the line integral for path <strong>C1 </strong>for the field <strong>(P+R*f_u)i + (Q+R*f_v)j</strong></p><blockquote>Note: For line integral at <strong>C1 </strong>mentioned above, one might think that with <strong>C1 </strong>lying on the <strong>X-Y</strong> plane, the functions <strong>P</strong>, <strong>Q</strong> and <strong>R</strong> must take the form like <strong>P(u,v,0)</strong>,<strong>Q(u,v,0)</strong> and <strong>R(u,v,0)</strong>, but this would end up giving us different value of the line integral that is not equal to the line integral at <strong>C . </strong>For <strong>C1 </strong>only the terms are re-arranged, both line integrals still evaluate to the same value, and therefore <strong>P(u,v,f(u,v))</strong>,<strong>Q(u,v,f(u,v))</strong> and <strong>R(u,v,f(u,v)) </strong>are valid for <strong>C1 </strong>also.</blockquote><p>Now we write the Green’s theorem for path <strong>C1 </strong>and surface <strong>R </strong>as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*bd7HvzzDiC8p8VAgi7R5OQ.png" /><figcaption>Eqn 18.</figcaption></figure><p>Let us remind ourselves that <strong>P,Q</strong> and <strong>R</strong> are scalar functions of inputs <strong>x,y</strong> and <strong>z, </strong>i.e they evaluate to a single scalar value and for the domain <strong>&lt;u,v&gt;</strong> and surface <strong>S, </strong>these functions take the form <strong>P(u,v,f(u,v)), Q(u,v,f(u,v)), R(u,v,f(u,v)).</strong></p><p>We will have to simplify the surface integral for <strong>R </strong>on the right, the simplification will involve multiple steps because of the way the functions take the form like <strong>P(u,v,f(u,v))</strong>,<strong>Q(u,v,f(u,v))</strong> and <strong>R(u,v,f(u,v)).</strong></p><p>So we will the first understand the nature of such differentiation with the help of general example and then apply it on <strong>P, Q</strong> and <strong>R</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*nY6kGgB-1glMcp1B0NeT-g.png" /><figcaption>Eqn 19.</figcaption></figure><p>Once the result in the previous snip is understood, we can use that knowledge for differentiating <strong>P(u,v,f(u,v))</strong>,<strong>Q(u,v,f(u,v))</strong> and <strong>R(u,v,f(u,v))</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*1HAh8CdmTPfmmFeZKlFq4g.png" /><figcaption>Eqn 20.</figcaption></figure><p>Similarly for other scalar functions we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*Vo0wg1FaGjHhAAXFfPxCEg.png" /><figcaption>Eqn 21.</figcaption></figure><p>We will use these results in <strong>Eqn 18</strong>. We will substitute and refactor terms by only writing the right side of Eqn 6. Note that there are terms like <strong>R*f_v</strong> and <strong>R*f_u</strong>, so we will also apply product rule of differentiation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*Q219gPGnRK1yPzHQciX3Ew.png" /><figcaption>Eqn 22.</figcaption></figure><p>and therefore we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*cBd50zceY8fpwgL-1uyf-Q.png" /><figcaption>Eqn 23.</figcaption></figure><p>So we arrive at <strong>Eqn 23.</strong> after all the differentiation and refactoring, and this was the final simplification of the left side or the line integral side of the <strong>Stokes Theorem</strong>. So we have run the hard miles and solving for the right side of <strong>Stokes theorem</strong> will not be as complex as the left side was.</p><p>Let’s begin solving the right side or surface integral part of <strong>Eqn 1.</strong></p><p>First we will expand the <strong>∇ X F </strong>or the curl operator on F</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*ZiDNH82Q-I5wIUJf7X0chg.png" /><figcaption>Eqn 24.</figcaption></figure><p>This is for any point in the <strong>3D </strong>co-ordinate system. For the surface <strong>S </strong>under consideration, any point on the surface is defined by</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*HhV8ZMyhA7vAlm5n-Fy1Ag.png" /><figcaption>Eqn 25.</figcaption></figure><p>and so</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*r2jnMqLim0od2kb2yPkrIg.png" /><figcaption>Eqn 26.</figcaption></figure><p>We had defined the parameterized vector position function surface <strong>S </strong>as <strong>S(u,v) = u*i + v*j + f(u,v)*k </strong>in <strong>Eqn 2.</strong>, we will use it to identify <strong>dS.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*fLyg2vYoCTPpvJnZdAsVWA.png" /><figcaption>Eqn 27.</figcaption></figure><p>Next we will figure out <strong>S_u</strong> and <strong>S_v, </strong>and do the cross product</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*-DZpK4PQdjwEvv4aL-DTvw.png" /><figcaption>Snip 28.</figcaption></figure><p>Finally we have an expression for <strong>dS </strong>viz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*gPhUDsPTOUkLyKb4MFO_Sw.png" /><figcaption>Eqn 29.</figcaption></figure><p>We can now use the results from <strong>Eqn 24 </strong>and <strong>29</strong>. and write the surface integral as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*kRvLfYT8VO2Wb8dc62hNYA.png" /><figcaption>Eqn 30.</figcaption></figure><p>Next we solve the dot product for the right side of the above equation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*OQiHBb4I1MX2gzRY0UvfJQ.png" /><figcaption>Eqn 31.</figcaption></figure><p>So now we can summarize all our intermediary results and when we equate each of them we get the <strong>Stokes theorem</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbyDFZaTPPqjRrULODSiqg.png" /><figcaption>Snip 3.</figcaption></figure><p>This proves the <strong>Stokes Theorem</strong>. Thanks for reading.</p><p>References.</p><ol><li>Khan academy — <a href="https://www.youtube.com/watch?v=qIBqvr5_QqQ&amp;t=137s">https://www.youtube.com/watch?v=qIBqvr5_QqQ&amp;t=137s</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96aa1529c6a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Green’s Theorem]]></title>
            <link>https://medium.com/@ckiran2508/greens-theorem-cf0458547a10?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf0458547a10</guid>
            <category><![CDATA[curl-theorem]]></category>
            <category><![CDATA[greens-theorem]]></category>
            <category><![CDATA[derivation]]></category>
            <category><![CDATA[proof]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Thu, 28 Nov 2024 11:24:49 GMT</pubDate>
            <atom:updated>2024-11-28T11:24:49.689Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post we will prove the <strong>Green’s theorem</strong>. The <strong>Green’s theorem</strong> can be stated as following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*kmQuiTv7nN3nm1GFvUQ5xg.png" /><figcaption>Eqn 1.</figcaption></figure><p>We will begin by considering a force field <strong>F </strong>having only <strong>x-components</strong>, and some object moves along a closed path <strong>C </strong>under the influence of this force field <strong>F.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*KEUKjWqL8W1s7DmZJaKtAQ.png" /><figcaption>Snip 1.</figcaption></figure><p>The work done by the force field on the object is given by the line integral over the closed loop <strong>C</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*_3jcDndHsv4JZ9nBPZWC6w.png" /><figcaption>Eqn 2.</figcaption></figure><p>where <strong>dr </strong>is the small section of <strong>C. </strong>Now we will define the force field keeping in mind that it will only have <strong>x</strong> vectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*B_rzLclru60jGpmUpa4xog.png" /><figcaption>Eqn 3.</figcaption></figure><p>We can write the line integral as following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*SxD_KCP_sxOkyTZWGtngGQ.png" /><figcaption>Eqn 4.</figcaption></figure><p>The differential element <strong>dr </strong>of <strong>C, </strong>can be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*mvqFqQQ8yKT0adXk6TrkYQ.png" /><figcaption>Eqn 5.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*7rbOlXX7mWb9gk7d5_mBuA.png" /><figcaption>Snip 6.</figcaption></figure><p>We will substitute the expansion of <strong>dr</strong> in the line integral equation from Snip 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*m1-QczXeTb7y46Xqz7reow.png" /><figcaption>Eqn 6.</figcaption></figure><p>We will simplify the above equation as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*Bgw1snR-yl4mOusLWgnuzw.png" /><figcaption>Eqn 7.</figcaption></figure><p>Next we will identify the points <strong>x=a</strong> and <strong>x=b</strong> where the path <strong>C </strong>is bounded along <strong>x-axis. </strong>With <strong>x=a</strong> and <strong>x=b</strong> as markers we will split the loop into two parts and we will define the bottom and top parts of the loop to be some functions <strong>f(x)</strong> and <strong>g(x)</strong> respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*heh32_O5WwlQHXccbWbz2g.png" /><figcaption>Snip 9.</figcaption></figure><p>We can now write the line integral of <strong>C </strong>as the sum of line integrals of the two curves defined by <strong>f(x)</strong> and <strong>g(x).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*68vN9Wy-qGrI_aWrULUeYg.png" /><figcaption>Eqn 8.</figcaption></figure><p>The next series of steps will based on the integration definition and the fundamental theorem of calculus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*fNYXA-kc4MHcwqFx_g0rHA.png" /><figcaption>Eqn 9.</figcaption></figure><p>In the following snip, we will consider another path <strong>L </strong>highlighted in blue whose width overlaps with <strong>C </strong>at some point <strong>x, f(x)</strong> and <strong>x, g(x)</strong> having a differential width <strong>dx.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*uaQSawsUMiQ2v_ed7ZGk8w.png" /><figcaption>Snip 12.</figcaption></figure><p>This inner path <strong>L </strong>can be split into 4 line segments, the horizontal paths that overlap on <strong>C, </strong>and the vertical paths.</p><p>Now for the line integral <strong>dW </strong>of this inner path <strong>L </strong>under the influence of the field <strong>F = P(x,y) * i , </strong>only the horizontal paths of <strong>L </strong>have a role to play and the vertical paths result to <strong>0 </strong>as the vector field only has <strong>x-components</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*BPT7iFDgS_rJ_TIJshkrkw.png" /><figcaption>Eqn 10.</figcaption></figure><p>The negative <strong>dx </strong>shows the direction opposite to <strong>P(x,y)*i. </strong>at point <strong>x,g(x). </strong>We will simplify <strong>dW </strong>just like we did in Snip 11.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*1YZXsvIlQOG8g2tdRgc04Q.png" /><figcaption>Eqn 11.</figcaption></figure><p>So the final expression in the previous snip represents the line integral of the inner path <strong>L .</strong></p><p>If we compare the final expression of the previous snip with the final expression of Snip 11, we can write as following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*kNbTSCTwpYwdHcZ1x5SSbA.png" /><figcaption>Eqn 12.</figcaption></figure><p>So we can now think of line integral over <strong>C </strong>for the vector field <strong>P(x,y)* i </strong>to be the infinite sum of line integrals over inner paths like <strong>L </strong>within <strong>C </strong>from <strong>x=a</strong> to <strong>x=b .</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*NMHr0I4EQ9Vlhv3a5zlD2A.png" /><figcaption>Snip 16.</figcaption></figure><p>These infinite small paths within <strong>C </strong>cover the region enclosed by <strong>C. </strong>Therefore we can write more generally as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*ACVMQx02qqvjRApBnge6Dw.png" /><figcaption>Eqn 13.</figcaption></figure><p>Now in the next section of the proof we will consider a force field that only has <strong>y-components</strong> defined as <strong>F(x,y) = Q(x,y) * j</strong>, this field influences an object to trace a closed path <strong>C, </strong>the shape of the path is the same as shown in the previous exercise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*Pt9qOT4d2d-NfpaMayWovA.png" /><figcaption>Snip 18.</figcaption></figure><p>The field equation being</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/184/1*xyCFXQzFhXpVNXL8BUxF3A.png" /><figcaption>Eqn 14.</figcaption></figure><p>This time we will identify <strong>y=a</strong> and <strong>y=b</strong> and split <strong>C </strong>using these boundaries, the resulting curves will be some functions <strong>u(y)</strong> and <strong>v(y)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Id_MCFhfZgiFiCOrQtdKnw.png" /><figcaption>Snip 19.</figcaption></figure><p>We will do the same sequence of operations that we did for x- vector field, this time from <strong>y=a</strong> to <strong>y=b</strong> as the field only varies along y-axis and we will arrive at the following result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*l2Ieky_pDmcl0pWdN20eYg.png" /><figcaption>Eqn 15.</figcaption></figure><p>Notice this time we do not get extra negative sign on the outside, this is because of the direction of the trace along <strong>C </strong>and the fact that we are integrating from <strong>y=a</strong> to <strong>y=b.</strong></p><p>This again considering the integrals span the region bounded by <strong>C, </strong>can be written as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*CH-CCHAyuH7rDruVP6ZKLw.png" /><figcaption>Eqn 16.</figcaption></figure><p>Next we try to combine the worked out results.</p><p>We will define a force field that has both x-components and y-components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*IjMVRWrHktV6AzMotC0X-A.png" /><figcaption>Eqn 17.</figcaption></figure><p>Let an object under the influence of this field trace a closed path <strong>C, </strong>again the shape of the path under consideration remains the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*Nsbrhj6in0usIMkbdrMS9g.png" /><figcaption>Snip 22.</figcaption></figure><p>The line integral over <strong>C </strong>under the influence of vector field <strong>F </strong>can be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*8hi8qLu_n1NHBHPvTVQriQ.png" /><figcaption>Eqn 18.</figcaption></figure><p>With <strong>dr = dx * i + dy * j . </strong>The above expression reduces to</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*boG7nONJ8dS_PT5QlBPejQ.png" /><figcaption>Eqn 19.</figcaption></figure><p>We will use the results from Snip 17 and 20 and write as following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*SeQUA01CrSPTFdvHEoB5Sw.png" /><figcaption>Eqn 20.</figcaption></figure><p>Now in a more recognizable form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*6ECZYaGAck2SEITha-wM1g.png" /><figcaption>Eqn 21.</figcaption></figure><p>Also</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*Z4BIHnQITTFg7yGqgjlxRw.png" /><figcaption>Eqn 22.</figcaption></figure><p>So we have proved the <strong>Green’s theorem</strong>, one thing that was apparent was the choice of the path traced and the field under consideration were all in 2-D plane, there is a 3-D equivalent of this theorem which is called the <strong>Stokes’s theorem</strong> or the <strong>curl theorem</strong>.</p><p>References.</p><ol><li>Khan Academy — <a href="https://www.youtube.com/watch?v=l5zJvZKfMYE">https://www.youtube.com/watch?v=l5zJvZKfMYE</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf0458547a10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Total derivative of a multivariate function.]]></title>
            <link>https://medium.com/@ckiran2508/total-derivative-of-a-multivariate-function-e32750f29285?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/e32750f29285</guid>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Thu, 28 Nov 2024 11:19:56 GMT</pubDate>
            <atom:updated>2024-11-28T11:22:03.296Z</atom:updated>
            <content:encoded><![CDATA[<p>Let <strong>z </strong>be any function of two inputs <strong>x &amp; y</strong>. The total derivative of <strong>z </strong>is given as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*cuEQHOgquUYinX7v-5KTOA.png" /><figcaption>Eqn 1.</figcaption></figure><p>In this post we will attempt to know why this is true.</p><p>Let’s say we know the value of <strong>f(x,y)</strong> for some inputs <strong>a,b, </strong>using <strong>a &amp; b</strong> let us simply express <strong>f(x,y) </strong>as an infinite sum of polynomials as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H5D5ZgQKUupnRCUnqOk_yw.png" /><figcaption>Eqn 2.</figcaption></figure><p><strong>k</strong>,<strong>k_x1, k_y1, k_x2 etc. </strong>are some coefficients to the polynomial terms.</p><p>We will try to figure out these coefficients one by one.</p><p>To find <strong>k </strong>we can we can let <strong>x &amp; y </strong>to take values <strong>a &amp; b </strong>in Eqn 2<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*5_ZP_iClRWHEB2NcQYB4-w.png" /><figcaption>Eqn 3.</figcaption></figure><p>We can see that all polynomial terms result to zero and so .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*d7KMIYMQ6qOLfJb-CqxRvg.png" /><figcaption>Eqn 4.</figcaption></figure><p>To find <strong>k_x1, </strong>let us differentiate <strong>f(x,y) </strong>w.r.t<strong> x</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*RAQ-dqKFGgfy8Gbs7U-glw.png" /><figcaption>Eqn 5.</figcaption></figure><p>Once the above step is obvious, we again set <strong>x &amp; y to a &amp; b</strong> and once again all polynomial terms result to zero leaving us with <strong>k_x1 </strong>only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*hpufb-D0o1pkg1dbsmJdLw.png" /><figcaption>Eqn 6.</figcaption></figure><p>To make it less verbose we have used a simpler differential notation in the boxed expression in the above snip. Next we will differentiate <strong>Eqn 2.</strong> w.r.t <strong>y</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*-Mmim39r67cNzXmxTppoTQ.png" /><figcaption>Eqn 7.</figcaption></figure><p>We substitute<strong> a,b</strong> to <strong>x,y </strong>and we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*n0stutOFStnLh7dTCKje6g.png" /><figcaption>Eqn 8.</figcaption></figure><p>Continuing we will perform 2nd order differentiation w.r.t <strong>x </strong>to <strong>Eqn 2.</strong> and then plugging <strong>a,b</strong> we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*bxwbBl3XVfEuQuKghtdokQ.png" /><figcaption>Eqn 9.</figcaption></figure><p>Similarly we do 2nd order differentiation w.r.t <strong>y</strong> to <strong>Eqn 2.</strong> and we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*5pXO1ESLHJyfsEeqST7qHA.png" /><figcaption>Eqn 10.</figcaption></figure><p>Now we do mixed differentiation to <strong>Eqn 2</strong> first w.r.t <strong>y</strong> then w.r.t <strong>x</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*YxBrSaGe-J68hVeSeWB2qQ.png" /><figcaption>Eqn 11.</figcaption></figure><p>Note that <strong>Eqn 2.</strong> is an infinite sum, and we can go on identifying these coefficients for higher order derivatives for higher power polynomials.</p><p>So we will stop here and we will substitute the co-efficients that we identified so far into Eqn 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_m44CY80FYElBhIQWdHxQ.png" /><figcaption>Eqn 12</figcaption></figure><p>After the substitution of the coefficients what we now have in Eqn 3. is the <strong>Taylor expansion</strong> of the multivariate function <strong>f(x,y)</strong></p><p>We make the following modifications to Eqn 12.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*bTrlbUmkBZnwyoFXdVSkXw.png" /><figcaption>Eqn 13.</figcaption></figure><p>and we see</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QZuXQaWXkD2t4AIHjRjz_w.png" /><figcaption>Eqn 14.</figcaption></figure><p>Now as <strong>Δx -&gt; 0</strong> and <strong>Δy -&gt; 0</strong> , we can replace them with <strong>dx</strong> and <strong>dy</strong> and the higher power terms evaluate to more negligible values and so we can ignore them from the equation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*xOgLvY0BiiIOpDeiKW0_BQ.png" /><figcaption>Eqn 15.</figcaption></figure><p>We make <strong>a,b </strong>to be any general <strong>x,y </strong>input and writing the differential notation in a more recognizable form we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*cuEQHOgquUYinX7v-5KTOA.png" /><figcaption>Eqn 16.</figcaption></figure><p>There it is the total derivative of a multi-variate function. In our scenario we considered only two variable input, the idea can be extended to function with any number of input variables.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e32750f29285" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gauss’s Divergence Theorem — Proof.]]></title>
            <link>https://medium.com/@ckiran2508/gausss-divergence-theorem-proof-c683aede2e3c?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/c683aede2e3c</guid>
            <category><![CDATA[gauss]]></category>
            <category><![CDATA[divergence-theorem]]></category>
            <category><![CDATA[maxwells-equations]]></category>
            <category><![CDATA[divergence]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 04:47:52 GMT</pubDate>
            <atom:updated>2025-09-30T19:19:13.682Z</atom:updated>
            <content:encoded><![CDATA[<h3>Gauss’s Divergence Theorem — Proof.</h3><p>The Gauss’s divergence theorem happens to be an important result in vector calculus that equates the flux of a vector field through a surface to the divergence of the vector field through the volume enclosed by that surface. This result shows up in forms as the first and the second equation in the <strong>Maxwell’s</strong> equations of electromagnetism. Mathematically it is expressed as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*wbu9Ke5RdM9AYof58IkAMw.png" /><figcaption>Eqn 1.</figcaption></figure><p>There is no formal or straight forward way of proving the Divergence theorem. The following proof is very much based on the lectures by Sal Khan on Khan academy. The references are available at the end of the post.</p><p>Let us first go through some of the basics that will be necessary during the course of the proof explanation.</p><p>In the snip below, we have defined <strong>y</strong> as some function of <strong>x </strong>such that <strong>y=f(x) </strong>traces a curve. By the definition of integration, the area under the curve <strong>f(x)</strong> between <strong>x=a</strong> and <strong>x=b</strong> is given in the snip. A modified version of the integration definition is boxed and this version is helpful in deducing surface integrals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*9ygxqDtcGHMzzJ6fvp2Qxw.png" /><figcaption>Snip 1.</figcaption></figure><p>In the next snip, we see an area <strong>S </strong>bounded by curves <strong>f(x)</strong> and <strong>g(x)</strong> from <strong>x=a</strong> and <strong>x=b</strong>. We try to get an integral expression for this area. This type of area is also called the <strong>Type 1</strong> region. The integral terms are modified to arrive at the boxed expression, again this form of the result is particularly useful in evaluating surface integrals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQu-6E4v7BWTN6TC_dtN8g.png" /><figcaption>Snip 2.</figcaption></figure><p>Next we will look at a region in 3D space. The light blue shaded region is the surface under consideration and is defined by the vector position function <strong>r(u,v) = ui + vj + f(u,v)k</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*oCg0XzyNwCoLn6bhEIGE8Q.png" /><figcaption>Snip 3.</figcaption></figure><p>The surface <strong>r</strong> is parameterized where <strong>u</strong> and <strong>v</strong> are the parameters. The surface integral is the integral sum of infinitesimally small surface elements <strong>ds</strong>. <strong>ds </strong>can be written as the magnitude of the cross product of<strong> </strong>two differential vector elements <strong>dr_u</strong> and <strong>dr_v</strong>. We will simplify <strong>ds </strong>to arrive at the boxed form in the following snip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*EqqrzQSG4_Za5aMyOExEhQ.png" /><figcaption>Snip 4.</figcaption></figure><p>The unit normal vector of the surface element <strong>ds </strong>is the ratio of cross product of differential vectors <strong>dr_u</strong> and <strong>dr_v </strong>to its magnitude<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*vHlOfHymKi1YGNCBi2lTEg.png" /><figcaption>Snip 5.</figcaption></figure><p>If we repeat the steps that we did for <strong>ds </strong>we get.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*_PULOwUwx_PFo9tvOyDpng.png" /><figcaption>Snip 6.</figcaption></figure><p>Once we are comfortable with what’s been covered so far. We can go ahead with the proof.</p><p>First let us define the vector field that is spread over in 3D space, for any point in the space let the vector with the orthonormal basis vectors or simply the unit vectors <strong>i, j and k </strong>be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*LR58eA9inK32vBTBStleng.png" /><figcaption>Snip 7</figcaption></figure><p>Note that <strong>A, B </strong>and<strong> C </strong>can be constants or can be any functions of other variables like co-ordinates, charge value in case of electrostatic vector field, but for our generic scenario its enough that we know that <strong>A, B </strong>and<strong> C </strong>represents the magnitudes in the <strong>x, y </strong>and<strong> z </strong>axis respectively.</p><p>The divergence operator is defined as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*Ca6RtkIFclTtCsDVk0h1Ug.png" /><figcaption>Snip 8.</figcaption></figure><p>So the divergence value at any point in the vector field gives us a measure of whether the point is a source or a sink. One can learn more about it from the internet.</p><p>Now with <strong>F </strong>being</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*kSzHmDTc0lFiKfSs6NIkqQ.png" /><figcaption>Snip 9.</figcaption></figure><p>for other axis we can simply write as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*MRNX2_Jj54SQ0rmh5SxQog.png" /><figcaption>Snip 10.</figcaption></figure><p>Now for any solid region <strong>S, </strong>let us expand the terms of <strong>Eqn 1.</strong> separately with what we have known so far.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*UUGBZbtpV3VdmMWasrzHyg.png" /><figcaption>Snip 11.</figcaption></figure><p>If we can prove the 1,2 and 3 terms of above equations in the snip to be equal with the corresponding terms, then we essentially prove the divergence theorem, also if we can prove for just one set of terms, the same set of steps can applied for the other set of terms.</p><p>Now we will define the region <strong>S, </strong>to which we are going to prove the divergence theorem for. In the below snip we have a <strong>Type 1 region S</strong> comprised of the surfaces <strong>S1</strong>, <strong>S2</strong> and four lateral surfaces <strong>L</strong>, with <strong>S1 </strong>and<strong> S2 </strong>being parameterized surfaces are defined by their vector position functions over the domain <strong>u</strong> and <strong>v. </strong>Given the way we are going to prove the divergence theorem for this region, there is no need for us to mathematically define the 4 lateral surfaces <strong>L.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*lCQIDKlNsHRdw9pFOFUMhg.png" /><figcaption>Snip 12.</figcaption></figure><p>The light shaded arrows represents the vector field <strong>F </strong>that we previously defined<strong> </strong>and it<strong> </strong>fills the region <strong>S</strong>. Only few lines are drawn for convenience but in reality there can be any number of vector field lines drawn to make the point that the field crosses the region <strong>S.</strong></p><p>Given the nature of the region, we will strategically pick the 3rd terms set that belong to <strong>z-axis</strong> as shown in the next snip and try to prove that they are equal. If they are equal then we have proved the divergence theorem as we can apply the same series of steps in for terms in the <strong>x</strong> and the <strong>y</strong> domains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*VFccY6eJ2MI_5Fk7ikTtRw.png" /><figcaption>Snip 13.</figcaption></figure><p>Considering all of the surfaces that make up the region <strong>S</strong>, we can expand the left term in above snip as following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*KTbr2pQnsjzQoZdEjZD8fw.png" /><figcaption>Snip 14.</figcaption></figure><p>The <strong>k</strong> unit vector is the basis vector for the <strong>z-axis</strong>, and from Snip 12. it is apparent that for the lateral surfaces the surface normal vector <strong>nL </strong>points purely in the <strong>x-axis </strong>and<strong> y-axis</strong>, therefore the dot product of two perpendicular vectors <strong>k</strong> and <strong>nL </strong>is<strong> zero, </strong>so we end up with the first two terms for surfaces <strong>S1</strong> and <strong>S2.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*DMtAC0iJg6DBBM-11BseVw.png" /><figcaption>Snip 15.</figcaption></figure><p>Let us simplify the integrals individually for <strong>S1</strong> and <strong>S2</strong>. For the first term and from Snip 4 and Snip 6, we can write <strong>nS1</strong> and <strong>dS1</strong> as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*3Z9jofaAwVNG4uzSCHB6nA.png" /><figcaption>Snip 16.</figcaption></figure><p>Now we will write the first term with the above simplification as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*DEcQMTX-GVWWforxECo6Lw.png" /><figcaption>Snip 17.</figcaption></figure><p>Next we will simplify the terms in the integral as following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*f__u-r-1wnBnmfWgJlbVZA.png" /><figcaption>Snip 18.</figcaption></figure><p>Using the results from above we can now write</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*MFI8ZYkTQDXkcvySm1lP_Q.png" /><figcaption>Snip 19.</figcaption></figure><p>We do similar steps for the 2nd term in Snip 15. for the <strong>S2</strong> surface. This time however the order of the vectors involved (using the right hand rule for cross product) is such that the normal vector at <strong>dS2,</strong> points outside of region <strong>S, </strong>the order is crucial as it brings in a negative term in the equation that makes the proof work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*HffWyafNvT5nOeEwIri2Fg.png" /><figcaption>Snip 20.</figcaption></figure><p>and therefore</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*eRnXXgtXXdveRUMBXNodIQ.png" /><figcaption>Snip 21.</figcaption></figure><p>The equation from Snip 14. can now be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*5y0yvRXXiYwQBDP_M7PjTw.png" /><figcaption>Snip 22.</figcaption></figure><p>Now <strong>C </strong>represents the magnitude of the <strong>k </strong>component in the <strong>z-axis</strong> of the vector field, and like we mentioned before <strong>C </strong>can be a function or a constant, in either case we can still think of <strong>C </strong>as a function that takes in <strong>&lt;x,y,z&gt;</strong> from 3D space and gives back the magnitude in the <strong>z </strong>direction. Any value of <strong>C </strong>on the surfaces <strong>S1</strong> and <strong>S2 </strong>can be written as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*JXASKDQ616IJkYc-K1o3gQ.png" /><figcaption>Snip 23.</figcaption></figure><p>Using this for the equation in the Snip 22.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*Z2YHj9B3wNFwYyVRy8jFhQ.png" /><figcaption>Snip 24</figcaption></figure><p>Now we will explicitly mention the limits <strong>a≤u≤b</strong> and <strong>c≤v≤d</strong> for the integrals on the right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_IeEO_l0cqORlhFH1H7KQ.png" /><figcaption>Snip 25.</figcaption></figure><p>We have boxed up the result in the above image just to make the point that we reached the final step of simplification for the left term in Snip 13. Now we are in the final leg of proving the Divergence theorem, we will simplify the term of the right side of the equation in Snip 13 and try to match it with the boxed equation of the above. The simplification involves using results from Snip 2.</p><p>The volume integral is basically triple integral of derivatives in <strong>x, y and z</strong> axis. In our case &lt;<strong>x, y&gt;</strong> are &lt;<strong>u,v&gt;</strong> for the region <strong>S. </strong>The differential volume<strong> dV </strong>generally<strong> </strong>being <strong>dx*dy*dz,</strong> for the region <strong>S</strong> will be <strong>du*dv*dz.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*wc00oSOzAvPOa7aA8p3fWw.png" /><figcaption>Snip 26.</figcaption></figure><p>There we go, with the above simplifications we have proved that both terms from Snip 13. are equal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*qrFT3D8_liuJdDXkr6cPig.png" /><figcaption>Snip 27.</figcaption></figure><p>This is according to what was agreed proves the Divergence Theorem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*fdE_5Q8R2gjKDy8XpThqbg.png" /><figcaption>Snip 28.</figcaption></figure><p>The same set of steps apply when we set out to prove this theorem in other dimensions and for all kinds of region. Thanks for Reading.</p><p>References.</p><ol><li>Khan academy — <a href="https://www.youtube.com/watch?v=vCAFlt4pQSQ&amp;t=8s">https://www.youtube.com/watch?v=vCAFlt4pQSQ&amp;t=8s</a></li></ol><p>Further reading.</p><ol><li>Divergence and Curl by 3Blue 1 Brown — <a href="https://www.youtube.com/watch?v=rB83DpBJQsE&amp;t=210s">https://www.youtube.com/watch?v=rB83DpBJQsE&amp;t=210s</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c683aede2e3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lorentz Transformations and the Lorentz factor Derivation]]></title>
            <link>https://medium.com/@ckiran2508/lorentz-transformations-and-lorentz-factor-derivation-1987f91aac5d?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/1987f91aac5d</guid>
            <category><![CDATA[lorentz-transformation]]></category>
            <category><![CDATA[special-relativity]]></category>
            <category><![CDATA[length-contraction]]></category>
            <category><![CDATA[time-dilation]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Wed, 19 Jun 2024 07:35:54 GMT</pubDate>
            <atom:updated>2025-03-02T05:52:41.178Z</atom:updated>
            <content:encoded><![CDATA[<p>The Lorentz transformations and the Lorentz factor are the cornerstone of special relativity, these give rise to ideas like time dilation, length contraction, relativistic momentum, and is quintessential in arriving at the mass-energy equivalence relation <strong>E=mc^2</strong>.</p><p>So in this post we will arrive at the <strong>Lorentz transformations</strong> and the<strong> Lorentz factor</strong> and along the way get an understanding about the fundamentals of special relativity.</p><p>Let us first understand what an <strong>event </strong>is, an entity in a 3-dimensional space can be represented by the x,y and z co-ordinates, but this entity undergoing any sort of change like being hit another object at some time <strong>t </strong>can be<strong> </strong>called an event, so for an event to be represented requires 4 co-ordinates, the first 3 spatial dimensions and the fourth dimension of time. <strong>E = &lt; x, y, z, t&gt;, </strong>to simplify things in all of our analysis we will only consider motion along <strong>x-direction, </strong>so our event co-ordinates will always be <strong>&lt;x,t&gt;</strong></p><p>Before we continue it is worth mentioning the two postulates of special relativity.</p><ol><li>Any reference frame moving at constant velocity (inertial frame) or at rest obeys the laws of physics.</li><li>The speed of light is a constant in all reference frames.</li></ol><p>We will begin by considering a system where an entity can only move in <strong>x-direction, </strong>in fact in all of our analysis next we will only consider motion along <strong>x-axis. </strong>Let us visualize the entity at rest at some position on the x-axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*x2QSPtLZWYJatZx5M1fzRQ.png" /><figcaption>Fig 1.</figcaption></figure><p>We will use the y-axis for <strong>time t</strong>, to track where the object is at different times. Now the state where the object is at rest with y-axis as time can be shown as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*VBMnNo-NtjUV9kvtYVyVFQ.png" /><figcaption>Fig 2.</figcaption></figure><p>We call the co-ordinate system as the <strong>reference frame S </strong>and the line connecting all the points of the object on the time axis as the <strong>world line. </strong>The whole picture can be termed as the<strong> space time diagram.</strong></p><p>So we see that even when the object is at rest its x- position remains unchanged but its moves forward in time.</p><p>Lets think of the above system into two parts, one the reference frame and other the entity. The reference frame and the entity could both be at rest or both be moving at same constant velocity, in either case we would see the the same spacetime diagram as <strong>Fig 2. </strong>because their relative velocity is 0.</p><p>An observer at the origin has the world line at <strong>x=0.</strong></p><p>Let us set the entity in motion, the entity moves to the right by <strong>1m/s </strong>w.r.t to the reference frame <strong>S</strong>. The space time diagram would look like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*ec07FuDTHHsc-Cfbt-EuZg.png" /><figcaption>Fig 3.</figcaption></figure><p>This time the object is moving both in space and time w.r.t <strong>S</strong>.</p><p>The units on x-axis are considered to be <strong>1 unit = 1 meter.</strong></p><p><strong><em>When we say speed or velocity we also have to mention relative to what entity or a reference frame, so speed is always a relative number that involves two entities or reference frames.</em></strong></p><p>Now we will introduce more entities into our reference frame <strong>(B,C,D) </strong>that are at rest w.r.t reference frame <strong>S</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*EXkj6KzoeJR9r3cM9BexmA.png" /><figcaption>Fig 4.</figcaption></figure><p>Apart from the world lines being drawn for each object, we can also see the lines drawn horizontally across the objects, these horizontal lines represent what we call the <strong>lines of simultaneity, </strong>in simple words if the clocks shows <strong>11am</strong> for entity <strong>C, </strong>then its <strong>11am </strong>for entity <strong>A </strong>also and so is <strong>11am</strong> for <strong>B</strong> and <strong>D.</strong></p><p>We now introduce another reference frame <strong>S` </strong>which is moving w.r.t our 1st reference frame <strong>S</strong> at <strong>v m/s</strong> in positive <strong>x-axis</strong>. We will have identical entities <strong>(A`,B`,C`,D`)</strong> with same spacing in this reference frame. Let us say this moving reference frame <strong>S` </strong>crosses our 1st reference frame <strong>S </strong>at origin<strong> </strong>at time <strong>t=0 </strong>and<strong> </strong>we were to visualize this from the 1st reference frame <strong>S</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*CtlXqxyAiu3yYGtMkJWw4A.png" /><figcaption>Fig 5</figcaption></figure><p>The above image may not be immediately obvious in one go, also a reminder that y-axis is time and not a spatial axis and therefore one should not mistaken that the objects are moving in 2 dimensions by seeing the skewed lines, the motion of objects <strong>(A`,B`,C`,D`) </strong>is only along the x-axis.</p><p>Note how the world lines of <strong>S` </strong>reference frame<strong> </strong>get skewed when observed from <strong>S</strong> reference frame but the lines of simultaneity for both <strong>S</strong> and <strong>S` </strong>remain the same.</p><p>We will try to relate the spatial co-ordinates of <strong>S</strong> and <strong>S` </strong>i.e<strong> x </strong>and<strong> x`. </strong>Now<strong> S` </strong>is moving at some generic speed <strong>v m/s</strong> w.r.t the <strong>S.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*fTak2AF3OvQtFNQiz-axsQ.png" /><figcaption>Fig 6.</figcaption></figure><p>From the diagram above the relation between <strong>x</strong> and <strong>x` </strong>is as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/175/1*G7EBB4-G3Cq8FdxyksC0MA.png" /><figcaption>Eqn 1.</figcaption></figure><p>So if <strong>S` </strong>were to send information to <strong>S </strong>about <strong>x`</strong>, then <strong>S </strong>could<strong> </strong>figure out <strong>x </strong>using the above equation when the speed and the time elapsed are known. This is also called the <strong>Galilean transformation.</strong></p><p>Now we will introduce <strong>light</strong> in our systems. For our convenience we will change our units on the x-axis such that <strong>1unit = c meters</strong>, and lets define light speed to be <strong>c</strong> <strong>m/s</strong>, and this is not to change according to the Einstein’s 2nd postulate.</p><p>Now we will only consider <strong>S </strong>reference frame. We will have an observer positioned at origin in <strong>S, </strong>and the observer to flash a light beam in positive <strong>x-axis</strong> at <strong>t=0</strong>. Let us visualize this in the space-time diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*A38NwlzzriOxJeQfq7hk9w.png" /><figcaption>Fig 6.</figcaption></figure><p>Because the scale selection is such, the light makes a <strong>45⁰</strong> angle with x-axis on the space-time diagram or it has the slope of <strong>c</strong>.</p><p>Now considering <strong>S`</strong> i.e the moving reference frame with the same altered scale as <strong>S</strong>, we will position a 2nd observer <strong>O` </strong>at the <strong>S` </strong>origin who will move in unison with <strong>A`,B`,C`,D`</strong>. The 2nd observer is also to flash a light beam at <strong>t=0, </strong>let us visualize this from the 2nd observer i.e the <strong>S` </strong>reference frame only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*dA1f6Lqqgn-LGm8NNBo1PQ.png" /><figcaption>Fig 7.</figcaption></figure><p>Because this is viewed from <strong>S` </strong>the<strong> </strong>observer <strong>O` </strong>who along with <strong>A`, B`, C`, D’ </strong>are moving at constant velocity and so the world lines are not <strong>skewed</strong>.</p><p><strong><em>An important thing to note here is that the light is still making a 45⁰ angle with the x-axis meaning its speed is not affected by the motion of S` which is according to the 2nd postulate of special relativity. Any other angle for the light trajectory means the slope is not c and so the speed is also not c m/s and we violate the 2nd postulate, so we need to ensure that the slope is always c or -c in the reference frame of the observer.</em></strong></p><p>Now we will do a simple exercise in <strong>S` </strong>where the observer <strong>O` </strong>and <strong>B` </strong>are to send a beam of light at <strong>A` </strong>at <strong>t=0, </strong>considering<strong> </strong>the spacing and the speed of light, the light reaches <strong>A` </strong>at<strong> t=1 </strong>in <strong>S`</strong>. Let us see this in <strong>S` </strong>reference frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*NYtRDpMfCwy2EnjkQZwKqA.png" /><figcaption>Fig 8.</figcaption></figure><p>But our <strong>S` </strong>moves relative to <strong>S </strong>at some speed in the x direction, when we view the above experiment in <strong>S </strong>reference frame it looks something as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*YPAROG9GIlvrlPFm1woJAQ.png" /><figcaption>Fig 10.</figcaption></figure><p>The diagram paints an interesting scenario as we are trying to keep the light trajectory to be <strong>45⁰</strong> (or the speed of light to be constant) with the x-axis, the lines of simultaneity are no longer the same for the entities when seen from stationary frame <strong>S</strong>, the line connecting the origin and a point <strong>P </strong>defines the new line of simultaneity for <strong>S` </strong>in <strong>S.</strong></p><p>In the next steps we will find the points <strong>P, Q </strong>and then we have enough information to get the slope of the new line of simultaneity using which we will define its equation.</p><p>Considering the speed of <strong>S` </strong>to be <strong>v m/s</strong> w.r.t <strong>S</strong>, let us redraw Fig 10. labelled with minimum and necessary information to find the point <strong>P.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*BWCU6zLBC_hBp8ElyRJdEA.png" /><figcaption>Fig 11.</figcaption></figure><p>Let us take some time to understand the labelling for the different lines in Fig 11. They are nothing but the equations of the respective straight lines expressed in the form <strong>y = mx +c</strong>. Lets use them to find the points <strong>P </strong>and<strong> Q.</strong></p><p>We will solve <strong>1 &amp; 4</strong> to get point <strong>Q, </strong>then use <strong>Q </strong>to find <strong>k </strong>in <strong>2</strong>. We then solve <strong>2 &amp; 5</strong> to get point <strong>P.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*AXhzeIYIZvFIbPp0TW7DYw.png" /><figcaption>Snip 1.</figcaption></figure><p>We know <strong>Q</strong> and we see <strong>Q</strong> lies on the line <strong>-x = ct + k.</strong> We will use this to find <strong>k</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*tDICMI1ahP0UeAqzLEB1Hg.png" /><figcaption>Snip 2.</figcaption></figure><p>Now <strong>2 </strong>becomes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*IKql8-Ji8wTTLhQWLKGlBw.png" /><figcaption>Snip 3.</figcaption></figure><p>Lets use <strong>2 </strong>in<strong> 5</strong> to find <strong>P.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*5yQzr_8q2k2oTU9O4rsSaQ.png" /><figcaption>Snip 4.</figcaption></figure><p>Substituting in <strong>5</strong> we get <strong>x</strong> as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*E6wNiMfqBq96kcsvKgWD7Q.png" /><figcaption>Snip 5.</figcaption></figure><p>Now we know the point <strong>P, </strong>and the line <strong>OP</strong> crosses the origin, so the slope of the line <strong>OP </strong>is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*T3pg3cYCO8IuwDHKp_xeLw.png" /><figcaption>Snip 6.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*tyMEpjhGLMDxyxoefZ1AuQ.png" /><figcaption>Fig 12.</figcaption></figure><p>So what does it mean to have a different line of simultaneity for the moving reference frame, when <strong>O`</strong> and <strong>B`</strong> shot beams of light towards <strong>A`, </strong>if<strong> </strong>the light emission from <strong>O`</strong> and <strong>B`</strong> were to be treated as separate events, then these events were simultaneous in <strong>S`</strong> because they happened at the same time in <strong>S`</strong>, but in <strong>S</strong> these events are not simultaneous because they are happening at different times in <strong>S. </strong>In <strong>S, A` </strong>rushing towards light beam from <strong>B`</strong> and moving away from light beam of <strong>O`, </strong>in order for the light from <strong>O`</strong> and <strong>B`</strong> reach <strong>A`</strong> at the same time, according to <strong>S,</strong> the light emitted from <strong>A` </strong>must be a later time than <strong>O`</strong>. Generally speaking two events that are simultaneous in a stationary reference will not be simultaneous from a moving reference frame. This idea is called <strong>relativity of simultaneity</strong>. There is no resolution to this, there is no right frame or wrong frame for viewing the two events, this is just a consequence resulting from the invariance of speed of light.</p><p>Using the findings above, let us attempt to write the co-ordinate transformations between <strong>S</strong> and <strong>S`</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*iGYC8zGcductVrqKV37gSw.png" /><figcaption>Snip 7.</figcaption></figure><p>The boxed equations are the transformation equations for both space and time dimensions, we have introduced <strong>f(v) </strong>a compatibility factor in the equations. The justification for having <strong>f(v) </strong>is again because of the invariance of the speed of light. For any event in <strong>S </strong>the only way <strong>S` </strong>will know <strong>x</strong> and <strong>t</strong> for that event is by some observer in <strong>S</strong> conveying about <strong>x</strong> and <strong>t</strong> to <strong>S`</strong>, now for <strong>S`</strong> to identify its event co-ordinates using the given <strong>x</strong> and <strong>t</strong> has to consider the fact that the speed of light is still <strong>c m/s</strong> for <strong>S</strong> even though there is relative motion between <strong>S</strong> and <strong>S`</strong>, if this is true then the distance and the time scales must somehow be different as speed is distance/time. Once this is known <strong>S </strong>cannot directly use the <strong>x </strong>and <strong>t</strong> in the transformation equations, instead has to scale them by some factor <strong>f(v)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*YxaS5uwwRBgsFucR_9R-kg.png" /><figcaption>Snip 8.</figcaption></figure><p>We cannot solve for <strong>f(v) </strong>using just the above equations, we will need additional equations to identify <strong>f(v)</strong> and for that we will do the following.</p><p>This time we will position ourselves in <strong>S`, </strong>so <strong>S` </strong>now becomes the stationary reference frame<strong> </strong>and we see that it is <strong>S </strong>that is moving at <strong>-v</strong> <strong>m/s</strong> along the <strong>x-axis</strong>. Now we will flash the beam of light from origin at the point of intersection at <strong>t=0 </strong>in the opposite direction i.e <strong>-c m/s, </strong>and we repeat the same series of steps as we did before to find the line of simultaneity. The findings are as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*2Hf2q5bMo0xdzb3o3FukQg.png" /><figcaption>Fig 13.</figcaption></figure><p>So it is a symmetrical situation when viewed in <strong>S`, </strong>we now have the transformation equations for <strong>S -&gt; S`</strong> and <strong>S`-&gt; S</strong> as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*wGcYurJ9IRq59XAfLAFwTg.png" /><figcaption>Snip 9.</figcaption></figure><p>From the above sets of equations we will make the following substitutions to find <strong>f(v).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*QjqNGZmnortRlVESs5eDFw.png" /><figcaption>Snip 10.</figcaption></figure><p>So we have figured <strong>f(v) </strong>which is termed as the <strong>Lorentz factor</strong>.</p><p>Let us re-write the transformation equations with our recent finding of <strong>f(v)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*ClEAiEzqNRtq522gpYR4Pg.png" /><figcaption>Snip 13.</figcaption></figure><p>So we have arrived at the <strong>Lorentz transformations </strong>along with the <strong>Lorentz factor. </strong>Lets<strong> </strong>rewrite them in a more recognizable form (<strong>f(v) as γ)</strong> as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*LTzntb6ngBOZOQlx7_2Mqg.png" /><figcaption>Snip 15.</figcaption></figure><p>So there we go, this is how we can come at finding the <strong>Lorentz transformations</strong> and the <strong>Lorentz factor</strong>. Thanks for reading.</p><p>References</p><ol><li>Stanford lecture series by Leonard Susskind — <a href="https://www.youtube.com/watch?v=toGH5BdgRZ4&amp;t=3117s">https://www.youtube.com/watch?v=toGH5BdgRZ4&amp;t=3117s</a></li></ol><p>2. Introduction to relativity by Ramamurti Shankar — <a href="https://www.youtube.com/watch?v=pHfFSQ6pLGU&amp;t=3165s">https://www.youtube.com/watch?v=pHfFSQ6pLGU&amp;t=3165s</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1987f91aac5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fourier Transform from ground up]]></title>
            <link>https://medium.com/@ckiran2508/fourier-transform-from-ground-up-766db989cb2d?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/766db989cb2d</guid>
            <category><![CDATA[derivation]]></category>
            <category><![CDATA[fourier-series]]></category>
            <category><![CDATA[fourier-transform]]></category>
            <category><![CDATA[signal-processing]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Sun, 02 Jun 2024 14:13:50 GMT</pubDate>
            <atom:updated>2025-09-24T18:08:12.153Z</atom:updated>
            <content:encoded><![CDATA[<p>The goal of this post is to arrive at the following expression i.e the Fourier Transform. This post is going to be bit long as the derivation will be covered in greater detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*xY_mM4AIKzRo2uwurXvVYg.png" /><figcaption>Eqn 1.</figcaption></figure><p>Fourier transform is a tool used to decompose any real world signal into sine waves of different frequencies and and the strength of those frequencies i.e the amplitude. This has widespread use in signal processing (like knowing the strength of bass frequencies and treble frequencies in a sound signal), image processing, radar and the list goes on.</p><p>More specifically, the Fourier transform converts a time domain signal into a frequency domain signal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0dX00YvE5t-4rnWi7kURMQ.png" /><figcaption>Fig 1.</figcaption></figure><p>Let us begin with something very basic, an object moving along a circular path and is at a distance <strong>A</strong> meters from the center.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*13i0hWvXsfnEVviHIBE4eg.png" /><figcaption>Fig 2.</figcaption></figure><p>If the object makes an angular displacement of <strong>θ</strong> radians in time <strong>t</strong> seconds, then its angular velocity <strong>ω</strong> can be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/136/1*goXi2fNEUvMvoeYaSJ9yRA.png" /><figcaption>Eqn 2.</figcaption></figure><p>The time taken by the object to complete a full circle (<strong>2*π radians)</strong> or to arrive at the point where it started off is called the time period. For our analysis we will consider the time period to be <strong>T</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*HdeVQxolBz15rENRmHNtgg.png" /><figcaption>Fig 3.</figcaption></figure><p>the angular velocity <strong>ω</strong> can now be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/142/1*QJBgAkn7zUaJRR2LvyMz5A.png" /><figcaption>Eqn 3</figcaption></figure><p>We are considering time period to be just <strong>T</strong>, however it is common practice to have time period <strong>2T, </strong>which affects the final result that we get, but the essence remains the same whether it is <strong>T </strong>or <strong>2T</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*-JeKOLsZJOZFV0WXXdTpYQ.png" /><figcaption>Fig 4.</figcaption></figure><p>Now any point on that circle can be represented by <strong>x</strong> and <strong>y</strong> co-ordinates, let us track just the values of <strong>y</strong> for different times as the object completes the full circle with time period <strong>T</strong> seconds. The graph of that trace would look something as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*bOgF04QvVduKvG4zi42E4g.png" /><figcaption>Fig 5.</figcaption></figure><p>The graph is a one dimensional motion along <strong>y</strong> -axis. It follows a sine curve which from Fig 4 can be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*1XDd_hQNMGgZm9VowBb0IA.png" /><figcaption>Eqn 4.</figcaption></figure><p>Next lets make the following modifications based on what we know so far.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*tiIGoPNNc0J6W0_Iz7e4zw.png" /><figcaption>Eqn 5.</figcaption></figure><p><strong><em>Omega ω in the context of circular motion represented angular velocity, now when we are tracking the motion along y-axis (1-dimension), ω represents angular frequency and it is this representation that we will be using for the rest of our analysis.</em></strong></p><p>The above expression yields us only a particular shape of the sine wave. We can generalize a sine wave of any amplitude and angular frequency by the below expression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*6jHwUkxAAWLPDPGDZGp_fA.png" /><figcaption>Eqn 6.</figcaption></figure><p>Next if we were to plot the values for <strong>x</strong> for different times for the whole time period <strong>T</strong> we would see the plot as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*TwbhJwEGcamYQm-gesv0CA.png" /><figcaption>Fig 6.</figcaption></figure><p>This graph is plot of a cosine curve which again using Fig 4 can be written as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/1*0g4WsGJRGn_qk2ZHTi44bQ.png" /><figcaption>Eqn 7.</figcaption></figure><p>We can make the same substitutions as we did for <strong>y</strong> and we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/205/1*ro6hyVcV7ekeRpe2aZNOvA.png" /><figcaption>Eqn 8.</figcaption></figure><p>We can write the above equation in terms of sine as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*1AcuAZ5AJvBDv_tkVbu-kA.png" /><figcaption>Eqn 8.</figcaption></figure><p>Now if we compare Eqn 5 and 8, we see that for <strong>x</strong> the sine term has <strong>π / 2</strong>. When we see the graphs Fig 5 and Fig 6, we see that at time <strong>0</strong>, <strong>y</strong> starts from <strong>0</strong>, whereas <strong>x</strong> starts from <strong>A</strong> or the maximum value. <strong>x</strong> and <strong>y</strong> are said to have a phase difference of <strong>π/2</strong>.</p><p>Note that <strong>x</strong> and <strong>y</strong> still represent the position of the object on the circle, but we have isolated them and have tried to represent their progression with time as a function of time independently.</p><p>The reason for doing this is we can now correlate the progression of <strong>x</strong> or <strong>y</strong> with time with any real world time varying signal such as an electrical signal or a sound signal (pressure wave) etc.</p><p>Lets now talk about the Fourier series, so what comes next can be a slight jump from what we have been discussing so far, but we will work backwards and try to connect with the basics. So the idea behind Fourier series is that any signal defined by <strong>f(t) </strong>can be represented by an infinite sum of sines and cosines and mathematically it is written as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*dNur3OWEbSK_Yx1dimlQaQ.png" /><figcaption>Eqn 9.</figcaption></figure><p>This is also called the synthesis equation, the equation is valid for the signal <strong>f(t)</strong> having time period <strong>T</strong>, we can separate the equation into two terms and examine how the graph looks like for each term and then we can get a sense of the equation as a whole.</p><p>Lets first consider the cosine term, the expansion is shown as below, the time period <strong>T</strong> is considered <strong>1</strong> and the amplitude <strong>a_n</strong> are chosen with increments of 0.1 for the sake of graph plotting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*aMqFsurofs5R2yZta6pUhA.png" /><figcaption>Snip 1.</figcaption></figure><p>The graph looks something as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*fWQ70hlRFfQDE67QzWvnFQ.png" /><figcaption>Fig 7.</figcaption></figure><p>And now for the 2nd term and its corresponding graph</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*on-3bppfV768v6bTLCeK5w.png" /><figcaption>Snip 2.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*Q5iwEWOU1ySPzXC81nyyOw.png" /><figcaption>Fig 8.</figcaption></figure><p>The graphs are the approximation of the first few terms in the series. The graph of the sine series always starts at <strong>0</strong> and the graph for the cosine series always starts at the maximum value, meaning they have a phase difference of <strong>π/2</strong>.</p><p>If a signal were to always start at <strong>0 </strong>then we could just have sine terms only, but having the cosines allows us to have a signal with a range of phase from <strong>0</strong> to <strong>π/2</strong>. When we combine both, graphically we see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*nAturKVnb6imA3oyZwlKaA.png" /><figcaption>Fig 9.</figcaption></figure><p>The coefficients <strong>a_n</strong> and <strong>b_n</strong> tell us about the amplitudes of the different angular frequencies <strong>2*n*π/T</strong> that make up the signal. Our next milestone would be to derive the equation for these coefficients.</p><p>The upcoming derivations involved requires an understanding of calculus, the number of terms appearing in upcoming equations may seem overwhelming to simplify, but we will go term by term and that way it is easier to simplify.</p><p>Let us integrate <strong>f(t)</strong> over its time period <strong>T</strong> in efforts to find the coefficients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*oy7qwYNPyHaIRkWdEQJJ3g.png" /><figcaption>Snip 3.</figcaption></figure><p>For all values of <strong>n</strong> from <strong>0</strong> to infinity <strong>∞</strong> the sine integral results to <strong>0</strong>. The integrals are simple to evaluate.</p><p>For the cosine integral for <strong>n &gt; 0</strong>, the integral reduces to <strong>0</strong>. But for <strong>n=0</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*622IQBiEHru78Q0lruQvQQ.png" /><figcaption>Eqn 10.</figcaption></figure><p>We can see that <strong>a_0</strong> is a constant (also called the <strong>DC offset </strong>in the context of electrical signals<strong>)</strong> that is the average of the function <strong>f(t)</strong> over <strong>T, </strong>with <strong>a_0 </strong>now being known we can rewrite the Fourier series expression as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*HYSib3Qc5GPw7zHOCkFp3A.png" /><figcaption>Eqn 11</figcaption></figure><p>We will now multiply with <strong>cos(2*m*π*t/T)</strong> to Eqn 11. and integrate it over the time period T.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cd94qbf5vOt4OIAXaEGSDQ.png" /><figcaption>Snip 4.</figcaption></figure><p><strong><em>Note : m takes a single integer value from 1 to infinity </em>∞</strong></p><p>Let us simplify the terms on the right hand side one by one. The first term with <strong>a_0</strong> involved ,<strong>a_0</strong> being a constant the integral results to 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TlOpl72QsA70M_B8kVe1HQ.png" /><figcaption>Snip 5.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*stkVCwD8qJCd07K24WvbQQ.png" /><figcaption>Snip 6.</figcaption></figure><p><strong>m</strong> and <strong>n</strong> being whole numbers and so are <strong>m+n</strong> and <strong>m-n</strong>, each summation term represents complete <strong>m+n</strong> and <strong>m-n</strong> cycles. When the cycles are complete we can say that the integrals reduce to <strong>0</strong>.</p><p>We have to consider the case when <strong>n=m</strong>, which results in <strong>m-n= 0</strong>. In this case we the 2nd term reduces to as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*pqorA86vKqkwFQSJn7G5nQ.png" /><figcaption>Snip 7.</figcaption></figure><p>Now the 3nd term of Eqn 11.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*wESIQJEjv89pMfhZKhbYCQ.png" /></figure><p>We can apply the same idea of <strong>m+n</strong> and <strong>m-n</strong> complete cycles, and we get all integrals reduce to <strong>0</strong> even when <strong>n=m</strong> as <strong>sin(0) = 0</strong>. Therefore the whole 2nd term results to <strong>0</strong>.</p><p>Let us substitute the results of the 2nd term and 3rd term in Eqn 11.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*loT-qg7oSTbR5tZ3B2O1lw.png" /><figcaption>Eqn 12.</figcaption></figure><p>We now have derived the equation for <strong>a_n</strong>. For <strong>b_n</strong> we multiply Eqn 9. with <strong>sin(2*m*π*t/T)</strong> and then integrate over period <strong>T</strong>, and we perform the same steps as we did for <strong>a_n</strong> and we get <strong>b_n</strong> as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*gUIdJdKsPUFEEd6v_9QKTA.png" /><figcaption>Eqn 13.</figcaption></figure><p>Let us summarize our findings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*CnU2BwwU0X4zmLZy74_KEg.png" /><figcaption>Snip 9.</figcaption></figure><p>If needed we could stop just here, and we can call this the <strong>Fourier transform</strong> in <strong>trigonometric</strong> form. Given a periodic signal of any nature we could accomplish all that a Fourier transform should do using the above results.</p><p>But we will continue deriving for the complex exponential form as mentioned in the beginning of the post.</p><p>Before we continue let us briefly mention about even and odd functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*gCsQKO2xHNo0hsTdeqODbA.png" /><figcaption>Snip 10.</figcaption></figure><p>Having proved <strong>a_n</strong> an even function of <strong>n</strong> and <strong>b_n</strong> an odd function of input <strong>n</strong>, next we will substitute Euler identities for cosine and sine in Eqn 11.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*Id2HuAvQTZ9owVeHmdgZqQ.png" /><figcaption>Snip 11.</figcaption></figure><p>We did a lot of simplification in the previous snip, but most of it was just simple algebra. Now we will make use of the fact that <strong>a_n</strong> is an even function of <strong>n</strong> and <strong>b_n</strong> an odd function of <strong>n</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*5dBJFtGbSkDktIB_kxsU7w.png" /><figcaption>Snip 12.</figcaption></figure><p>Now one can guess the next steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*oy4IPIyv8Pr3g2CaZsqxjw.png" /><figcaption>Eqn 14.</figcaption></figure><p>So we have arrived at the synthesis expression of Fourier series in exponential form. We will simplify <strong>c_n</strong> by using the results for <strong>a_n</strong> and <strong>b_n</strong> in <strong>c_n</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*sEIkHwb-RQDZfGpdD-yWFg.png" /><figcaption>Eqn 15.</figcaption></figure><p>So we have simplified <strong>c_n </strong>in terms of known quantities. This can be treated as the Fourier transform for any periodic signal <strong>T, </strong>but the Fourier Transform is originally meant for non periodic signals, we will continue with our quest of finding the text book Fourier transform. Let us first summarize our recent findings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*-JNFtlRuAg3cu6is9fNReg.png" /><figcaption>Snip 13.</figcaption></figure><p>Now so far along the post the steps involved in the arriving at out recent results might have seemed straight forward, now to solve for the non-periodic signal, the upcoming steps might make one a little uncomfortable, but we will try to back them with proper rationale. So for any non-periodic signal we can say that its time period is <strong>infinity</strong> <strong>(∞)</strong>. We need to plug in this idea in the above equations to arrive at the Fourier transform.</p><p>Lets us have a look of what <strong>c_n </strong>might look like for a periodic signal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*fI9cGNfMCf0yDfA9LMgqTg.png" /><figcaption>Fig 10.</figcaption></figure><p>Note that the values are discrete i.e <strong>c_n</strong> has values where <strong>n= -2,-1,0,1,2,3</strong> and nothing in between.</p><p>Substituting the full expression of <strong>c_n </strong>in <strong>f(t).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*rsb25KyQtW2rFZOmUxyItQ.png" /><figcaption>Eqn 16.</figcaption></figure><p>Introducing frequency. The relationship between angular frequency and frequency is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*_WSGsZACbJQsI83p05Sl3g.png" /><figcaption>Snip 14.</figcaption></figure><p>We now have two options to express Fourier transform, either with <strong>angular frequency</strong> <strong>ω</strong> or just <strong>frequency</strong> <strong>f</strong>, we will use the angular frequency <strong>ω</strong>. We will now account for the time period <strong>T </strong>-&gt; <strong>∞ </strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*jnxRneQqD_oheYNPaRdZ-Q.png" /><figcaption>Snip 15.</figcaption></figure><p>Substituting in Eqn 16 and multiplying by <strong>2π</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*tqffPiNMIVra9vMJs9rpLA.png" /><figcaption>Snip 16.</figcaption></figure><p>As <strong>T</strong> approaches <strong>∞ , </strong>Δ<strong>ω </strong>approaches<strong> 0 </strong>and<strong> n</strong>Δ<strong>ω </strong>becomes<strong> </strong>a continuous variable<strong> ω</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*MKdtFQrAIvrodLgG3-39kA.png" /><figcaption>Fig 11.</figcaption></figure><p>The summation turns to integral and we can re-write <strong>Δω as dω.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*HSNt-GLXQBAAI07rSP301w.png" /><figcaption>Snip 16.</figcaption></figure><p>The function <strong>f(t) </strong>when considered periodic <strong>T</strong> was bound between <strong>0 and T. </strong>Lets shift the function to bound it between <strong>-T/2</strong> and <strong>+T/2</strong>, and nothing should change because the period is still <strong>T. </strong>We are doing this as we can smoothly transition the limits from -<strong>∞ to +∞ .</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*_tqwTULnU5IQuPcVkSCudA.png" /><figcaption>Eqn 17.</figcaption></figure><p>Lets replace <strong>T</strong> with <strong>∞ </strong>and<strong> </strong>define<strong> f(ω)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*RjiIfztjS-J2rqNLLDotFw.png" /><figcaption>Snip 17.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*9gs8vEmsvDacV8A8KO-Lng.png" /><figcaption>Eqn 18.</figcaption></figure><p>The last expression is the expression of <strong>Inverse Fourier transform</strong>, and finally we have arrived at the expression of <strong>Fourier transform</strong> viz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*xY_mM4AIKzRo2uwurXvVYg.png" /><figcaption>Eqn 19.</figcaption></figure><p>There we have it the <strong>Fourier Transform</strong>. From here on, one can explore about Discrete Fourier transform, Fast Fourier transform, apply Fourier transform on some common signal types.</p><p>Thanks for reading.</p><p>Further reading.</p><ol><li>Fourier Transform — 3Blue1Brown <a href="https://www.youtube.com/watch?v=spUNpyF58BY">https://www.youtube.com/watch?v=spUNpyF58BY</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=766db989cb2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solution to a Simple Harmonic Oscillator in a more holistic way]]></title>
            <link>https://medium.com/@ckiran2508/solution-to-a-simple-harmonic-oscillator-5f8861799753?source=rss-d03ae94d8e94------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f8861799753</guid>
            <category><![CDATA[exponential]]></category>
            <category><![CDATA[harmonic-oscillator]]></category>
            <category><![CDATA[differential-equations]]></category>
            <dc:creator><![CDATA[Kiran Channayanamath]]></dc:creator>
            <pubDate>Wed, 27 Dec 2023 13:45:52 GMT</pubDate>
            <atom:updated>2024-10-22T20:57:59.659Z</atom:updated>
            <content:encoded><![CDATA[<p>Modelling of a simple harmonic oscillator can be considered a classical case study to anyone who is getting into solving for systems whose properties vary with time. A thorough understanding of this system is essential in order to solve for more complex systems, and can be thought as an extension of this system. One can draw direct analogies in modelling AC circuits as the characteristics of the system can very much be correlated.</p><p>Below is the snapshot in time of a harmonic oscillator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVIOmaFROeawFJbspC4m7Q.png" /></figure><p>Here are some of the facts about the system.</p><ul><li>The mass moves along x-axis (only) between -<strong>A</strong> to +<strong>A </strong>(also called the amplitude).</li><li><strong>x=0</strong>, is the rest position of mass when no force is applied.</li><li>The value of <strong>A</strong> depends on far along x-axis was the mass pulled and let go.</li><li>The spring has some characteristic value called spring constant ‘<strong>k</strong>’, and the mass has mass ‘<strong>m</strong>’ kg.</li><li>We assume zero friction in the motion of the mass, so the mass will oscillate indefinitely once some external force is applied.</li></ul><p>The situation we are in is that the mass is already in an oscillatory motion because some external force was applied by someone sometime back. Now we are given a timer, we start the timer and at the same instant we record the mass’s position in x-axis and its velocity at that position, we term these as the initial conditions.</p><p><em>So what does it mean to finding a solution to this system ?</em></p><p><strong>Answer</strong>. Given the initial conditions, mass, spring constant and with the timer ticking, the goal is to derive a mathematical expression that takes in all the mentioned parameters and gives back the position of mass at some time, or simply put, an equation for <strong>x</strong> as a function of time <strong>t.</strong></p><p>We can begin by writing the force exerted on the mass by the spring as given by Hooke’s law.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/125/1*NQikf3neXZ-t3_yP3LWZdA.png" /></figure><p>The force depends on the mass’s distance from its rest position . Lets sub in the Newton’s 2nd law for force and rearrange the terms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*xgdPtxx97kOww_IZGBqxPA.png" /></figure><p>We know that acceleration is 2nd derivative of position w.r.t to time. So lets make that modification and you see the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*Ebw8m1p-LsZj0_gt05gb9w.png" /></figure><p>We can rewrite the derivative term to make it less verbose and divide the whole equation by m.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/168/1*p7PGizS8-_G3r7NgMsUXFw.png" /><figcaption><strong>Equation</strong> <strong>1</strong></figcaption></figure><p><strong>Equation 1 </strong>is a linear 2nd order homogenous differential equation. Finding a solution to this differential equation gets us the solution to the Harmonic oscillator.</p><p>Now there is no one standard way to solving this differential equation, we tend to guess the solution just by observing the differential equation. If we check carefully the <strong>Equation 1</strong>, it says that the 2nd derivative of a function must equal some constant times the function itself. We can think of sines, cosines and exponential functions who have this nature.</p><p>We will make a guess (ansatz) that an exponential function of the form below to be the solution to <strong>Equation 1</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/133/1*CuRhlBPE20r2drWNMgOCWQ.png" /></figure><p>where <strong>α</strong> is a constant, the reason being according to <strong>Equation 1</strong>, the 2nd derivative must equal some ‘constant’ times the function.</p><p>Let us use our solution guess in <strong>Equation 1</strong> to see if it satisfies the differential equation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*A0XffJuzDtBQJUpsrseXZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*tivEUoNN7fJu6H2xatQQ1w.png" /></figure><p>Simplifying the equation further we get.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*cnar9e4D2qYZFvMrzJ8cQw.png" /></figure><p>We see that <strong>e^(α*t)</strong> must be a non-zero result for any value of t. Therefore</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*C8MZR8wUuJ3RygGpbYK3hg.png" /></figure><p>in order for our solution to satisfy the differential equation, <strong>α</strong> turns out to be a complex number with two root values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*n7FjnEUI0te-lkqkB86UKQ.png" /></figure><p>We will write <strong>sqrt(k/m)</strong> as <strong>ω</strong> because <strong>k</strong> and <strong>m</strong> are constants and so <strong>ω</strong> is also a constant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*dyUbK8N7uQYR1o0N1RzJbg.png" /></figure><p>The constant <strong>α</strong> being a complex number lead to solutions that are of complex form. Lets us write the solutions to the two values of <strong>α</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*XcZHgp4KjZFX-PK8VNbECg.png" /></figure><p>But we know that <strong>x</strong> is a real number for any given time <strong>t </strong>and it cannot take a complex form. We now need to find the solution that gives a real value using our findings so far.</p><p><em>For any linear nth order differential equation having n solutions, it turns out that the sum of all the solutions is also a solution to that differential equation viz also called the </em><strong><em>Superposition Principle</em></strong><em>.</em></p><p>Let us use this principle for our scenario in efforts to finding a solution that gets us a real number. So according to the superposition principle, the following solutions holds true for <strong>Equation 1</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*NZvowlBTvyvm3TghfokuFg.png" /></figure><p>where <strong>c1</strong> and <strong>c2</strong> are any constants.</p><p>Continuing further, lets consider the constants <strong>c1</strong> and <strong>c2</strong> to be complex numbers, lets do this as this might lead us to a real solution to <strong>Equation 1</strong>. Please note the solutions are still valid with <strong>c1</strong> and <strong>c2 </strong>being<strong> </strong>complex numbers.</p><p>With <strong>c1</strong> and <strong>c2</strong> as complex number constants, let us to make a proposition that the following solution is real.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*odr1syoNpxTOi7OiXeH4HA.png" /><figcaption><strong>Equation 2</strong></figcaption></figure><p><strong><em>Note: </em></strong><em>A complex number a = x + iy has its conjugate a* = x — iy</em></p><p>If the above solution were to be real, then it must equal to its conjugate. Meaning a real number is a conjugate of itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*6Xyuubn4k7Yeb6LnMHFtiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/182/1*ncNC0E3PStSJHpRrNMPXHQ.png" /></figure><p>and when we match the exponential terms we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/1*ok4l3m8NiKGBqzq99YYx5A.png" /></figure><p>Let us make the substitution for c2 in <strong>Equation 2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*VZdxmo7J-BESegRzwIR7pw.png" /></figure><p><strong>c1</strong> being complex number can be expressed as complex exponential</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*YeLdw4--tdedqwpgUvY2Vw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*c6RUq7WklQ4WS4YQltEcLA.png" /></figure><p>Simplifying exponents</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*vY-cvsvKmjcdcsnBkh1LKw.png" /></figure><p>We also know that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*H61SzLH0WHSA4alvNwCheg.png" /></figure><p>Using this result we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*jjaUJ9Wa3o8BcGB6aSjNbw.png" /></figure><p>Or</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*O4L4vDQ7PVjzWK8HADg7LQ.png" /></figure><p>The above expression turns out to give us a real number as there are no complex terms involved<strong>.</strong></p><p>We still need to make sense of what each term in the equation mean. There are terms like <strong>C(2 |c1| = C)</strong> and <strong>φ</strong> which we need to associate with the known parameters.</p><p>Lets set <strong>t = 0</strong> and see what we get.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/1*F3dgb0h4emt5jrQoQ02IPg.png" /></figure><p>Therefore the term <strong>C</strong> <strong>cos(φ)</strong> represents the initial position of the mass the instant we are to start our timer i.e. <strong>t=0.</strong></p><p>The maximum value of <strong>x(t) </strong>can be is <strong>A </strong>which is the maximum distance travelled on either side (i.e the amplitude) and so</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*TTnp9KJnckNigyjMXedrfQ.png" /></figure><p>When <strong>C = A</strong> we have <strong>cos(φ) = 1 </strong>and therefore<strong> φ = 0.</strong></p><p>So we can say that the constant <strong>C</strong> is <strong>A (amplitude) </strong>when we decide to start the timer the moment the mass has reached its maximum (<strong>A) </strong>at<strong> </strong>the positive end.</p><p><strong>φ </strong>lets<strong> </strong>us<strong> </strong>choose the position of the mass on the x-axis where we would like to begin our timer i.e between <strong>-A</strong> and <strong>+A</strong>.</p><p>The way we deduce <strong>φ </strong>is by analyzing a rotating vector <strong>Ae^i(φ) </strong>with<strong> </strong>the real part <strong>Acos(φ)=C </strong>representing the position of the mass along x-axis and imaginary part <strong>iASin(φ) </strong>in the imaginary axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*alZQtwWj2JsD-DK5nRaXJQ.png" /></figure><p>So in conclusion the solution to the <strong>Harmonic Oscillator</strong> is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*mXzRbEa64XmfybqsPK93qA.png" /></figure><p>which considering the initial conditions and the spring characteristics gets us the position of mass at any elapsed time.</p><p>There are in fact other approaches to solving this system and also there are different ways in how the solution can be expressed mathematically.</p><p>Other versions of this problem one can explore are</p><ol><li>When there is friction in the system.</li><li>When there is a sinusoidal driving force.</li><li>A pendulum system.</li><li>LC tank circuit.</li></ol><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f8861799753" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>