<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aadi Bhure | Aadi.ink on aadi.ink</title>
    <link>https://aadi.ink/</link>
    <description>Recent content in Aadi Bhure | Aadi.ink on aadi.ink</description>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <lastBuildDate>Wed, 28 Jan 2026 20:01:08 +0200</lastBuildDate>
    <atom:link href="https://aadi.ink/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Efficiency and Accuracy of First- and Second-order Schemes for Shallow Water Equations on GPUs</title>
      <link>https://aadi.ink/research/shallow-gpu-efficiency-accuracy/</link>
      <pubDate>Sat, 25 Oct 2025 20:01:08 +0200</pubDate>
      <guid>https://aadi.ink/research/shallow-gpu-efficiency-accuracy/</guid>
      <description>&lt;h1 id=&#34;abstract&#34;&gt;Abstract&lt;/h1&gt;&#xA;&lt;p&gt;The overarching goal of numerical simulation is to offer the most accurate solution in the shortest amount of time, and typically also using the least amount of computational resources. Whilst the accuracy and convergence of numerical schemes often is well studied, there is little literature that on how such numerical schemes compare in practice on physical hardware.&lt;/p&gt;&#xA;&lt;p&gt;The aim of this paper is to compare the accuracy and computational efficiency on GPUs of finite volume schemes for the shallow water equations. At the end of the day, it is time-to-result with a certain accuracy that counts, and it is not given which numerical scheme yields the best results for this metric.&lt;/p&gt;&#xA;&lt;p&gt;We compare the efficiency and accuracy of several different finite volume schemes on GPUs for one-dimensional and two-dimensional problems, with both shock and smooth solutions. The selected schemes include Lax&amp;ndash;Friedrichs, FORCE, Harten&amp;ndash;Lax&amp;ndash;van Leer (HLL), Kurganov&amp;ndash;Petrova, and Weighted Average Flux.&lt;/p&gt;&#xA;&lt;p&gt;We compare the computing time for each scheme with a predetermined accuracy requirement, and vice versa how accurate a numerical scheme is given a set computing time.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Poster for Conference on Dense Granular Flows 2025</title>
      <link>https://aadi.ink/research/dgf25/</link>
      <pubDate>Mon, 23 Jun 2025 11:29:43 +0200</pubDate>
      <guid>https://aadi.ink/research/dgf25/</guid>
      <description>&lt;figure&gt;&#xA;&lt;a href=&#34;DGF25Poster_AadiBhure_3k.png&#34;&gt;&#xA;&#x9;&lt;img src=&#39;DGF25Poster_AadiBhure_1k.png&#39; &#xA;&#x9;&#x9; srcset=&#34;DGF25Poster_AadiBhure_0.5k.png 0.5x, DGF25Poster_AadiBhure_1k.png 1x, DGF25Poster_AadiBhure_2k.png 2x, DGF25Poster_AadiBhure_3k.png 3x&#34;&#xA;&#x9;&#x9; alt=&#34;A poster with text and images.&#34; &#xA;&#x9;&#x9; class=&#34;figure&#34; &#xA;&#x9;&#x9; width=&#34;648&#34; height=&#34;916&#34; &#xA;&#x9;&#x9; /&gt;&#xA;&lt;/a&gt;&#xA;&#x9;&lt;div class=&#34;caption-figure&#34;&gt;Click the image to download a higher resolution PNG.&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;&#xA;This is the full animation of the simulation from our solver.&#xA;This is not presented as a &lt;i&gt;result&lt;/i&gt;, but just an illustration to support the poster.&#xA;The &lt;b&gt;parameters are not realistic.&lt;/b&gt;&#xA;&lt;/p&gt;&#xA;&lt;br&gt;&#xA;&lt;!-- MATPLOTLIB ANIMATE.HTML --&gt;&#xA;&lt;link rel=&#34;stylesheet&#34;&#xA;href=&#34;https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css&#34;&gt;&#xA;&lt;script language=&#34;javascript&#34;&gt;&#xA;  function isInternetExplorer() {&#xA;    ua = navigator.userAgent;&#xA;    /* MSIE used to detect old browsers and Trident used to newer ones*/&#xA;    return ua.indexOf(&#34;MSIE &#34;) &gt; -1 || ua.indexOf(&#34;Trident/&#34;) &gt; -1;&#xA;  }&#xA;&#xA;  /* Define the Animation class */&#xA;  function Animation(frames, img_id, slider_id, interval, loop_select_id){&#xA;    this.img_id = img_id;&#xA;    this.slider_id = slider_id;&#xA;    this.loop_select_id = loop_select_id;&#xA;    this.interval = interval;&#xA;    this.current_frame = 0;&#xA;    this.direction = 0;&#xA;    this.timer = null;&#xA;    this.frames = new Array(frames.length);&#xA;&#xA;    for (var i=0; i&lt;frames.length; i++)&#xA;    {&#xA;     this.frames[i] = new Image();&#xA;     this.frames[i].src = frames[i];&#xA;    }&#xA;    var slider = document.getElementById(this.slider_id);&#xA;    slider.max = this.frames.length - 1;&#xA;    if (isInternetExplorer()) {&#xA;        // switch from oninput to onchange because IE &lt;= 11 does not conform&#xA;        // with W3C specification. It ignores oninput and onchange behaves&#xA;        // like oninput. In contrast, Microsoft Edge behaves correctly.&#xA;        slider.setAttribute(&#39;onchange&#39;, slider.getAttribute(&#39;oninput&#39;));&#xA;        slider.setAttribute(&#39;oninput&#39;, null);&#xA;    }&#xA;    this.set_frame(this.current_frame);&#xA;  }&#xA;&#xA;  Animation.prototype.get_loop_state = function(){&#xA;    var button_group = document[this.loop_select_id].state;&#xA;    for (var i = 0; i &lt; button_group.length; i++) {&#xA;        var button = button_group[i];&#xA;        if (button.checked) {&#xA;            return button.value;&#xA;        }&#xA;    }&#xA;    return undefined;&#xA;  }&#xA;&#xA;  Animation.prototype.set_frame = function(frame){&#xA;    this.current_frame = frame;&#xA;    document.getElementById(this.img_id).src =&#xA;            this.frames[this.current_frame].src;&#xA;    document.getElementById(this.slider_id).value = this.current_frame;&#xA;  }&#xA;&#xA;  Animation.prototype.next_frame = function()&#xA;  {&#xA;    this.set_frame(Math.min(this.frames.length - 1, this.current_frame + 1));&#xA;  }&#xA;&#xA;  Animation.prototype.previous_frame = function()&#xA;  {&#xA;    this.set_frame(Math.max(0, this.current_frame - 1));&#xA;  }&#xA;&#xA;  Animation.prototype.first_frame = function()&#xA;  {&#xA;    this.set_frame(0);&#xA;  }&#xA;&#xA;  Animation.prototype.last_frame = function()&#xA;  {&#xA;    this.set_frame(this.frames.length - 1);&#xA;  }&#xA;&#xA;  Animation.prototype.slower = function()&#xA;  {&#xA;    this.interval /= 0.7;&#xA;    if(this.direction &gt; 0){this.play_animation();}&#xA;    else if(this.direction &lt; 0){this.reverse_animation();}&#xA;  }&#xA;&#xA;  Animation.prototype.faster = function()&#xA;  {&#xA;    this.interval *= 0.7;&#xA;    if(this.direction &gt; 0){this.play_animation();}&#xA;    else if(this.direction &lt; 0){this.reverse_animation();}&#xA;  }&#xA;&#xA;  Animation.prototype.anim_step_forward = function()&#xA;  {&#xA;    this.current_frame += 1;&#xA;    if(this.current_frame &lt; this.frames.length){&#xA;      this.set_frame(this.current_frame);&#xA;    }else{&#xA;      var loop_state = this.get_loop_state();&#xA;      if(loop_state == &#34;loop&#34;){&#xA;        this.first_frame();&#xA;      }else if(loop_state == &#34;reflect&#34;){&#xA;        this.last_frame();&#xA;        this.reverse_animation();&#xA;      }else{&#xA;        this.pause_animation();&#xA;        this.last_frame();&#xA;      }&#xA;    }&#xA;  }&#xA;&#xA;  Animation.prototype.anim_step_reverse = function()&#xA;  {&#xA;    this.current_frame -= 1;&#xA;    if(this.current_frame &gt;= 0){&#xA;      this.set_frame(this.current_frame);&#xA;    }else{&#xA;      var loop_state = this.get_loop_state();&#xA;      if(loop_state == &#34;loop&#34;){&#xA;        this.last_frame();&#xA;      }else if(loop_state == &#34;reflect&#34;){&#xA;        this.first_frame();&#xA;        this.play_animation();&#xA;      }else{&#xA;        this.pause_animation();&#xA;        this.first_frame();&#xA;      }&#xA;    }&#xA;  }&#xA;&#xA;  Animation.prototype.pause_animation = function()&#xA;  {&#xA;    this.direction = 0;&#xA;    if (this.timer){&#xA;      clearInterval(this.timer);&#xA;      this.timer = null;&#xA;    }&#xA;  }&#xA;&#xA;  Animation.prototype.play_animation = function()&#xA;  {&#xA;    this.pause_animation();&#xA;    this.direction = 1;&#xA;    var t = this;&#xA;    if (!this.timer) this.timer = setInterval(function() {&#xA;        t.anim_step_forward();&#xA;    }, this.interval);&#xA;  }&#xA;&#xA;  Animation.prototype.reverse_animation = function()&#xA;  {&#xA;    this.pause_animation();&#xA;    this.direction = -1;&#xA;    var t = this;&#xA;    if (!this.timer) this.timer = setInterval(function() {&#xA;        t.anim_step_reverse();&#xA;    }, this.interval);&#xA;  }&#xA;&lt;/script&gt;&#xA;&#xA;&lt;style&gt;&#xA;.animation {&#xA;    display: inline-block;&#xA;    text-align: center;&#xA;}&#xA;input[type=range].anim-slider {&#xA;    width: 374px;&#xA;    margin-left: auto;&#xA;    margin-right: auto;&#xA;}&#xA;.anim-buttons {&#xA;    margin: 8px 0px;&#xA;}&#xA;.anim-buttons button {&#xA;    padding: 0;&#xA;    width: 36px;&#xA;}&#xA;.anim-state label {&#xA;    margin-right: 8px;&#xA;}&#xA;.anim-state input {&#xA;    margin: 0;&#xA;    vertical-align: middle;&#xA;}&#xA;&lt;/style&gt;&#xA;&#xA;&lt;div class=&#34;animation&#34;&gt;&#xA;  &lt;img id=&#34;_anim_img4907090669a8447b953c7f1fa9fef5a8&#34;&gt;&#xA;  &lt;div class=&#34;anim-controls&#34;&gt;&#xA;    &lt;input id=&#34;_anim_slider4907090669a8447b953c7f1fa9fef5a8&#34; type=&#34;range&#34; class=&#34;anim-slider&#34;&#xA;           name=&#34;points&#34; min=&#34;0&#34; max=&#34;1&#34; step=&#34;1&#34; value=&#34;0&#34;&#xA;           oninput=&#34;anim4907090669a8447b953c7f1fa9fef5a8.set_frame(parseInt(this.value));&#34;&gt;&#xA;    &lt;div class=&#34;anim-buttons&#34;&gt;&#xA;      &lt;button title=&#34;Decrease speed&#34; aria-label=&#34;Decrease speed&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.slower()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-minus&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;First frame&#34; aria-label=&#34;First frame&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.first_frame()&#34;&gt;&#xA;        &lt;i class=&#34;fa fa-fast-backward&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;Previous frame&#34; aria-label=&#34;Previous frame&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.previous_frame()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-step-backward&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;Play backwards&#34; aria-label=&#34;Play backwards&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.reverse_animation()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-play fa-flip-horizontal&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;Pause&#34; aria-label=&#34;Pause&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.pause_animation()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-pause&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;Play&#34; aria-label=&#34;Play&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.play_animation()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-play&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;Next frame&#34; aria-label=&#34;Next frame&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.next_frame()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-step-forward&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;Last frame&#34; aria-label=&#34;Last frame&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.last_frame()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-fast-forward&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;      &lt;button title=&#34;Increase speed&#34; aria-label=&#34;Increase speed&#34; onclick=&#34;anim4907090669a8447b953c7f1fa9fef5a8.faster()&#34;&gt;&#xA;          &lt;i class=&#34;fa fa-plus&#34;&gt;&lt;/i&gt;&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;form title=&#34;Repetition mode&#34; aria-label=&#34;Repetition mode&#34; action=&#34;#n&#34; name=&#34;_anim_loop_select4907090669a8447b953c7f1fa9fef5a8&#34;&#xA;          class=&#34;anim-state&#34;&gt;&#xA;      &lt;input type=&#34;radio&#34; name=&#34;state&#34; value=&#34;once&#34; id=&#34;_anim_radio1_4907090669a8447b953c7f1fa9fef5a8&#34;&#xA;             &gt;&#xA;      &lt;label for=&#34;_anim_radio1_4907090669a8447b953c7f1fa9fef5a8&#34;&gt;Once&lt;/label&gt;&#xA;      &lt;input type=&#34;radio&#34; name=&#34;state&#34; value=&#34;loop&#34; id=&#34;_anim_radio2_4907090669a8447b953c7f1fa9fef5a8&#34;&#xA;             checked&gt;&#xA;      &lt;label for=&#34;_anim_radio2_4907090669a8447b953c7f1fa9fef5a8&#34;&gt;Loop&lt;/label&gt;&#xA;      &lt;input type=&#34;radio&#34; name=&#34;state&#34; value=&#34;reflect&#34; id=&#34;_anim_radio3_4907090669a8447b953c7f1fa9fef5a8&#34;&#xA;             &gt;&#xA;      &lt;label for=&#34;_anim_radio3_4907090669a8447b953c7f1fa9fef5a8&#34;&gt;Reflect&lt;/label&gt;&#xA;    &lt;/form&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&lt;script language=&#34;javascript&#34;&gt;&#xA;  /* Instantiate the Animation class. */&#xA;  /* The IDs given should match those used in the template above. */&#xA;  (function() {&#xA;    var img_id = &#34;_anim_img4907090669a8447b953c7f1fa9fef5a8&#34;;&#xA;    var slider_id = &#34;_anim_slider4907090669a8447b953c7f1fa9fef5a8&#34;;&#xA;    var loop_select_id = &#34;_anim_loop_select4907090669a8447b953c7f1fa9fef5a8&#34;;&#xA;    var frames = new Array(60);&#xA;    &#xA;  for (var i=0; i&lt;60; i++){&#xA;    frames[i] = &#34;animate_frames/frame&#34; + (&#34;0000000&#34; + i).slice(-7) +&#xA;                &#34;.png&#34;;&#xA;  }&#xA;&#xA;&#xA;    /* set a timeout to make sure all the above elements are created before&#xA;       the object is initialized. */&#xA;    setTimeout(function() {&#xA;        anim4907090669a8447b953c7f1fa9fef5a8 = new Animation(frames, img_id, slider_id, 50,&#xA;                                 loop_select_id);&#xA;    }, 0);&#xA;  })()&#xA;&lt;/script&gt;&#xA;&lt;!-- END animate.html --&gt;&#xA;&#xA;In case the HTML animation won&#39;t load, you can &lt;a href=&#34;animate.mp4&#34;&gt;see it as a video&lt;/a&gt;.&#xA;</description>
    </item>
    <item>
      <title>The Zeroth of March</title>
      <link>https://aadi.ink/posts/2025/03/zeroth-march/</link>
      <pubDate>Sat, 01 Mar 2025 04:48:27 +0100</pubDate>
      <guid>https://aadi.ink/posts/2025/03/zeroth-march/</guid>
      <description>&lt;p&gt;If I referred to a date as &amp;ldquo;zeroth of March&amp;rdquo;, I bet it would make perfect sense for some but no sense for others.&#xA;Dates are just arbitrary numbers assigned to each day.&#xA;That&amp;rsquo;s not to say that there is no logic within them.&#xA;Months are sometimes 30 days long, sometimes 31, and 28 once, except 29 every so often.&#xA;However, &lt;strong&gt;within a particular month,&lt;/strong&gt; adding one to today&amp;rsquo;s date is still, thankfully, tomorrow&amp;rsquo;s date.&lt;/p&gt;&#xA;&lt;p&gt;Now that&amp;rsquo;s a simple, straightforward, mathematically sound statement.&#xA;It makes logical sense, and we can try to stretch it (which is another way of saying &lt;em&gt;generalise&lt;/em&gt;.)&#xA;Do we need the clause &lt;em&gt;within a particular month&lt;/em&gt;?&#xA;What if we got rid of it and just said&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If today&amp;rsquo;s date is &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;d&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, then &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;d+1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is tomorrow&amp;rsquo;s date.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Think about how one would describe a 24-hour clock in a world where only 12-hour clocks exist.&#xA;We know that adding one to the current hour tells us the next hour.&#xA;We stick to that rule even for 12pm and make 1pm the 13th hour.&#xA;What if we did that for dates too?&#xA;The 31st of June &lt;del&gt;would be&lt;/del&gt; is the day after the 30th of June.&#xA;&lt;label for=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle sidenote-number&#34;&#xA;&#x9;&gt;&lt;input type=&#34;checkbox&#34; id=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle&#34; /&gt;&lt;span&#xA;&#x9;&#x9;class=&#34;sidenote&#34;&gt;If you think this doesn&amp;#39;t make sense, I will argue that it makes at least as much sense as February having only 28 days, while July and August both getting 31.&lt;/span&#xA;&#x9;&gt;&lt;/label&#xA;&gt;&#xA;If you are happy with that, maybe I can convince you that:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If today&amp;rsquo;s date is &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;d&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, then &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;d-1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is yesterday&amp;rsquo;s date.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The two statements are not equivalent.&#xA;The former helps us makes sense of the 32nd of March, but the latter does not.&#xA;It instead helps us make sense of the 0th of March!&lt;/p&gt;&#xA;&lt;p&gt;But why are we trying to faff around with dates that everyone already understands?&#xA;In this case, calling something the &amp;ldquo;zeroth of March&amp;rdquo; is really convenient instead of saying &amp;ldquo;the last day of February&amp;rdquo; or &amp;ldquo;28th February in non-leap years but 29th February in a leap year&amp;rdquo;.&#xA;Calculations also become simple and consistent.&#xA;It is especially handy when the result we&amp;rsquo;re after is only a duration and not a date.&lt;/p&gt;&#xA;&lt;p&gt;As an example consider this scenario:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I know I will run out of coffee in 10 days, but I cannot buy more before the 26th (which is when I will receive my allowance).&#xA;How many days do I have in which I must do my shopping?&#xA;How many days can I afford to procrastinate?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If today is the 18th, then I will run out on &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;18&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;18&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;th &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;10&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;28&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;+10 = 28&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;th and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;28&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;26&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;28 - 26 = 2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;. I can only procrastinate for two days.&lt;/li&gt;&#xA;&lt;li&gt;But if today is the 22nd then I would run out on &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;22&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;22&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;nd &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;10&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;32&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;+ 10 = 32&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;nd and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;32&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;26&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;6&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;32 - 26 = 6&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/li&gt;&#xA;&lt;li&gt;If we aren&amp;rsquo;t allowed the notion of the 32nd day of a month, this calculation becomes complicated.&#xA;What dates are allowed?&#xA;That depends on the current month.&#xA;We did not require that information to come to the answer earlier (because it doesn&amp;rsquo;t affect the answer).&#xA;Say it is February.&#xA;To add 10 days to the 22nd of February, we first add 7 to make reach the 1st of March, then 3.&#xA;That&amp;rsquo;s the 4th of March.&#xA;Then to find the duration between the 26th of February and 4th of March, we again must split it into 2 days of February and 4 days of March so a total of 6 days.&#xA;Each addition and subtraction can become two if we&amp;rsquo;re crossing months.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The zeroth of March is also a useful &lt;em&gt;anchor day&lt;/em&gt; for making date calculations.&#xA;For more an that, I am happy to point you to Rudy Limeback&amp;rsquo;s excellent &lt;a href=&#34;https://rudy.ca/doomsday.html&#34;&gt;illustrative explanation&lt;/a&gt; of John Conway&amp;rsquo;s &lt;a href=&#34;https://en.wikipedia.org/wiki/Doomsday_rule&#34;&gt;Doomsday rule&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>A Tiny Discount Calculation</title>
      <link>https://aadi.ink/posts/2024/12/tiny-discount-calculation/</link>
      <pubDate>Mon, 23 Dec 2024 20:35:58 +0530</pubDate>
      <guid>https://aadi.ink/posts/2024/12/tiny-discount-calculation/</guid>
      <description>&lt;p&gt;Suppose there are tiered discount rates: say &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;10&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;10\%&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; up to &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;5000&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;15&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;15\%&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; above &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;5000.&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;5000.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;Now suppose I need things that cost &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; before any discount is applied.&#xA;Assuming &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b &amp;lt; 5000&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, I get the 10% discount, having to pay &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;90&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;90\% \times b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;Could I perhaps add some more items to be eligible for the 15% discount and &lt;em&gt;still&lt;/em&gt; end up paying less than &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;90&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;90\% \times b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;?&lt;/p&gt;&#xA;&lt;p&gt;If I add an item worth &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; &lt;em&gt;such that&lt;/em&gt; &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b+x = 5000&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; then the discounted amount will be &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;85&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;4250&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;85\%\times 5000 = 4250&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;I will save money if this is less than the original &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;90&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;90\%\times b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;&lt;/p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;block&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;4250&lt;/mn&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mn&gt;90&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;⟺&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;4250&lt;/mn&gt;&lt;mn&gt;0.9&lt;/mn&gt;&lt;/mfrac&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;4722.&lt;/mn&gt;&lt;mover accent=&#34;true&#34;&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo&gt;ˉ&lt;/mo&gt;&lt;/mover&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt; 4250 &amp;lt; 90\%\times b \iff b &amp;gt; \frac{4250}{0.9} = 4722.\bar{2}\ .&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;p&gt;&#xA;This inequality means that for initial (undiscounted) amounts of &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;4722.22&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;4722.22&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; or higher, adding &lt;em&gt;exactly&lt;/em&gt; enough to reach 5000 will give me &lt;em&gt;more stuff&lt;/em&gt; while &lt;em&gt;costing less&lt;/em&gt; than the original.&lt;/p&gt;&#xA;&lt;p&gt;Great! But there&amp;rsquo;s a slight issue.&#xA;Products aren&amp;rsquo;t that flexible in price, so we may not be able to add something (or things) that cost exactly&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x=5000-b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;If I go too much over 5000, then I might cancel out the additional discount by increasing the total.&#xA;Let&amp;rsquo;s modify the previous calculation by putting that value in instead of 4250.&#xA;Assume &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b+x &amp;gt; 5000&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;&lt;/p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;block&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;85&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mn&gt;90&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;⟺&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;85&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;%&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;⟺&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mfrac&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;17&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt; 85\% \times (b+x) &amp;lt; 90\% \times b \iff 85\%\times x &amp;lt; 5\% \times b \iff x &amp;lt; \frac b{17}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;p&gt;&#xA;An upper bound for &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;. But our assumption puts in a lower bound for &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; too:&#xA;&lt;/p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;block&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mfrac&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;17&lt;/mn&gt;&lt;/mfrac&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt; 5000 - b &amp;lt; x &amp;lt; \frac{b}{17}.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;p&gt;&#xA;This makes sense: &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; needs to be large enough to get to &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;5000&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;5000&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, but not so much it cancels out the excess discount.&lt;/p&gt;&#xA;&lt;p&gt;Great! But there&amp;rsquo;s a slight issue.&#xA;Not all discounts are exactly 10% below 5000 and 15% above.&#xA;How do I decide next time when there&amp;rsquo;s something else I want and the store is throwing a similar puzzle at me?&#xA;Let&amp;rsquo;s generalise more!&#xA;Let &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;r_1 &amp;lt; r_2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; be the discount rates, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;t&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; be the threshold between them.&#xA;Repeating the previous calculations:&lt;/p&gt;&#xA;&lt;p&gt;We assume &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;≤&lt;/mo&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b \le t&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b+x &amp;gt; t&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;The &lt;em&gt;saving money condition&lt;/em&gt; is &lt;/p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;block&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;⟺&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;(1-r_1)b &amp;gt; (1-r_2)(b+x) \iff (r_2-r_1) b &amp;gt; (1-r_2)x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;p&gt;&#xA;&lt;/p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;block&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;⟺&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt; \iff x &amp;lt; b\times\frac{r_2-r_1}{1-r_2}.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;p&gt;&#xA;Perhaps the earlier form was better &lt;/p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;block&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;(r_2-r_1)b &amp;gt; (1-r_2)x.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;(r_2-r_1)b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is the extra savings on the original amount by getting the higher discount rate.&#xA;That should be more than the amount we end up paying for the extra discount which is &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;(1-r_2)x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;!&#xA;I find it beautiful that all we did was start with a condition we want and then manipulate&#xA;it to get a different but equivalent condition.&#xA;This new condition somehow says more than the original.&#xA;Seems so obvious now but somehow it wasn&amp;rsquo;t so obvious in the beginning &amp;ndash; at least to me.&lt;/p&gt;&#xA;&lt;p&gt;Just for completeness, the full condition becomes&#xA;&lt;/p&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;block&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;⟺&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt; t-b &amp;lt; x &amp;lt; b \times \frac{r_2-r_1}{1-r_2}\iff t &amp;lt; x + b &amp;lt; b\times\frac{1-r_1}{1-r_2}.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;h3 id=&#34;flipping-sides&#34;&gt;Flipping sides&lt;/h3&gt;&#xA;&lt;p&gt;What if I am a corporate salesperson and I don&amp;rsquo;t want the discounts&#xA;to be such that people get more stuff and still for literally less money.&#xA;Can I still have a tiered discount rate but make this impossible?&lt;/p&gt;&#xA;&lt;p&gt;Putting this in terms of our earlier notation, we want &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;≤&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;(r_2-r_1) b \le (1-r_2)x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; for all &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and all &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; &lt;em&gt;such that&lt;/em&gt; &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x+b&amp;gt; t&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;But we have variables on both sides of this inequality (&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; on the left, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; on the right)&#xA;and hence no matter what &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;r_1, r_2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; are, we can make &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; really small, and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; really large to be able to&#xA;satisfy this inequality.&#xA;This is assuming &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1-r_2 &amp;gt; 0, r_2 &amp;gt; r_1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;If we make &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;r_2 &amp;lt; r_1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; then the left side is always negative so this inequality always fails.&#xA;By the way, that&amp;rsquo;s one way to do what we want: reduce the discount offered for higher amounts spent.&#xA;But that&amp;rsquo;s ridiculous, right? As a salesperson we want to encourage more expenditure.&#xA;The next assumption to break is &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;r_2 &amp;gt; 1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; but that&amp;rsquo;s a discount rate of more than 100%. Paying customers for buying stuff will surely not help the profit margin.&lt;/p&gt;&#xA;&lt;p&gt;What else could I do?&#xA;Remember the last condition that was there &lt;em&gt;just for completeness&lt;/em&gt;?&#xA;Well, if that inequality exists, but no product (or combination of products) can actually cost enough to add up to a value between those two bounds (&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;t-b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b\times \frac{r_2-r_1}{1-r_2}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;) then we can still&#xA;advertise a sensible tiered discount but ensure that &lt;em&gt;every&lt;/em&gt; upsell actually makes the company more money&#xA;instead of less.&#xA;The most straightforward way to go about this would be to restrict the discount &lt;em&gt;such that&lt;/em&gt; it applies only to products above a certain price point, or only for certain combinations.&lt;/p&gt;&#xA;&lt;p&gt;Let me try to make an example.&#xA;Keeping numbers simple: &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0.25&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;r_1 = 0, r_2 = 0.25&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;This reduces the condition to &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mfrac&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;/mfrac&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\ t-b &amp;lt; x &amp;lt; \frac{b}{3}.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;Suppose all products cost 499 (or multiples of 499 like 999, 1499, etc.) but the threshold is &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1000.&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;t=1000.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; can only be &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;499&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;998&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;0, 499, 998&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; or &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;999&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;999&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; before crossing the threshold.&#xA;So &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;/&lt;/mi&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b/3&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; can be &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mn&gt;166&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mn&gt;333&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;0, ~166, ~333&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;None of these are above the minimum &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;499&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;499&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, so &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;/&lt;/mi&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&amp;lt; b/3 &lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is impossible!&#xA;The only way to cross the threshold is to buy three things worth &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;499&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;499&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; each, but then the 25% discount cuts  down the price by 1/4, not 1/3.&#xA;That verifies the example!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Lessons from applying for PhD positions</title>
      <link>https://aadi.ink/posts/2024/11/lessons-from-applying-phd-positions/</link>
      <pubDate>Sun, 24 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://aadi.ink/posts/2024/11/lessons-from-applying-phd-positions/</guid>
      <description>&lt;!--&#xA;&lt;figure&gt;&#xA;&#x9;&lt;img src=&#39;&#39; alt=&#34;&#34; class=&#34;figure dynamic-bg&#34; &#xA;&#x9;width=&#34;80%&#34; &#xA;&#x9;alt=&#34;&#34; &#xA;&#x9;title=&#34;&#34; &#xA;&#x9;class=&#34;dynamic-background figure&#34;&gt; &#xA;&#x9;&lt;div class=&#34;caption-figure&#34;&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;--&gt;&#xA;&lt;p&gt;I applied to a number of universities in the US and a couple in Europe, apart from emailing professors that I was interested in working with.&#xA;Here are some lessons I learned that I would pass on as advice to my past self:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;practise-writing-down-thoughts-ideas-and-reasoning&#34;&gt;&lt;strong&gt;Practise writing down thoughts, ideas, and reasoning&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Most, if not all, applications need you to express yourself through words &amp;ndash; big things like the &lt;em&gt;statement of purpose&lt;/em&gt; or a &lt;em&gt;diversity statement&lt;/em&gt; to small things like cold emails and scheduling interviews.&#xA;This makes it extremely important to have a good grasp of words so that you are able to put down what you think instead of trying to fit thoughts into the words you already have.&#xA;I wish I had more practice so that the first couple of applications did not become the effective warm-up for the rest.&#xA;It felt like I didn&amp;rsquo;t do justice to the initial ones, and I could feel the steep improvement I was making as I wrote more and more applications.&#xA;So get used to writing down what you think, what you feel, and why.&#xA;You need not have the perfect language, vocabulary, or grammar (there are people and software to help with that);&#xA;you just need to get used to making points and stringing them together across paragraphs so that your ideas, passion, motivation, and personality survive the long journey from your mind till the  reader&amp;rsquo;s.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;don&#34;&gt;&lt;strong&gt;Don&amp;rsquo;t be intimidated&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;PhD applications require a lot of interaction with strangers.&#xA;Don&amp;rsquo;t be afraid to be yourself while doing so &amp;ndash; people are not so judgy, they just want a good student at the end of the day and they are usually not turned off by too many questions or clarifications.&#xA;Make sure you are respectful, polite, and keep to deadlines and show up on time.&#xA;Other than that, don&amp;rsquo;t be afraid to ask silly questions, don&amp;rsquo;t be afraid to ask whether you qualify even if you think you probably don&amp;rsquo;t, don&amp;rsquo;t be afraid to admit that you don&amp;rsquo;t know or haven&amp;rsquo;t thought about something.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;introspect&#34;&gt;&lt;strong&gt;Introspect&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The application process showed me what a PhD is going to be like.&#xA;Before that, I was not sure that was the right choice.&#xA;So I encourage you to take the time to think about what &lt;em&gt;you&lt;/em&gt; want, and how what you are doing will help you towards that goal.&#xA;If at any point during the process you think that what you are applying for or where you are applying to is not what you want, then wait and think.&#xA;Is this your choice or someone else&amp;rsquo;s?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;keep-track-of-your-and-your-recommender&#34;&gt;&lt;strong&gt;Keep track of your and your recommender&amp;rsquo;s deadlines&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is obvious, but still worth talking about.&#xA;There are lots of deadlines, and if you are like me, they get overwhelming unless I make a system.&#xA;For me that system was a spreadsheet.&#xA;So schedule reminders for yourself, and don&amp;rsquo;t be afraid to remind those who have agreed to write recommendations for you.&#xA;Of course, there&amp;rsquo;s no need to nag them about it, but they have lots of commitments and it&amp;rsquo;s easy to forget so choose times appropriately and try to make their job as easy as possible (make a list of pending recommendations ordered by the deadlines, provide links, etc.)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;talk-to-people&#34;&gt;&lt;strong&gt;Talk to people&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is similar to the point about not being intimidated.&#xA;Asking actual students, professors, alumni, and anybody with information to share their advice, opinions, and experiences about whatever you feel doubtful or uninformed about is extremely valuable in knowing what to value, potential pitfalls, and department- or university- (or even professor-) specific details that will never be available outside of one-on-one conversations.&#xA;Most people I got in touch with were ready to spend an hour or so to answer my questions, and never hesitated to share their thoughts.&#xA;I assume the same will be true with most people, and having a bunch of unrelated people each give their opinion made blurry notions or hazy pictures so clear to me.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;find-other-people-who-are-also-applying-for-positions&#34;&gt;&lt;strong&gt;Find other people who are also applying for positions&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is just a morale booster when sometimes the mood is low because of a certain application (maybe the website is too finicky, or the questions are complicated to answer, or the instructions are not clear).&#xA;More importantly, they also serve as a safety net &amp;ndash; people you can cross-reference deadlines with, share clarifications so that you don&amp;rsquo;t have to write the same email and wait a day or more for a response.&#xA;The application process is quite demanding because they force you to think about yourself, and that made me question myself all the time.&#xA;Seeing other people going through the same helped.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;the-people-matter-most&#34;&gt;&lt;strong&gt;The people matter most&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is just my opinion (just like the rest of the points) that your PhD depends a lot on your guide.&#xA;So ensure that the people you are going to be working with and around are good, caring, and well-intentioned.&#xA;Otherwise, one can end up in a position where the student is struggling on their own without anybody to show them the way.&#xA;This is more important for applying to European PhDs, since they usually require you to contact professors for particular project positions.&#xA;That said, it&amp;rsquo;s useful to find someone whose work you like and get in touch with them anyway &amp;ndash; university application or direct.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;be-patient&#34;&gt;&lt;strong&gt;Be patient&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;You will be spending a lot of time (and money) with very little to show for it.&#xA;All of that builds up to the last round of applications until we either give up or accept an offer.&#xA;The journey teaches us about ourselves, the way we work, and forces us to think about our dreams, our ideals, our future.&#xA;I don&amp;rsquo;t think I would have spent so much time doing that if I wasn&amp;rsquo;t forced to, and in hindsight, I appreciate the opportunity.&#xA;So I hope with patience you too will find something rewarding from the process even if it doesn&amp;rsquo;t stick to your expectations.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;keep-emails-concise-and-to-the-point&#34;&gt;&lt;strong&gt;Keep emails concise and to the point&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Professors receive tons of emails, so the fewer words you use, the easier it will be for them to understand what the email is about and whether they should spend time to read and reply.&#xA;Keep the pleasantries short, there&amp;rsquo;s no need to say &amp;ldquo;Hope you are well&amp;rdquo; or the like.&#xA;If you are not sure whether your email sounds okay or not, ask someone around to read it.&#xA;Ask direct questions, don&amp;rsquo;t use too many words, and be as clear as possible.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;it&#34;&gt;&lt;strong&gt;It&amp;rsquo;s never too late&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Positions keep opening up, and professors are always on the lookout for good students.&#xA;Even if a particular professor has no positions to offer, if they find a good student, they make note of it.&#xA;So keep trying, keep reaching out, show them your motivation, your passion, your love for the subject, and they will not only see it, but try to help you out.&#xA;I have seen this happen more than once.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;start-early&#34;&gt;&lt;strong&gt;Start early&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;There is nothing to lose, but a lot of risks to mitigate by starting and hence finishing early.&#xA;To name a few:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go through the whole application at least one or two months before the deadline. There&amp;rsquo;s no reason to leave surprises till the end.&lt;/li&gt;&#xA;&lt;li&gt;A sudden requirement for a document you don&amp;rsquo;t have on hand&lt;/li&gt;&#xA;&lt;li&gt;An optional question you choose to now answer&lt;/li&gt;&#xA;&lt;li&gt;A new position comes up, with a deadline on or sooner as this one&lt;/li&gt;&#xA;&lt;li&gt;Straightforward mistakes in reading or noting down dates&lt;/li&gt;&#xA;&lt;li&gt;Technical issues&lt;/li&gt;&#xA;&lt;li&gt;A bad day/week&lt;/li&gt;&#xA;&lt;li&gt;Extra lectures, homework, or other emergencies&lt;/li&gt;&#xA;&lt;li&gt;Recommenders may need longer. It&amp;rsquo;s important to give them enough time, so that they don&amp;rsquo;t have to rush.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Hope this helps! Good luck!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Spectral Methods for Hyperbolic Problems</title>
      <link>https://aadi.ink/posts/2023/11/spectral4hyp/</link>
      <pubDate>Tue, 28 Nov 2023 15:03:26 +0530</pubDate>
      <guid>https://aadi.ink/posts/2023/11/spectral4hyp/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;h3 id=&#34;what-are-spectral-and-pseudospectral-methods&#34;&gt;What are Spectral and Pseudospectral Methods?&lt;/h3&gt;&#xA;&lt;p&gt;Instead of discretising the domain, we express functions in terms of a truncated expansion over a particular basis.&#xA;The choice of basis leads to advantages.&#xA;For example, the Fourier basis, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;ϕ&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;exp&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\phi_n(x) = \exp(in\xi)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; are eigenvectors of the differential operator.&#xA;Other commonly chosen bases are Chebyshev polynmials and Legendre polynomials.&lt;/p&gt;&#xA;&lt;p&gt;Domain discretisation approximates a function up to first, or at most polynomial.&#xA;In comparison, the spectral approximation of analytic functions as well as their derivatives converge exponentially.&lt;/p&gt;&#xA;&lt;p&gt;Since multiplication in the spectral space is more expensive than the transform itself, &lt;em&gt;pseudospectral methods&lt;/em&gt; perform multiplication in the original space.&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-are-hyperbolic-problems&#34;&gt;What are Hyperbolic Problems?&lt;/h3&gt;&#xA;&lt;p&gt;Euler equations, shallow water equations, wave equations are some examples of hyperbolic systems of partial differential equations.&#xA;Unlike parabolic/elliptic PDEs, which have inherent regularity, hyperbolic problems exhibit a finite speed of propogation and wave-like solutions.&#xA;These solutions tend to develop discontinuities even when the initial condition is smooth.&#xA;In the context of hyperbolic problems, discontinuities are often called &lt;em&gt;shocks&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This report focuses on two simple, one-dimensional, hyperbolic problems to test the methods on:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;&lt;/th&gt;&#xA;          &lt;th&gt;Linear Advection Equation&lt;/th&gt;&#xA;          &lt;th&gt;Inviscid Burgers&amp;rsquo; Equation&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;PDE&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∂&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/msub&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;msub&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\partial_t u + 2\pi u_x = 0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∂&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/msub&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;msub&gt;&lt;mrow&gt;&lt;mo fence=&#34;true&#34;&gt;(&lt;/mo&gt;&lt;mfrac&gt;&lt;msup&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;mo fence=&#34;true&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\partial_t u + \left(\frac{u^2}2\right)_x = 0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Linear&lt;/td&gt;&#xA;          &lt;td&gt;Quasilinear&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Regularity&lt;/td&gt;&#xA;          &lt;td&gt;Preserves regularity&lt;/td&gt;&#xA;          &lt;td&gt;Loses regularity&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Both are defined on the domain &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;[0,2\pi]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and assumed to have periodic boundary conditions.&lt;/p&gt;&#xA;&lt;p&gt;The solution to the linear advection equation is a simple translation of the&#xA;initial condition in the positive &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; direction.&#xA;Thus the solution at &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;t=1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; matches perfectly with the initial condition.&lt;/p&gt;&#xA;&lt;p&gt;Burgers&amp;rsquo; equation, on the other hand, has a complicated solution.&#xA;One can think of particles at &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; travelling with the speed of &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u(x)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;toward the positive &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; direction.&lt;/p&gt;&#xA;&lt;h3 id=&#34;implementation&#34;&gt;Implementation&lt;/h3&gt;&#xA;&lt;p&gt;The code implementing the techniques and generating the plots is available&#xA;at &lt;a href=&#34;https://github.com/aadi-bh/spectral4hyp&#34;&gt;&lt;code&gt;github.com/aadi-bh/spectral4hyp&lt;/code&gt;&lt;/a&gt;.&#xA;It uses the Fourier pseudospectral method with RK4 time stepping and dealiasing to solve both these PDES.&lt;/p&gt;&#xA;&lt;p&gt;Exact solutions are computed using a Lax-Friedrichs scheme on a fine mesh.&lt;/p&gt;&#xA;&lt;h3 id=&#34;a-note-about-plots&#34;&gt;A Note About Plots&lt;/h3&gt;&#xA;&lt;p&gt;Unless specified, every plot shows the initial condition, computed/processed solution, and exact solution on the left,&#xA;with the pointwise error on the right.&lt;/p&gt;&#xA;&lt;h3 id=&#34;aliasing-errors&#34;&gt;Aliasing Errors&lt;/h3&gt;&#xA;&lt;p&gt;When sampling a function at only finitely many points, our coefficients are bound to&#xA;suffer from aliasing errors.&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Aliasing&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/aliasing.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/aliasing.svg&#34; alt=&#34;Both these modes agree at the sample points, so there is no way to distinguish between them.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Both these modes agree at the sample points, so there is no way to distinguish between them.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;Thus the higher coefficients get added to the lower ones:&#xA;\[&#xA;\tilde c_n \tilde u_n = \hat u_n + \sum_{m=-\infty;\ m\neq 0}^{m=\infty} \hat u_{n+2Nm}(x)&#xA;\]&#xA;where &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mover accent=&#34;true&#34;&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;^&lt;/mo&gt;&lt;/mover&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\hat u_n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; are the continuous Fourier coefficients while &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mover accent=&#34;true&#34;&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\tilde u_n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; are the discrete ones.&lt;/p&gt;&#xA;&lt;p&gt;These aliasing errors and their nonlinear mixing contributes to error.&lt;/p&gt;&#xA;&lt;h3 id=&#34;gibbs-phenomenon&#34;&gt;Gibbs Phenomenon&lt;/h3&gt;&#xA;&lt;p&gt;Suppose &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u_N&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is the truncated Fourier expansion of &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;. Then&#xA;\[&#xA;||u - u_N ||_{L^2[0, 2\pi]} =&#xA;2\pi\sum_{{|n|&amp;gt; N}} |\hat u_n|^2 .&#xA;\]&#xA;Thus it&amp;rsquo;s clear that the rate of convergence in &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;L&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;L^2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is dependent on the decay of the Fourier coefficients.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;       &#xA;&lt;p title=&#34;Theorem&#34; class=&#34;theorem&#34;&gt;&lt;/p&gt;&#xA; If &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u\in C^{q-1}[0, 2\pi]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;L&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u^{(q)}\in L^2[0, 2\pi]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; with the first &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;q-1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; derivatives periodic, then \[&#xA;||u - u_N ||_{L^2[0, 2\pi]} \le C(q)N^{-q}| u^{(q)}|_{L^2[0, 2\pi]}&#xA;\sim C\frac{q!}{N^q}||u||_{L^2[0,2\pi]}&#xA;\sim Ce^{-cN}||u||_{L^2[0,2\pi]}.&#xA;\]&#xA;Thus the Fourier expansion converges exponentially fast to smooth functions.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;If &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is only piecewise smooth, then&#xA;\[&#xA;u_N\left(x_0 + \frac{2z}{2N+1}\right) \sim \frac12[u(x_0^+) + u(x_0^-)]) + \frac{1}{\pi}[u(x_0^+) - u(x_0^-)]\textrm{Si}(z)&#xA;\]&#xA;tells us that there is only &lt;strong&gt;linear pointwise convergence at points away from&#xA;the discontinuity&lt;/strong&gt;.&lt;br&gt;&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;Si&lt;/mtext&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mfrac&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\textrm{Si}(z)\to \frac\pi 2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; as &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∞&lt;/mi&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;⟹&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;z\to\infty\implies&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;a complete &lt;strong&gt;loss of convergence as &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant=&#34;bold-italic&#34;&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\bm x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;  approaches the discontinuity.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Smooth case&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-0-bump-no_filter-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-0-bump-no_filter-gFalse.svg&#34; alt=&#34;The convergence is exponential!&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        The convergence is exponential!&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Continuous case&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-0-triangle-no_filter-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-0-triangle-no_filter-gFalse.svg&#34; alt=&#34;Polynomial convergence.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Polynomial convergence.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;p&gt;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Discontinuous case&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-0-saw_tooth-no_filter-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-0-saw_tooth-no_filter-gFalse.svg&#34; alt=&#34;No/extremely slow convergence near the discontinuity.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        No/extremely slow convergence near the discontinuity.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;This global breakdown of convergence is known as the Gibbs phenomenon.&lt;/p&gt;&#xA;&lt;h3 id=&#34;implications-of-the-gibbs-phenomenon&#34;&gt;Implications of the Gibbs Phenomenon&lt;/h3&gt;&#xA;&lt;p&gt;The lack of regularity/dissipation in hyperbolic problems makes tbe formation of discontinuities inevitable.&#xA;Such discontinuities are not captured well by spectral/pseudospectral methods.&#xA;This is a source of concern, and hence these methods have traditionally not been applied to such problems.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;ldquo;With the situation being even more complex and the details partially&#xA;unresolved for the discrete expansions, the Gibbs phenomenon and the loss&#xA;of fast global convergence is often perceived as an argument against&#xA;the use of spectral expansions for the representation of piecewise smooth&#xA;functions and, ultimately, &lt;strong&gt;against the use of spectral methods for the&#xA;solution of problems with discontinuous solutions.&lt;/strong&gt;&amp;rdquo;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;filters&#34;&gt;Filters&lt;/h2&gt;&#xA;&lt;p&gt;Oscillations are an indication of high-order modes.&#xA;The Gibbs oscillations can be seen to be the cause of&#xA;the slow decay of the Fourier coefficients, leading to slow convergence.&#xA;Filters essentially force better convergence by reducing the amplitude&#xA;of high-order modes.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;       &#xA;&lt;p title=&#34;Definition&#34; class=&#34;theorem&#34;&gt;&lt;/p&gt;&#xA; A filter of order &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;q&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is a real and even function &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;η&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∞&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∞&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\sigma(\eta)\in C^{q-1}[-\infty, \infty]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; with the following properties:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;η&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\sigma(\eta) = 0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; for &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∣&lt;/mi&gt;&lt;mi&gt;η&lt;/mi&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∣&lt;/mi&gt;&lt;mo&gt;≥&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;|\eta| \ge 1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\sigma(0) = 1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;m&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;m&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mspace width=&#34;1em&#34;/&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∀&lt;/mi&gt;&lt;mi&gt;m&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\sigma^{(m)}(0) = \sigma^{(m)}(1) = 0 \quad\forall m\in [1, \ldots, q-1]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;To apply the filter, we simply process the Fourier coefficients as follows: \[&#xA;\mathcal P_N u_N(x) = u_N^\sigma(x) = \sum_{n=0}^N \sigma\left(\frac nN\right)\ \hat u_n\ \phi_n(x),&#xA;\]&#xA;where &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;ϕ&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\phi_n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; are the Fourier basis functions, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mover accent=&#34;true&#34;&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;^&lt;/mo&gt;&lt;/mover&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\hat u_n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; are the Fourier coefficients, and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\sigma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is the chosen filter.&lt;/p&gt;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Some common filters&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/filters.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/filters.svg&#34; alt=&#34;Image showing plots of four filters: Cesàro, Lanczos, Raised cosine, and the second order exponential. (Click or tap to enlarge the image.)&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Every filter is a continuous and smooth function, which is necessary to obtain convergence, as we shall see.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;h3 id=&#34;filtration-results&#34;&gt;Filtration Results&lt;/h3&gt;&#xA;&lt;p&gt;Suppose that &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u(x)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is piece-wise &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;C^{2p}[0, 2\pi]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; with a single discontinuity at &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x~=~\xi.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;br&gt;&#xA;If &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;script&#34;&gt;P&lt;/mi&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/msub&gt;&lt;msub&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\mathcal P_N  u_N(x)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is the filtered approximation of the true solution &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u(x)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; then&#xA;we have&#xA;\[&#xA;|u(x) - \mathcal P_Nu_N(x)| \le C\frac{1}{N^{p-1}d(x, \xi)^{p-1}}K(u) + C\frac{\sqrt{N}}{N^{2p}}||u^{(p)}||_{L^2}&#xA;\]&#xA;where &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;d(x,\xi)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; measures the distance of &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; from &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\xi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;Thus, we can recover &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;(p-1)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;-order convergence if&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is away from the discontinuity &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\xi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The piecewise continuous function &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is regular enough.&lt;/li&gt;&#xA;&lt;li&gt;Order (regularity) of the filter &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\sigma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is sufficiently large.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is piecewise analytic then we can increase &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;p&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; with &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;N&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;p&gt;We first plot solutions of the linear advection equation at &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;t=1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, with the initial condition having a discontinuity at &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x=\pi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/p&gt;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;No filter: $\sigma \equiv 1$&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-no_filter-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-no_filter-gFalse.svg&#34; alt=&#34;Solutions without any processing.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Solutions without any processing.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;p&gt;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Step Cut-off: $\sigma(\eta) = \mathbb 1_{[-0.5, 0.5]}$.&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-cutoff-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-cutoff-gFalse.svg&#34; alt=&#34;The oscillations are still very much present, and the convergence is not enhanced.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        The oscillations are still very much present, and the convergence is not enhanced.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;Thus the regularity of &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\sigma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; plays an important role in the working of the filter.&lt;/p&gt;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Cesáro filter: $\sigma(\eta) = 1 - \eta$&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-cesaro-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-cesaro-gFalse.svg&#34; alt=&#34;Eliminates the overshoot and smears out the shock. Being only first order, gains in accuracy over no filtering. We do get uniform convergence but the smearing is so bad that information is lost.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Eliminates the overshoot and smears out the shock. Being only first order, gains in accuracy over no filtering. We do get uniform convergence but the smearing is so bad that information is lost.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Raised Cosine Filter: $\sigma(\eta) = \frac12\left(1&amp;#43;\cos(\pi \eta)\right)$&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-raisedcos-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-raisedcos-gFalse.svg&#34; alt=&#34;This is second order.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        This is second order.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Lanczos filter: $\sigma(\eta) = \frac{\sin(\pi \eta)}{\pi \eta}$&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-lanczos-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-lanczos-gFalse.svg&#34; alt=&#34;Also second order. Lanczos eliminates the oscillations away from the discontinuity, but not the overshoot at the discontinuity.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Also second order. Lanczos eliminates the oscillations away from the discontinuity, but not the overshoot at the discontinuity.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Exponential filter: $\sigma(\eta) = \exp(-\alpha \eta^{2p})$&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-exponential2-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-exponential2-gFalse.svg&#34; alt=&#34;This plot shows the filter with order $2p=4$.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        This plot shows the filter with order $2p=4$.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;p&gt;We now apply a filter to Burgers&amp;rsquo; equation and plot the solution along with the exact at &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1.3&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;t=1.3&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/p&gt;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Burgers&amp;#39; equation, no filter&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-gFalse.svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Burgers&amp;#39; equation, exponential filter ($2p=4$)&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-exponential-gFalse.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-exponential-gFalse.svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;h2 id=&#34;post-processing&#34;&gt;Post Processing&lt;/h2&gt;&#xA;&lt;p&gt;The reader should take note that the techniques discussed are only &lt;em&gt;post processing&lt;/em&gt; the solution that is computed with purely spectral or pseudospectral methods.&#xA;This makes sense because altering how one solves for the solution is not as straightforward as merely altering the interpretation of the solution.&lt;br&gt;&#xA;&lt;label for=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle sidenote-number&#34;&#xA;&#x9;&gt;&lt;input type=&#34;checkbox&#34; id=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle&#34; /&gt;&lt;span&#xA;&#x9;&#x9;class=&#34;sidenote&#34;&gt;That said, the action of filters is similar to that of artificial viscosity. Hence they can stabilise numerical methods like viscosity can, but without introducing stiffness.&lt;/span&#xA;&#x9;&gt;&lt;/label&#xA;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;With the right choice of a filter for the problem at hand, we are able to&#xA;remove the effects of the Gibbs phenomenon at points away from the discontinuity.&#xA;The accuracy of filtered approximations decreases as we approach the point of&#xA;discontinuity, as is apparent in the plots above.&#xA;Unsurprisingly, the bound on the pointwise error blows up as &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x\to\xi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;ldquo;We assume that we know the first &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;2N+1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; expansion coefficients of a piecewise analytic function and that the function is known to have a discontinuity at &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x=\xi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;. The aim is to recover the value of &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;u&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; at any point in the interval &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;[0,2\pi]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&amp;rdquo;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;gibbs-complimentary-basis&#34;&gt;Gibbs Complimentary Basis&lt;/h2&gt;&#xA;&lt;p&gt;Filtering essentially treats Gibbs oscillations as noise,&#xA;reducing them in a nice manner.&#xA;It turns out that rather than destroying the information present within the Fourier coefficients, if it is &lt;em&gt;redistributed&lt;/em&gt;,&#xA;one actually recovers an exponentially convergent series to a piecewise analytic function.&#xA;The convergence holds even at points &lt;em&gt;arbitrarily close&lt;/em&gt; to the discontinuity.&lt;/p&gt;&#xA;&lt;p&gt;The trick is finding a new basis with certain properties.&#xA;Then the truncated global expansion is re-expanded in this new basis.&#xA;The catch is that this method relies on knowing the location of the discontinuity.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;       &#xA;&lt;p title=&#34;Definition&#34; class=&#34;theorem&#34;&gt;&lt;/p&gt;&#xA; The family &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;{&lt;/mo&gt;&lt;msubsup&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Φ&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/msubsup&gt;&lt;mo stretchy=&#34;false&#34;&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\{\Phi_k^\lambda\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is &lt;strong&gt;Gibbs complimentary&lt;/strong&gt; to the family &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;{&lt;/mo&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Ψ&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\{\Psi_k(x)\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; if the following three conditions hold:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Orthonormality&lt;/strong&gt;: \[&#xA;\left\langle\Phi_k^\lambda, \Phi_l^\lambda\right\rangle_\lambda = \delta_{kl}\quad\forall k,l.&#xA;\]&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Spectral convergence&lt;/strong&gt;: The expansion of a function &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;g&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;g(\xi)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; which is analytic in &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;[-1, 1]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, in the basis &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Φ&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\Phi_k&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; converges exponentially fast with &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;: \[&#xA;\max_{\xi\in[-1, 1]}\left|g(\xi) - \sum_{k=0}^\lambda\langle g, \Phi_k^\lambda\rangle_\lambda \Phi_k^\lambda(\xi)\right| \le \exp(-q_1\lambda),\quad q_1 &amp;gt; 0.&#xA;\]&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;The Gibbs condition&lt;/strong&gt;: There exists a number &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;β&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\beta &amp;lt; 1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; such that if&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mi&gt;β&lt;/mi&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\lambda~=~\beta N&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; then &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∃&lt;/mi&gt;&lt;mi&gt;α&lt;/mi&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\exists\alpha &amp;lt; 1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;&lt;a href=&#34;https://aadi.ink/suchthat&#34;&gt;suchthat&lt;/a&gt; for &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi&gt;l&lt;/mi&gt;&lt;mo&gt;≤&lt;/mo&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;k&amp;gt;N, l\le\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;:&#xA;\[&#xA;\left|\left\langle&#xA;\Phi_l^\lambda(\xi), \Psi_k(x_\xi)&#xA;\right\rangle_\lambda\right|\&#xA;\max_{\xi\in[-1, 1]} |\Phi_l^\lambda(\xi)| \le \left(\frac{\alpha N}{k}\right)^\lambda.&#xA;\]&#xA;This means that high modes (large &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;k&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;) of the Fourier basis &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Ψ&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\Psi_k&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;on the lower modes (small &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;l&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;l&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;) in the basis &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msubsup&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Φ&lt;/mi&gt;&lt;mi&gt;l&lt;/mi&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/msubsup&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\Phi_l^\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is&#xA;exponentially small in the interval &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;≤&lt;/mo&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;mo&gt;≤&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;-1\le \xi \le 1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; for &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&#xA;proportional to &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;N&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;resolving-the-gibbs-phenomenon&#34;&gt;Resolving the Gibbs Phenomenon&lt;/h2&gt;&#xA;&lt;p&gt;Let \[\xi(x) = -1 + 2\left(\frac{x-a}{b-a}\right)\]&#xA;be a map from &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x\in[a,b]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; to &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\xi\in[-1,1]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;       &#xA;&lt;p title=&#34;Theorem&#34; class=&#34;theorem&#34;&gt;&lt;/p&gt;&#xA; Let &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;L&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;f(x)\in L^2[-1,1]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; be analytic in&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;mo&gt;⊂&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;[&lt;/mo&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy=&#34;false&#34;&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;[a,b] \subset [-1,1]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;Suppose that&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∣&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Ψ&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∣&lt;/mi&gt;&lt;mo&gt;≤&lt;/mo&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;mspace width=&#34;1em&#34;/&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∀&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;|(f, \Psi_k)| \le C\quad\forall k&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and&lt;/li&gt;&#xA;&lt;li&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mrow&gt;&lt;mi&gt;lim&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∞&lt;/mi&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∣&lt;/mi&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;∣&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0.&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\lim_{N\to\infty} |f(x) - f_N(x)| = 0.&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Let &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;{&lt;/mo&gt;&lt;msubsup&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Φ&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/msubsup&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;ξ&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\{\Phi_k^\lambda(\xi)\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; be a Gibbs complimentary basis to the family&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy=&#34;false&#34;&gt;{&lt;/mo&gt;&lt;msub&gt;&lt;mi mathvariant=&#34;normal&#34;&gt;Ψ&lt;/mi&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\{\Psi_k(x)\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, with &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;β&lt;/mi&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\lambda = \beta N&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;Furthermore, assume \[&#xA;\langle f - f_N, \Phi_l^\lambda\rangle_\lambda =&#xA;\sum_{k=N+1}^\infty (f, \Phi_l^\lambda)\&#xA;\langle\Phi_l^\lambda, \Psi_k\rangle_\lambda.&#xA;\]&#xA;Then&#xA;\[&#xA;\max_{x\in[a,b]}\left|&#xA;f(x) - \sum_{l=0}^\lambda\langle f_N, \Phi_l^\lambda\rangle\&#xA;\Phi_l^\lambda(\xi(x))&#xA;\right| \le \exp(-qN), \quad q &amp;gt; 0.&#xA;\]&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;The knowledge of the interval of analyticity of the true solution&#xA;is enough to construct an exponentially converging approximation to it,&#xA;from just the knowledge of the original Fourier coefficients.&lt;/p&gt;&#xA;&lt;h2 id=&#34;gegenbauer-polynomials&#34;&gt;Gegenbauer Polynomials&lt;/h2&gt;&#xA;&lt;p&gt;Implicit in the earlier statement is the assumption that there not only&#xA;exists a Gibbs complimentary basis for the Fourier basis, but also an explicit expression for it is available.&#xA;Thankfully, &lt;a href=&#34;https://en.wikipedia.org/wiki/Gegenbauer_polynomials&#34;&gt;Gegenbauer polynomials&lt;/a&gt; exist and they do the job.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Gegenbauer polynomials for $\lambda=3$&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/ggbs.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/ggbs.svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;For the Fourier basis, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;β&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;mn&gt;27&lt;/mn&gt;&lt;/mfrac&gt;&lt;mo&gt;≈&lt;/mo&gt;&lt;mn&gt;1.46&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\beta = \frac{2\pi (b-a)}{27}\approx 1.46&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;Turns out that Gegenbauer polynomials form &lt;em&gt;a&lt;/em&gt; Gibbs complimentary basis for Legendre polynomials as well.&lt;/p&gt;&#xA;&lt;h3 id=&#34;results&#34;&gt;Results&lt;/h3&gt;&#xA;&lt;p&gt;We present the results of the re-expansions with the linear advection&#xA;equation and the inviscid Burgers&amp;rsquo; equation.&lt;/p&gt;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Linear advection equation with $N=16, \lambda=3$.&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-no_filter-g3.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-no_filter-g3.svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Linear advection equation with $N=64, \lambda=6$.&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-no_filter-g6.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/linadv-1.0-saw_tooth-no_filter-g6.svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Burgers&amp;#39; equation with $N=32, \lambda=4$.&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-g[4].svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-g[4].svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Burgers&amp;#39; equation with $N=64, \lambda=6$.&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-g6.svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-g6.svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;        &lt;h4&gt;Burgers&amp;#39; equation with $N=64, \lambda=8$.&lt;/h4&gt;&#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-g[8].svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.3-sin-no_filter-g[8].svg&#34;  /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;p&gt;The question of whether high-order accuracy can be recovered in the case of&#xA;non-linear equations is still open.&#xA;The numerical results seem to confirm this fact.&lt;/p&gt;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.2-sin-no_filter-g[3,%206,%208].svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.2-sin-no_filter-g[3,%206,%208].svg&#34; alt=&#34;Burgers&amp;#39; equation at $t=1.3$ with $N=16, 64, 128$ and $\lambda=3, 6, 8$ respectively, no filter.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Burgers&amp;#39; equation at $t=1.3$ with $N=16, 64, 128$ and $\lambda=3, 6, 8$ respectively, no filter.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&lt;figure &gt;&#xA;  &#xA;  &#xA;      &lt;a href=https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.2-sin-exponential-g[3,%206,%208].svg class=&#34;imglink&#34;&gt;&#xA;    &lt;img src=&#34;https://aadi-bh.github.io/spectral4hyp/plots/burgers-1.2-sin-exponential-g[3,%206,%208].svg&#34; alt=&#34;Burgers&amp;#39; equation at $t=1.3$ with $N=16, 64, 128$ and $\lambda=3, 6, 8$ respectively, exponential filter.&#34; /&gt;&#xA;    &lt;/a&gt;&#xA;    &#xA;    &#xA;      &lt;figcaption&gt;&#xA;        &lt;p&gt;&#xA;        Burgers&amp;#39; equation at $t=1.3$ with $N=16, 64, 128$ and $\lambda=3, 6, 8$ respectively, exponential filter.&#xA;        &#xA;          &#xA;        &#xA;        &lt;/p&gt; &#xA;      &lt;/figcaption&gt;&#xA;  &#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&lt;h2 id=&#34;conclusions&#34;&gt;Conclusions&lt;/h2&gt;&#xA;&lt;p&gt;Spectral methods have numerous advantages over traditional methods for solving partial differential equations.&#xA;They are highly accurate and have superior phase properties.&#xA;The above results show us how spectral methods can be combined with&#xA;post processing to retain those properties, even when the traditional&#xA;estimates and results do not apply, such as in the case of hyperbolic problems.&lt;/p&gt;&#xA;&lt;h2 id=&#34;unanswered-questions&#34;&gt;Unanswered Questions&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In practice, how are shock locations computed?&lt;/li&gt;&#xA;&lt;li&gt;Conservation and RH condition.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;D. Gottlieb, J.S. Hesthaven,&#xA;&lt;a href=&#34;https://doi.org/10.1016/S0377-0427(00)00510-0&#34;&gt;Spectral methods for hyperbolic problems&lt;/a&gt;,&#xA;Journal of Computational and Applied Mathematics,&#xA;Volume 128, Issues 1–2,&#xA;2001,&#xA;Pages 83-131,&#xA;ISSN 0377-0427,&lt;br&gt;&#xA;&lt;a href=&#34;https://doi.org/10.1016/S0377-0427(00)00510-0&#34;&gt;https://doi.org/10.1016/S0377-0427(00)00510-0.&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Hesthaven, J., Gottlieb, S., &amp;amp; Gottlieb, D. (2007). &lt;a href=&#34;https://doi.org/10.1017/CBO9780511618352&#34;&gt;Spectral Methods for Time-Dependent Problems&lt;/a&gt; (Cambridge Monographs on Applied and Computational Mathematics). Cambridge: Cambridge University Press.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;</description>
    </item>
    <item>
      <title>Lean Into Lean</title>
      <link>https://aadi.ink/posts/2023/09/lean-into-lean/</link>
      <pubDate>Sat, 16 Sep 2023 19:58:45 +0530</pubDate>
      <guid>https://aadi.ink/posts/2023/09/lean-into-lean/</guid>
      <description>&lt;p&gt;I had been trying to get into &lt;a href=&#34;https://leanprover.github.io&#34;&gt;Lean&lt;/a&gt;.&#xA;It&amp;rsquo;s an interactive theorem prover, and I&amp;rsquo;ve been curious about it since I first heard about it during a talk by Kevin Buzzard himself.&lt;/p&gt;&#xA;&lt;p&gt;We were fortunate to have an in-person workshop about Lean recently and I have some notes!&#xA;Let the lack of organisation and detail be a reflection of how little experience and knowledge I have of Lean.&#xA;Be sure to keep that in mind while reading.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;its-not-magic&#34;&gt;It&amp;rsquo;s not magic.&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Lean is not a tool to help prove theorems for us.&#xA;It&amp;rsquo;s more of a way to get the computer to check your proof.&#xA;However, if it knows the goal, there are ways to make it fill in the blanks for us.&#xA;That&amp;rsquo;s more for convenience than breakthroughs. Don&amp;rsquo;t expect to use Lean to do homework or crack an unsolved problem.&#xA;Do expect it to be useful to verify your solution when you do do your homework or attempt that problem!&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;interactive&#34;&gt;Interactive?&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Lean is an &lt;em&gt;interactive&lt;/em&gt; theroem prover.&#xA;The way we interact with it is by moving around and editing text on one side of the window, which manipulates the state on the other side of the window.&#xA;Moving the cursor down line by line shows how each line affected the state.&lt;/p&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;if-unsure-go-with-vs-code&#34;&gt;If unsure, go with VS Code!&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You can use it with &lt;a href=&#34;https://github.com/leanprover/vscode-lean4&#34;&gt;VS Code&lt;/a&gt;, &lt;a href=&#34;https://github.com/Julian/lean.nvim&#34;&gt;Neovim&lt;/a&gt;, or &lt;a href=&#34;https://github.com/leanprover/lean4-mode&#34;&gt;Emacs&lt;/a&gt;.&#xA;I have no idea about Emacs, but the VS Code integration is far ahead of the Neovim one.&#xA;The extension in VS Code provides a lot of helpful tooltips on hovering over text, makes it easy to understand complex statements, and lets you jump to definitions of tactics and types if you want to.&#xA;Since these features are mostly coming from the LSP server implemented by Lean, I&amp;rsquo;m sure all that is possible with the current Nvim plugin, or even any other LSP plugin for Vim, but it takes absolutely no effort to get it working in VS Code.&#xA;So far I haven&amp;rsquo;t switched to it yet, but I would recommend that you begin in VS Code.&lt;/p&gt;&#xA;&lt;ol start=&#34;4&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;syntax-needs-patience&#34;&gt;Syntax needs patience.&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I find the syntax a little hard to get used to.&#xA;Stick to it, and you&amp;rsquo;ll get a hang of it.&lt;/p&gt;&#xA;&lt;ol start=&#34;5&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;try-the-natural-number-game&#34;&gt;Try the Natural Number Game!&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://leanprover-community.github.io/learn.html&#34;&gt;Natural Number Game&lt;/a&gt; has a version for Lean 3 as well as Lean 4.&#xA;I found it really helpful for practice,&#xA;as well as to understand how to use it.&lt;/p&gt;&#xA;&lt;ol start=&#34;6&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;in-fact-all-of-lean-is-like-a-game&#34;&gt;In fact all of Lean is like a game!&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Once we have written our hypothesis and our goal (aka claim)&#xA;lean breaks it down for us on the right hand side.&#xA;Each statement we write will change something there.&#xA;We might be able to conclude something which will then be populated into the list of assumptions.&#xA;We can ask it to break a goal into multiple simpler ones, which will add to the list of goals.&#xA;Line-by-line we can either bring the goal closer or push our assumptions farther until they meet and we&amp;rsquo;ve won!&lt;/p&gt;&#xA;&lt;ol start=&#34;7&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;aesop-simp-and-apply&#34;&gt;&lt;code&gt;aesop?&lt;/code&gt;, &lt;code&gt;simp?&lt;/code&gt; and &lt;code&gt;apply?&lt;/code&gt;&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Use these tactics for hints on getting yourself out of a jam.&lt;/p&gt;&#xA;&lt;ol start=&#34;8&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;debugging-using-have-&#34;&gt;Debugging using &lt;code&gt;have :=&lt;/code&gt;&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;There&amp;rsquo;s no &lt;code&gt;print&lt;/code&gt; in Lean, nor is there a debugger.&#xA;Usually the Infoview pane on the right is enough to tell us what we want to know.&#xA;Still, there are times when it&amp;rsquo;s necessary to know what some syntax means, or just to understand the pieces that make up a complex statement.&#xA;At such places/times, use the command&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;have := (foo x).h&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will create a new variable called &lt;code&gt;this&lt;/code&gt; with the value of &lt;code&gt;(foo x).h&lt;/code&gt;.&#xA;If &lt;code&gt;(foo x).h&lt;/code&gt; is not valid Lean, then of course, this won&amp;rsquo;t work.&lt;/p&gt;&#xA;&lt;ol start=&#34;9&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;the-error-messages-make-sense&#34;&gt;The error messages make sense.&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;When read and parsed carefully, they mostly do tell us which direction to move in.&#xA;I wish they could tell me exactly what to do, and maybe they do, and I&amp;rsquo;m not good enough with Lean to understand.&lt;/p&gt;&#xA;&lt;ol start=&#34;10&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;dont-get-intimidated-by-the-m456--s-in-the-error-messages&#34;&gt;Don&amp;rsquo;t get intimidated by the &lt;code&gt;?m.456&lt;/code&gt;  &amp;rsquo;s in the error messages.&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;There is probably nothing wrong with your installation or the editor. Those are just placeholders for arguments/types (those are the same things, I think).&lt;/p&gt;&#xA;&lt;ol start=&#34;11&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;read-the-docs&#34;&gt;Read the docs!&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Leans has &lt;a href=&#34;https://lean-lang.org/documentation/&#34;&gt;its own documentation&lt;/a&gt;, and &lt;a href=&#34;https://leanprover-community.github.io/mathlib4_docs/&#34;&gt;so does Mathlib&lt;/a&gt;.&#xA;It&amp;rsquo;s really helpful to be able to read it.&#xA;Trust me, this always helps in the long run.&lt;/p&gt;&#xA;&lt;ol start=&#34;12&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;h3 id=&#34;the-community-is-great&#34;&gt;The community is great&lt;/h3&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You can join the &lt;a href=&#34;https://leanprover-community.github.io/&#34;&gt;Lean community&lt;/a&gt; and Zulip and post questions there!&lt;/p&gt;&#xA;&lt;p&gt;Although I think it&amp;rsquo;s a useful skill to have, Lean is fun too, and I hope you enjoy learning and using it!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Making Sense of Division by Zero</title>
      <link>https://aadi.ink/suchthat/chapter0/</link>
      <pubDate>Sun, 20 Aug 2023 17:20:20 +0530</pubDate>
      <guid>https://aadi.ink/suchthat/chapter0/</guid>
      <description>&lt;p&gt;Hello there!&#xA;This isn&amp;rsquo;t going to be very long, but make yourself comfortable anyway.&lt;/p&gt;&#xA;&lt;p&gt;When I was in school, we used to live in a tiny single-bedroom apartment.&#xA;As you would expect in such a small apartment, it was quite full of things.&#xA;One of the games I used to play was to find a way to go from one point to another&#xA;without touching the ground.&#xA;&lt;label for=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle sidenote-number&#34;&#xA;&#x9;&gt;&lt;input type=&#34;checkbox&#34; id=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle&#34; /&gt;&lt;span&#xA;&#x9;&#x9;class=&#34;sidenote&#34;&gt;Some version of _The Floor is Lava_, but that sounds childish. I would rather go with _Crocodiles!_&lt;/span&#xA;&#x9;&gt;&lt;/label&#xA;&gt;&#xA;It was fun.&#xA;If it was too easy, I would add extra constraints &amp;ndash; do it without touching a certain wall,&#xA;or maybe within a fixed time, or whatever other idea came to mind.&#xA;If it became too difficult, to the degree that it stopped being fun, I would similarly let myself break a rule here or there, or perhaps just change the destination to something more doable.&lt;/p&gt;&#xA;&lt;p&gt;Turns out maths is fundamentally no different from this concept!&#xA;We make a rules, like the rules that govern how addition takes place.&#xA;Given numbers &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo separator=&#34;true&#34;&gt;,&lt;/mo&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;a,b,c&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, we specify that &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;a+b = b+a&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;a+0 = a&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mo stretchy=&#34;false&#34;&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy=&#34;false&#34;&gt;)&lt;/mo&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;a+(b+c) = (a+b)+c&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;Those are the rules of addition.&lt;br&gt;&#xA;It&amp;rsquo;s arguable that Uno&amp;rsquo;s rules are more complicated than those of group theory.&#xA;Try looking them up!&#xA;If you do, you&amp;rsquo;ll notice that the rules of a group do not require that&#xA;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;a+b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; must be the same as &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;b+a&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;In fact, the groups&#xA;in which &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;a+b = b+a&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is always true have a special name for themselves: they are called &lt;em&gt;Abelian&lt;/em&gt; groups.&lt;/p&gt;&#xA;&lt;p&gt;But wait.&#xA;Isn&amp;rsquo;t it a fact that &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;a+b=b+a&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;?&#xA;Isn&amp;rsquo;t that just &lt;em&gt;addition&lt;/em&gt;?&lt;br&gt;&#xA;To that, I say, exactly.&#xA;Addition is just a bunch of rules.&#xA;In group theory, the plus sign (&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;+&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;) is just a symbol&#xA;to denote some operation.&#xA;It could be multiplication of numbers,&#xA;the rotation of a square,&#xA;or just plain actual addition.&lt;/p&gt;&#xA;&lt;p&gt;Group theory doesn&amp;rsquo;t care what the operation is, as long as that operation follows the rules.&#xA;And that&amp;rsquo;s what makes things interesting!&lt;/p&gt;&#xA;&lt;p&gt;Look at any sport.&#xA;It&amp;rsquo;s another bunch of rules.&#xA;I&amp;rsquo;ll take lawn tennis for example, but you can think of any sport familiar to you.&#xA;If tennis had too many restrictions for the size, shape, and material of the racket,&#xA;then there would be no room left for exploring new ways to play.&#xA;If there were too few rules, then it would lead to chaos: the computer-assisted, hydraulic rackets will end up competing against each other, leaving the players&amp;rsquo; aside.&#xA;Cool, but not interesting, nothing new, and not tennis.&lt;/p&gt;&#xA;&lt;p&gt;Group theory, like tennis, has enough rules to be interesting, but not too much to be a dead end.&#xA;These rules allow us to study a whole class of things, because they all happen to be following the rules of group theory.&lt;/p&gt;&#xA;&lt;p&gt;Take for example, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant=&#34;double-struck&#34;&gt;R&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\R&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, the set of all real numbers.&#xA;This, paired with the &lt;em&gt;addition operation&lt;/em&gt;, is a group.&#xA;It also happens to be a vector space!&#xA;But vector spaces and groups are governed by different rules &amp;ndash; different sports!&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s where the sport analogy ends.&#xA;There&amp;rsquo;s no question of winning or losing here.&#xA;The point is that we are the ones who make the rules of mathematics.&#xA;Then we are the same ones that try to see what happens if we stick to them.&lt;/p&gt;&#xA;&lt;p&gt;That brings me to the title.&#xA;According to the rules of real numbers, division by zero is undefined. &lt;label for=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle sidenote-number&#34;&#xA;&#x9;&gt;&lt;input type=&#34;checkbox&#34; id=&#34;sn-d41d8cd98f00b204e9800998ecf8427e&#34; class=&#34;sidenote-toggle&#34; /&gt;&lt;span&#xA;&#x9;&#x9;class=&#34;sidenote&#34;&gt;Reals are not the only numbers, by the way, there&amp;#39;s other sets of numbers that have more, less, or different rules! $\R$ doesn&amp;#39;t allow square roots of negative numbers, but $\mathbb C$ does&lt;/span&#xA;&#x9;&gt;&lt;/label&#xA;&gt;&#xA;I used to wonder why we didn&amp;rsquo;t just define it then.&#xA;Unfortunately, there is no way to define division by zero without breaking our own rules.&#xA;We can associate any physical intuition, or set it to something based on the context, but in the pure mathematical setting, there&amp;rsquo;s no answer that fits.&lt;/p&gt;&#xA;&lt;p&gt;Dividing a real by a real must be a real.&#xA;So which real number should &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1\div0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; be?&#xA;There is no such real number as infinity.&#xA;Don&amp;rsquo;t get me wrong, there are ways to treat infinity like a number, but that will involve breaking rules too.&lt;br&gt;&#xA;Can &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1\div0=0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;? That would then mean that &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mfrac&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\frac10&amp;lt; \frac12&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;, and then following rules of real numbers, we would have &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;0&amp;gt;2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;This is a problem if we also want real numbers to follow our usual notions of numbers and counting.&lt;/p&gt;&#xA;&lt;p&gt;So then the answer can&amp;rsquo;t be &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Trying to set &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1\div 0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; equal to any other real leads to roadblocks just like this one.&lt;/p&gt;&#xA;&lt;p&gt;And so we leave it undefined, that is, &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1\div0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; is not a real number.&lt;/p&gt;&#xA;&lt;p&gt;What next?&#xA;Real numbers have rules that make them useful to real world?&#xA;Sometimes we need to make sense of situations when we reach a division by zero.&#xA;What do we do then&lt;/p&gt;&#xA;&lt;p&gt;Well, let&amp;rsquo;s see what happens when we divide by numbers that are very small, but not zero.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Number &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/th&gt;&#xA;          &lt;th&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1\div x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\frac12&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;{\frac15}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;5&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;50&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;{\frac1{50}}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;50&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;50&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;1000&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;{\frac1{1000}}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1000&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1000&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Before anybody has a chance to jump to conclusions,&#xA;I want to show this:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Number &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/th&gt;&#xA;          &lt;th&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;1\div x&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;-\frac12&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;-2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;{-\frac15}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;-5&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;50&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;{-\frac1{50}}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;50&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;-50&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;1000&lt;/mn&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;{-\frac1{1000}}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1000&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;-1000&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;We seem to have some pattern here!&#xA;We can actually build some more rules to make sense of such patterns, which we shall do in the next chapter called limits!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Free Product of $\mathbb Z_3$ and $\mathbb Z_4$</title>
      <link>https://aadi.ink/posts/2023/03/free-product-of-z4-and-z3/</link>
      <pubDate>Wed, 08 Mar 2023 05:22:55 +0530</pubDate>
      <guid>https://aadi.ink/posts/2023/03/free-product-of-z4-and-z3/</guid>
      <description>&lt;p&gt;I was recently tasked to draw the Cayley diagram of&#xA;the free product of &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mspace linebreak=&#34;newline&#34;&gt;&lt;/mspace&gt;&lt;msub&gt;&lt;mi&gt;Z&lt;/mi&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\\Z_3&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt; and &lt;span class=&#34;katex&#34;&gt;&lt;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mspace linebreak=&#34;newline&#34;&gt;&lt;/mspace&gt;&lt;msub&gt;&lt;mi&gt;Z&lt;/mi&gt;&lt;mn&gt;4&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&#34;application/x-tex&#34;&gt;\\Z_4&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;.&#xA;It looks quite nice and interesting (to me anyway),&#xA;so why not put it up here?&lt;/p&gt;&#xA;&lt;p&gt;I don&amp;rsquo;t understand free products well enough&#xA;to be able to explain them in any manner,&#xA;but that doesn&amp;rsquo;t prevent me from sharing the diagram with you!&#xA;Here you go:&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&#x9;&lt;img src=&#39;free-product-z3-z4.png&#39; alt=&#34;&#34; class=&#34;figure dynamic-bg&#34; &#xA;&#x9;width=&#34;80%&#34; &#xA;&#x9;alt=&#34;Cayley diagram showing squares with triangles on each corner, each triangle having a square on its corners, and so on.&#34; &#xA;&#x9;title=&#34;Free product of the cyclic groups of order 3 and 4.&#34; &#xA;&#x9;class=&#34;dynamic-background figure&#34;&gt; &#xA;&#x9;&lt;div class=&#34;caption-figure&#34;&gt;A small portion of $\Z_3\star\Z_4$&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;This pattern carries on and on.&#xA;I haven&#39;t labelled every element (denoted by a circle)&#xA;because that would make it messy.&#xA;</description>
    </item>
  </channel>
</rss>
