I have been doing some work (well a LOT of work) on brushing up a variety of precalculus and calculus topics (i.e. every one I can find on the website) on Khan Academy recently. This involved a huge amount of stuff I have done before, but usually with additional insights (such as logarithmic implicit differentiation) and new techniques (e.g. L'Hôpital's Rule for the two-sided limit of a function, and using the natural logarithm to turn exponential problems into rational functions for said rule to be applicable). But in my fascinatingly different learning on divergence/convergence tests for infinite series, something prickly came up.
As Sal Khan informs the viewer, quite correctly of course, there is a famous proof from French Medieval mathematician Nicole Oresme showing that the infinite harmonic series is divergent. It does this by way of the comparison divergence/convergence test. So first off, what is this test?
The direct comparison test involves the infinite series under test, SA, and a second infinite series SB. Every term of the series SA is smaller than the corresponding term in SB, and all terms are non-negative. The statements are thus: if SB converges, then SA must also converge; if SA diverges, then SB must also diverge.
Both of these statements are intuitively easy to grasp. Upon reading this, I immediately questioned the use of 'must converge' versus 'is bounded', simply because the counterexample that sprung to mind was a sequence containing the sine or cosine functions, or any other type of oscillatory function such as one including the term (-1)n - here it would be ok to say it is bounded if the first condition was satisfied, yet the very nature of the function would potentially stop a true limit being ever reached. However, in reality although this is true it would be a trivial case to use, since it defeats the premise of actually using the direct comparison test if you already know the function is divergent. And this is forgetting the possible exception that the oscillator is appended to a decaying function, in which case the problem would sort itself by zeroing out as n approaches infinity. Nevertheless the test would still be useful for determining whether said function is bounded or not, in fairness.
So, moving onto the proof. Oresme took the series SA = 1 + 1/2 + 1/3 + 1/4 + ... (infinite harmonic series) and for each term found the smallest power of 1/2 that was smaller than or equal to it. This led to this comparison:
SA = 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + 1/8 + 1/9 + ...
SB = 1 + 1/2 + 1/4 + 1/4 + 1/8 + 1/8 + 1/8 + 1/8 + 1/16 + ...
Since each term in SB is smaller than the corresponding term in SA, it must be that the value of SA up to the nth term is smaller than the value of SB at the same point. So we need to determine the behaviour of SB in the limit as n stretches off to infinity, in order to perform the direct comparison test.
It is easy to notice that the terms in SB can be grouped in a very special way - there are two quarters, four eighths, eight sixteenths etc. This leads to the clearly divergent series:
SB = 1 + 1/2 + 1/2 + 1/2 + ...
Since this is divergent, it must also be that the harmonic series is divergent too. This is nicely illustrated on Desmos, with the caveat that functions based on discrete summations of integral-domained terms plot discrete line segments centered about each integer. So it looks like a bunch of lines when in reality is is a set of discrete points. Anyway the visual representation is sound:
It's funny that out of all of that, the thing I'm most proud of it that I have finally found a vaguely practical use for the floor function! What it is doing in the red line (representing SB in the diagram) is finding the exact value of the power 0.5 needs to be raised to to equal the corresponding term in the blue line, then rounding it up to the next integer value.
Ok so that looks pretty convincing - the red line diverges so it stops the blue line converging too. It just seems very counterintuitive though. Although failing the nth term divergence test doesn't tell you for sure that a series converges, it would seem highly logical that the harmonic series should converge since its terms will get infinitely small in the limit! So for me, I want even more argument to convince myself that this is true.
The next thing we can do is to analyse how quickly the comparison function, SB, is growing. Obviously the rate of change decreases as n increases, because the additional increments drop in powers of 2 at a time. But the number of terms between each drop also increases by a factor of 2 each time (consider there are 2 terms of 1/4, 4 terms of 1/8, 8 terms of 1/16...). So, for example, when the gradient of the line is 1/128 (where 128 = 27), 27 < n < 28, or more clearly 128 < n < 256. More generally, we find that for some natural number k, the region in which the gradient is 1/2k is 2k < n < 2k+1. All this still doesn't help me reason this out though, because it would still suggest that as x → ∞, the gradient of the line → 1/∞ = 0.
In conclusion, it is very difficult to condense the reasoning to anything more satisfying than a series comparison at my current level of knowledge. Keep studying then...
Welcome to my world
Here is my domain for splurging my ruminations on the STEM fields. Most of the stuff I discuss and research on this site is way beyond what we learn at school and what I am conventionally taught, so there may well be errors in my information or maths - please do not viciously troll the page with corrections, although constructive and useful criticism is of course welcome :)
Wednesday 31 August 2016
Some thoughts on the Laplacian method for solving differential equations
In the summer months, since the conclusion of my exams and work experience, I have been at a loss of normal summery things to do. Instead, I have taken this opportunity to work on some extra-curricular techniques and subject areas within maths and physics, just for a bit of fun. Clearly in general, since work on transforms, matrices and quantum probability are very much new topics for me, it has taken a large amount of read-learn-practice before I can come up with some useful projects to demonstrate my new skills. In the meantime, I will have a short discussion about something I have recently learned, called the Laplace Transform.
It is a name that I have heard every now and again from my maths teacher, and across my wider reading on the internet, yet only with nothing else to study for have I been brave enough to delve into the actual processes involved. In essence, the transform is often described in the physical world as taking a problem in the "time domain" and translating it into the "frequency domain"; conversely on a more abstract mathematical level it is merely a way to simplify differential problems into contrived algebraic ones, which may suit the number-cruncher better as it is a generally more consistent method for solving a range of differential equations, as opposed to the more guesswork-orientated method of characteristic-equation-then-particular-integral.
So how does it work? The Laplace transform of a function f(t) is found by multiplying it by the function e-st, then finding the definite integral of this product with respect to t, between the limits of positive infinity and zero. It seems strange when put as bluntly as that but, as soon as some examples are performed, it becomes clear how convenient such a multiplication is by the seemingly arbitrary exponential term. This is for two reasons: integration by parts is straightforward where dv/dt is substituted as e-st; the exponential of a negative independent variable reduce to 0 or 1 in the limits. Using these key understandings, and a few examples from the internet to guide the method, I set out to prove a table of such transforms - with the exception of the convolution integrals at the very bottom I was able to do so, and took great pleasure and satisfaction in doing so! Here are a couple of good examples, which also introduced new functions to me which will come in useful in the future:
The second proof I did was perhaps blasé to choose as an example - in my black book where I have recorded all the written work from my work experience and personal study, I sequentially worked through simpler proofs before the moderately-challenging ones such as tcos(at), ones such as sin(at) and cos(at). Yet I felt it would be unsatisfying to reference results such as "given that the Laplace transform of sin(at) is ...", so I have effectively completed three proofs in one during the second example (it is not difficult to infer from the working that L{sin(at)} = a/(s2+a2) and that, with a fulfilling sense of symmetry, L{cos(at)} = s/(s2+a2)). This symmetry does indeed somewhat extend into the mathematics of the order-one-polynomial-trig-function product, where L{tsin(at)} = 2as/(s2+a2)2.
Moving swiftly on... One of the more important conceptual implications of the Laplace Transform, which helps to link mathematical abstraction with the physical world, is to see what happens when the operator is applied to f(t) = t. One finds that 1/s is obtained, nicely satisfying the equation that frequency ∝ time-1. Hence it is clear to see how useful such a relation might be, for example, in the field of electrical engineering as one tracks electromagnetic oscillations over time in a differential perspective.
Okay so now I know how Laplace Transforms work, a little bit of context on the kind of subject areas they may be useful in, and furthermore how to compute them. Now it's time to actually put them to their main use, which is for solving differential equations. Here is an example of such a differential equation - notice how I first solve it using the method more familiar to me, that of the characteristic equation and particular integral amalgamation, then contrast it with the Laplacian approach. The new method certainly seems more contrived in this simplistic case:
In this case the two solutions are very similar in length, but the algebra is undoubtedly more involved in the Laplacian version - the partial fraction decomposition in particular adds unnecessary complexity to the working. But observe how the initial conditions are worked nicely into the solution, making it more coherent, whereas in the familiar method they are used to solve for unknown constants which travel through the solution unresolved until the very end. So overall there is no real improvement using the transforms. But let's attempt a more complicated example. First, the auxiliary method...
(note that I say 'displaced from equilibrium' but I mean 'displaced from natural length of the spring - this also applies to the first example I did)
Then, the Laplacian method:
It is very difficult to see if these two solutions are equivalent, since they use different combinations of overarching constants. However I plotted them on Desmos, as can be found here. From there is is clear that they do not agree, yet one is considerably more likely to be correct - that is the blue line, the one that passes through the point (0,x0) whereas the other line does not; interestingly this is the solution from the Laplace transforms! I could go back through the first method and find the mistake but I am satisfied that the relative ease of the second method has been demonstrated, so it would be pretty unnecessary.
The point of that was to show that as problems get more complicated, the Laplace Transform comes into its own. But complicated in a very specific way - the auxiliary method does not become much more difficult as the degree of the differential equation increases, as long as the characteristic equation can be factorised without too much trouble, yet the Laplace method will since each expansion of a transformed derivative increases the number of terms in the algebraic result (L{x''} produces 3 terms, L{x'''} produces 4 terms etc.). No, what matters is that the non-homogeneous f(t) element of the equation becomes more exotic - this is what causes so much trouble in finding the particular integral, but it hardly makes the Laplace method more difficult because only some partial fraction manipulation is required to separate it off into various sines, cosines, exponentials and combinations of those. Therefore Laplace Transforms are most effective, at the level I understand them, for solving low-degree non-homogeneous ODEs with polyfunctional f(t).
But there is more to the Laplace Transform than this, which is but an entry level understanding of how to apply them in linear situations. In the first example there was no non-conservative air resistance to waste mechanical energy, so oscillation extended indefinitely towards t = +∞, yet in the second there was an exponential decay in the amplitude of the oscillation. This appeared in the s-domain as the given trigonometric function transform, but s-shifted by a constant - and hence was a use of the s-shift Laplace Transform, one of the most useful ones in the table. There is a very similar t-shift, where the exponential function appears as a multiplier in the s-domain - in the t-domain this takes the form of uc·f(t-c), where uc is the unit step function at c.
But the versatility doesn't stop there. The issue I have at the moment is that I cannot progress beyond dealing with linear ODEs, since I have not yet learned how do perform convolution integrals (these produce a product of functions in the s-domain) or transforms of a product of two functions. All things to look forward to learning in the future I suppose!
It is a name that I have heard every now and again from my maths teacher, and across my wider reading on the internet, yet only with nothing else to study for have I been brave enough to delve into the actual processes involved. In essence, the transform is often described in the physical world as taking a problem in the "time domain" and translating it into the "frequency domain"; conversely on a more abstract mathematical level it is merely a way to simplify differential problems into contrived algebraic ones, which may suit the number-cruncher better as it is a generally more consistent method for solving a range of differential equations, as opposed to the more guesswork-orientated method of characteristic-equation-then-particular-integral.
So how does it work? The Laplace transform of a function f(t) is found by multiplying it by the function e-st, then finding the definite integral of this product with respect to t, between the limits of positive infinity and zero. It seems strange when put as bluntly as that but, as soon as some examples are performed, it becomes clear how convenient such a multiplication is by the seemingly arbitrary exponential term. This is for two reasons: integration by parts is straightforward where dv/dt is substituted as e-st; the exponential of a negative independent variable reduce to 0 or 1 in the limits. Using these key understandings, and a few examples from the internet to guide the method, I set out to prove a table of such transforms - with the exception of the convolution integrals at the very bottom I was able to do so, and took great pleasure and satisfaction in doing so! Here are a couple of good examples, which also introduced new functions to me which will come in useful in the future:
The second proof I did was perhaps blasé to choose as an example - in my black book where I have recorded all the written work from my work experience and personal study, I sequentially worked through simpler proofs before the moderately-challenging ones such as tcos(at), ones such as sin(at) and cos(at). Yet I felt it would be unsatisfying to reference results such as "given that the Laplace transform of sin(at) is ...", so I have effectively completed three proofs in one during the second example (it is not difficult to infer from the working that L{sin(at)} = a/(s2+a2) and that, with a fulfilling sense of symmetry, L{cos(at)} = s/(s2+a2)). This symmetry does indeed somewhat extend into the mathematics of the order-one-polynomial-trig-function product, where L{tsin(at)} = 2as/(s2+a2)2.
Moving swiftly on... One of the more important conceptual implications of the Laplace Transform, which helps to link mathematical abstraction with the physical world, is to see what happens when the operator is applied to f(t) = t. One finds that 1/s is obtained, nicely satisfying the equation that frequency ∝ time-1. Hence it is clear to see how useful such a relation might be, for example, in the field of electrical engineering as one tracks electromagnetic oscillations over time in a differential perspective.
Okay so now I know how Laplace Transforms work, a little bit of context on the kind of subject areas they may be useful in, and furthermore how to compute them. Now it's time to actually put them to their main use, which is for solving differential equations. Here is an example of such a differential equation - notice how I first solve it using the method more familiar to me, that of the characteristic equation and particular integral amalgamation, then contrast it with the Laplacian approach. The new method certainly seems more contrived in this simplistic case:
In this case the two solutions are very similar in length, but the algebra is undoubtedly more involved in the Laplacian version - the partial fraction decomposition in particular adds unnecessary complexity to the working. But observe how the initial conditions are worked nicely into the solution, making it more coherent, whereas in the familiar method they are used to solve for unknown constants which travel through the solution unresolved until the very end. So overall there is no real improvement using the transforms. But let's attempt a more complicated example. First, the auxiliary method...
(note that I say 'displaced from equilibrium' but I mean 'displaced from natural length of the spring - this also applies to the first example I did)
Then, the Laplacian method:
It is very difficult to see if these two solutions are equivalent, since they use different combinations of overarching constants. However I plotted them on Desmos, as can be found here. From there is is clear that they do not agree, yet one is considerably more likely to be correct - that is the blue line, the one that passes through the point (0,x0) whereas the other line does not; interestingly this is the solution from the Laplace transforms! I could go back through the first method and find the mistake but I am satisfied that the relative ease of the second method has been demonstrated, so it would be pretty unnecessary.
The point of that was to show that as problems get more complicated, the Laplace Transform comes into its own. But complicated in a very specific way - the auxiliary method does not become much more difficult as the degree of the differential equation increases, as long as the characteristic equation can be factorised without too much trouble, yet the Laplace method will since each expansion of a transformed derivative increases the number of terms in the algebraic result (L{x''} produces 3 terms, L{x'''} produces 4 terms etc.). No, what matters is that the non-homogeneous f(t) element of the equation becomes more exotic - this is what causes so much trouble in finding the particular integral, but it hardly makes the Laplace method more difficult because only some partial fraction manipulation is required to separate it off into various sines, cosines, exponentials and combinations of those. Therefore Laplace Transforms are most effective, at the level I understand them, for solving low-degree non-homogeneous ODEs with polyfunctional f(t).
But there is more to the Laplace Transform than this, which is but an entry level understanding of how to apply them in linear situations. In the first example there was no non-conservative air resistance to waste mechanical energy, so oscillation extended indefinitely towards t = +∞, yet in the second there was an exponential decay in the amplitude of the oscillation. This appeared in the s-domain as the given trigonometric function transform, but s-shifted by a constant - and hence was a use of the s-shift Laplace Transform, one of the most useful ones in the table. There is a very similar t-shift, where the exponential function appears as a multiplier in the s-domain - in the t-domain this takes the form of uc·f(t-c), where uc is the unit step function at c.
But the versatility doesn't stop there. The issue I have at the moment is that I cannot progress beyond dealing with linear ODEs, since I have not yet learned how do perform convolution integrals (these produce a product of functions in the s-domain) or transforms of a product of two functions. All things to look forward to learning in the future I suppose!
Subscribe to:
Posts (Atom)