Skip to main content

Latest Post

Power Essence Coefficients and Bernoulli Numbers

Previously, we have explored methods to compute the essence of power functions $Ȣx^n$ which involves solving a large system of linear equations. This method is equivalent to solving for the inverse of a large $n\times n$ matrix where entries are values of pascal's triangle. Though the matrix method allow us to solve for large number of essences at once, it does not extend easily to solve for next iterations of essence coefficients. Rather than reusing the values we have already solved for, we will have to solve for inverse of a separate larger matrix again. Here we will introduce an iterative method for solving for these coefficients. Chapter 0: Recap Let us first remind ourselves of the definition of essence. For a function $f(x)$, we want to find the transformation $Ȣf(x)$ such that we are able to 'smooth out' its series: $$\sum_{i=a}^b f(i) = \int_{a-1}^b Ȣf(x) dx$$ For example, we can solve for the following functions: $$\begin{align*}Ȣ1 &= 1 \\ Ȣx &= x +

Sequence Curves: Essence of Sine and Cosine

Last time, we covered Geometric Series and before that we covered Arithmetic Series.
Now we will try to find formulas for more unusual Series such as $\sum\sin$ and $\sum\cos$.
$$\sum_{i=n}^m \sin(i) = \int_{n-1}^mȢ\{\sin(x)\}dx, \\
\sum_{i=n}^m \cos(i) = \int_{n-1}^mȢ\{\cos(x)\}dx $$

Essence Identity

$$Ȣ\{f(x+1) - f(x)\} = \frac{d}{dx}f(x+1) $$ Last time we were able to calculate Essence of Exponentials with help of this Identity (also called Essence Formula). This will also help us calculate Essence for Sine and Cosine, though through a more complicated process. Unlike Exponentials, the difference cannot be grouped into a single term. To compute $Ȣ\{\sin(x)\}$ and $Ȣ\{\cos(x)\}$, we will have to solve them simultaneously side-by-side.

$Ȣ\{\sin(x)\} \text{ and }Ȣ\{\cos(x)\}$

Firstly, let us use Essence Identity to find that
$$\begin{align*}
Ȣ\{\sin(x+1)-\sin(x)\}&=\frac{d}{dx}\sin(x+1)\\
Ȣ\{\sin(1)\cos(x)+\cos(1)\sin(x) - \sin(x)\}&=\cos(x+1)\\
Ȣ\{\sin(1)\cos(x) + (\cos(1)-1)\sin(x) \}&=\\
\sin(1)Ȣ\{\cos(x)\}+(\cos(1)-1)Ȣ\{\sin(x)\}&=\\
\therefore Ȣ\{\sin(x)\} &= \frac{\cos(x+1) - \sin(1)Ȣ\{\cos(x)\}}{\cos(1)-1}
\end{align*}$$ and $$\begin{align*}
Ȣ\{\cos(x+1)-\cos(x)\}&= \frac{d}{dx}\cos(x+1)\\
Ȣ\{\cos(1)\cos(x)-\sin(1)\sin(x)-\cos(x)\}& = -\sin(x+1) \\
Ȣ\{-\sin(1)\sin(x) + (\cos(1)-1)\cos(x)\}&= \\
-\sin(1)Ȣ\{\sin(x)\}+(\cos(1)-1)Ȣ\{\cos(x)\}&=\\
\therefore Ȣ\{\sin(x)\}&=\frac{(\cos(1)-1)Ȣ\{\cos(x)\}+\sin(x+1)}{\sin(1)} \end{align*}$$ We thus find two definitions of Essence of Sine each in terms of Essence of Cosine. We can use substitution to solve for Essence of Cosine.
$$\begin{align*}\frac{(\cos(1)-1)Ȣ\{\cos(x)\}+\sin(x+1)}{\sin(1)} &=  \frac{\cos(x+1) - \sin(1)Ȣ\{\cos(x)\}}{\cos(1)-1} \\
(\cos(1)-1)^2Ȣ\{\cos(x)\} + (\cos(1)-1)\sin(x+1) &= \sin(1)\cos(x+1) - \sin^2(1)Ȣ\{\cos(x)\} \\
( (\cos(1)-1)^2+\sin^2(1) )Ȣ\{\cos(x)\} & = \sin(1)\cos(x+1) - (\cos(1)-1)\sin(x+1) \\
( \cos^2(1) + 1 - 2\cos(1) + \sin^2(1)  )Ȣ\{\cos(x)\} & = \sin(1)\cos(x+1) - \cos(1)\sin(x+1) + \sin(x+1) \\
(2 - 2\cos(1))Ȣ\{\cos(x)\} &= \sin(1 - (x+1) ) + \sin(x+1) \\
2(1-\cos(1))Ȣ\{\cos(x)\} &= \sin(-x) + \sin(x+1) \\
\therefore Ȣ\{\cos(x) \} = \frac{\sin(x+1)-\sin(x)}{2(1-\cos(1))}
\end{align*}$$ Now knowing Essence of Cosine, we can substitute this back into one of the definitions for Essence of Sine. We will use the second definition in order to easily cancel out the $1-\cos(1)$ in the denominator. $$\begin{align*}
\because Ȣ\{\sin(x)\}&=\frac{(\cos(1)-1)Ȣ\{\cos(x)\}+\sin(x+1)}{\sin(1)} \\
&= \frac{-(1-\cos(1))\frac{\sin(x+1)-\sin(x)}{2(1-\cos(1))}+\sin(x+1)}{\sin(1)} \\
& = \frac{-\frac{1}{2}\sin(x+1) + \frac{1}{2}\sin(x) + \sin(x+1)}{\sin(1)} \\
& = \frac{\frac{1}{2}\sin(x+1) + \frac{1}{2}\sin(x)}{\sin(1)} \\
\therefore Ȣ\{\sin(x)\} & = \frac{\sin(x+1) + \sin(x)}{2\sin(1)}
\end{align*}$$ We arrived at simple equations for both Essences, but these are not the only possible definitions.
Using the Interchangeability of Essence and Differentiation, $$\frac{d}{dx}Ȣ\{f(x)\} = Ȣ\{\frac{d}{dx}f(x)\}$$ we can find that $$\begin{align*}
Ȣ\{\frac{d}{dx}\sin(x)\} & = \frac{d}{dx}\frac{\sin(x+1) + \sin(x)}{2\sin(1)} \\
\thereforeȢ\{\cos(x)\} & = \frac{\cos(x+1) + \cos(x)}{2\sin(1)} \\ \\
Ȣ\{\frac{d}{dx}\cos(x)\} & = \frac{d}{dx}\frac{\sin(x+1)-\sin(x)}{2(1-\cos(1))} \\
-Ȣ\{\sin(x)\} &= \frac{\cos(x+1) - \cos(x)}{2(1-\cos(1))} \\
\thereforeȢ\{\sin(x)\} &= \frac{-\cos(x+1) + \cos(x)}{2(1-\cos(1))} \end{align*}$$ With this, we conclude the Essence formulas for both:
$$\begin{align*}
Ȣ\{\sin(x)\} & = \frac{\sin(x+1) + \sin(x)}{2\sin(1)}  & =\frac{-\cos(x+1) + \cos(x)}{2(1-\cos(1))} \\
Ȣ\{\cos(x)\} & =  \frac{\cos(x+1) + \cos(x)}{2\sin(1)} & = \frac{\sin(x+1)-\sin(x)}{2(1-\cos(1))} \\
&&\blacksquare
\end{align*}$$

We note an interesting symmetry with the two definitions of each Sine and Cosine: when $\sin(1)$ is in the denominator, it is as if it is taking the average of the current and the next term of the sequence; when $1-\cos(1)$ is at the denominator, it is taking the difference of the current and next term of the other trigonometric function.
These simple pattern lends itself to be easily memorized for future uses. Personally, the first definitions with $\sin(1)$ seems to be more easily memorized and used. $$\sum_{i=n}^mf(i) = \int_{n-1}^mȢ\{f(x)\}dx$$ By definition of Essences, we find that $$\sum_{i=n}^m \sin(i) = \int_{n-1}^m\frac{\sin(x+1)+\sin(x)}{2\sin(1)}dx = \frac{\cos(n)+\cos(n-1)-\cos(m+1)-\cos(m)}{2\sin(1)} \\
\sum_{i=n}^m\cos(i) = \int_{n-1}^m \frac{\cos(x+1)+\cos(x)}{2\sin(1)}dx = \frac{\sin(m+1)+\sin(m) - \sin(n) - \sin(n-1)}{2\sin(1)}
$$ or if you wish to use alternate definition, $$\sum_{i=n}^m\sin(i) = \int_{n-1}^m\frac{-\cos(x+1)+\cos(x)}{2(1-\cos(1))}dx = \frac{-\sin(m+1) + \sin(m) + \sin(n) - \sin(n-1)}{2(1-\cos(1))} \\
\sum_{i=n}^m\cos(i) = \int_{n-1}^m\frac{\sin(x+1)-\sin(x)}{2(1-\cos(1))}dx = \frac{\cos(n)-\cos(n-1) - \cos(m+1) - \cos(m)}{2(1-\cos(1))}
$$
By similar process we can calculate $Ȣ_x\{\sin(nx)\}$ and $Ȣ_x\{\cos(nx)\}$ where $Ȣ_x$ denotes Essence with respect to $x$.
$$\begin{align*}
\because \frac{d}{dx} f(x+1) &= Ȣ\{ f(x+1)-f(x) \} \\ \frac{d}{dx}\sin(n(x+1)) & = Ȣ\{\sin(n(x+1)) - \sin(nx) \} \\
n\cos(n(x+1)) & = Ȣ\{ \sin(nx+n) - \sin(nx) \} \\
n\cos(nx+n) &= Ȣ\{ \sin(n)\cos(nx) + \cos(n)\sin(nx) - \sin(nx) \} \\
&= \sin(n)Ȣ\{\cos(nx)\} + (\cos(n)-1)Ȣ\{\sin(nx)\} \\
\therefore Ȣ\{\sin(nx)\} &= \frac{n\cos(nx+n) - \sin(n)Ȣ\{\cos(nx)\}}{\cos(n) - 1} \\ \\
\frac{d}{dx}\cos(n(x+1)) &= Ȣ\{\cos(n(x+1)) - \cos(nx) \} \\
-n\sin(n(x+1)) &= Ȣ\{\cos(nx+n) - \cos(nx) \} \\
-n\sin(nx+n) &= Ȣ\{\cos(n)\cos(nx) - \sin(n)\sin(nx) - \cos(nx) \} \\
-\sin(nx + n) &= (\cos(n)-1)Ȣ\{\cos(nx)\} - \sin(n)Ȣ\{\sin(nx)\} \\
\therefore Ȣ\{\sin(nx)\} &= \frac{n\sin(nx+n) + (\cos(n)-1)Ȣ\{\cos(nx)\}}{\sin(n)}
\end{align*} \\ $$ $$
\begin{align*}
\therefore \frac{n\cos(nx+n) - \sin(n)Ȣ\{\cos(nx)\}}{\cos(n) - 1} &= \frac{n\sin(nx+n) + (\cos(n)-1)Ȣ\{\cos(nx)\}}{\sin(n)} \\ n\sin(n)\cos(nx+n) - \sin^2(n)Ȣ\{\cos(nx)\} & = n(\cos(n)-1)\sin(nx+n) + (\cos(n)-1)^2Ȣ\{\cos(nx)\} \\
n(\sin(n)\cos(nx+n) - (\cos(n)-1)\sin(nx+n) ) &= (\cos(n)-1)^2 + \sin^2(n))Ȣ\{\cos(nx)\} \\
\because (\cos(\theta)-1)^2 = 2(1-\cos(\theta))-\sin^2(\theta) \\
n(\sin(n)\cos(nx+n) - \cos(n)\sin(nx+n) + \sin(nx+n)  ) &= 2(1-\cos(n))Ȣ\{\cos(nx)\} \\
n(\sin(n-(nx+n)) + \sin(nx+n)) &= \\
n(\sin(nx+n) - \sin(nx)) & =\\ \\
\therefore Ȣ_x\{\cos(nx)\} = \frac{n(\sin(nx+n) - \sin(nx))}{2(1-\cos(n))} \\
\end{align*} $$ $$
\begin{align*}
\because Ȣ\{\sin(nx)\} & = \frac{n\sin(nx+n) + (\cos(n)-1)Ȣ\{\cos(nx)\}}{\sin(n)} \\
& = \frac{n\sin(nx+n) - (1-\cos(n))\frac{n(\sin(nx+n) - \sin(nx))}{2(1-\cos(n))}}{\sin(n)} \\
& = \frac{n( 2\sin(nx+n) - \sin(nx+n) + \sin(nx) )}{2\sin(n)} \\ \\
\therefore Ȣ_x\{\sin(nx)\} &= \frac{n(\sin(nx+n) + \sin(nx) )}{2\sin(n)}
\end{align*} $$ $$
\begin{align*}
\because Ȣ\{\frac{d}{dx}f(x) \} & = \frac{d}{dx}Ȣ\{f(x)\} \\
\therefore Ȣ\{ \frac{d}{dx} \sin(nx) \} &= \frac{d}{dx}Ȣ\{\sin(nx) \} \\
Ȣ\{ n\cos(nx) \} & = \frac{d}{dx} frac{n(\sin(nx+n) + \sin(nx) )}{2\sin(n)} \\
nȢ\{\cos(nx)\} &= \frac{n^2(\cos(nx+n) + \cos(nx) )}{2\sin(n)} \\
\therefore Ȣ\{\cos(nx) \} &= \frac{n(\cos(nx+n) + \cos(nx) )}{2\sin(n)} \\ \\
\therefore Ȣ\{\frac{d}{dx} \cos(nx)\} &= \frac{d}{dx}Ȣ\{\cos(nx)\} \\
Ȣ\{-n\sin(nx)\} & = \frac{d}{dx}\frac{n(\sin(nx+n) - \sin(nx))}{2(1-\cos(n))} \\
-nȢ\{\sin(nx) \} &= \frac{n^2(\cos(nx+n) - \cos(nx))}{2(1-\cos(n))} \\
\therefore Ȣ\{\sin(nx)\} &= \frac{n(-\cos(nx+n) + \cos(nx))}{2(1-\cos(n))}
\end{align*}$$ $$
\begin{align*}
Ȣ_x\{\sin(nx)\} &=  \frac{n(\sin(nx+n) + \sin(nx) )}{2\sin(n)} &= \frac{n(-\cos(nx+n) + \cos(nx))}{2(1-\cos(n))}  \\
Ȣ_x\{\cos(nx) \} &= \frac{n(\cos(nx+n) + \cos(nx) )}{2\sin(n)} &= \frac{n(\sin(nx+n) - \sin(nx))}{2(1-\cos(n))}  \\
&&\blacksquare \end{align*} $$
Notice that this is consistent with original definitions above when $n=1$.`
With these we can find that
$$
\begin{align*}
\sum_{i=n}^m\sin(r*i) & = \int_{n-1}^m\frac{r(\sin(rx+r) + \sin(rx) )}{2\sin(r)} dx &&= \int_{n-1}^m \frac{r(-\cos(rx+r) + \cos(rx))}{2(1-\cos(r))} dx \\
& = \frac{\cos(rn)+\cos(rn-r) - \cos(rm+r) - \cos(rm)}{2\sin(r)} &&= \frac{ -\sin(rm+r) + \sin(rm) + \sin(rn) - \sin(rn-r) }{2(1-\cos(r))} \\
\sum_{i=n}^m \cos(r*i) &= \int_{n-1}^m \frac{ r(\cos(rx+r) +\cos(rx) ) }{2\sin(r)} dx &&= \int_{n-1}^m \frac{ r( \sin(rx+r) - \sin(rx) ) }{2(1-\cos(r))}dx \\
&= \frac{ \sin(rm+r)+\sin(rm) - \sin(rn) - \sin(rn-r) }{2\sin(r)} &&= \frac{ \cos(rn) -\cos(rn-r) -\cos(rm+r) + \cos(rm) }{2(1-\cos(r))}
\end{align*} $$ What fascinates me the most is that with these formulas we are able to condense a long sum of sine and cosine, which has no obvious reduction rules by themselves, into a concise single equation. Also, the added benefit of being able to calculate non-integer boundary series.
In addition to those, $\cos(\pi x)$ is a popular continuous substitute for $(-1)^x$ and so knowing its Essence will help us interpolate between more discontinuous functions later on.

Endnote

This has been a particularly equation-heavy article, but I hope you enjoyed exploring this concept with me nonetheless. I will try to post more frequently, with clearer explanations, and for more interesting topics in this new decade and I hope you will follow me through that journey.

Happy New Year and Happy New Decade!

Comments

Popular posts from this blog

Large Polynomial Series using Matrices (Calculating Bernoulli's Number with Pascal Matrix)

Polynomial Series can be easily solved using Power Series Formulas for each term in the polynomial. However, this can be frustrating since not every Power Formula are intuitive to memorize. We would like to find a more elegant and easier-to-recall formula for computing a Polynomial Series. This can be done using matrices. Notations and Equations We will borrow the notations and simple equations from Sequence Curve articles . There, we have extended a series to be continuous through the following identity: $$\sum_{i=m}^n f(i) = \int_{m-1}^nȢ\{f(x)\}dx $$ The $Ȣ\{f(x)\}$ acts as the rate of change of a series relative to its bounds. $$\frac{d}{dt} \sum_{i=m}^nf(i) = Ȣ\{f(n)\}\frac{dn}{dt} - Ȣ\{f(m-1)\}\frac{dm}{dt}$$ Letting $t=m=n$, we find $$\frac{d}{dt} \sum_{i=t}^tf(i) = \frac{d}{dt}f(t)= Ȣ\{f(t)\} - Ȣ\{f(t-1)\} $$ Remebering that $Ȣ$ Transformation is Linear, we can derive a simple identity of $$\frac{d}{dx}f(x+1) = Ȣ\{f(x+1)\} - Ȣ\{f(x)\} = Ȣ\{f(x+1)-f(x)\}$$ This will be use

Partition Counter using Trees, Recursion, Tables, and Algorithm

Partitions are number of ways an integer can be represented as sum of positive integers. We can ask, for example, what is the partition of 5? If we write out every possible combination, $$\begin{align*}  5 &= 1+1+1+1+1 \\  &= 1+1+1+2\\ &= 1+1+3\\ &= 1+4\\ &= 1+2+2\\ &= 2+3\\  &= 5 \end{align*} $$ we can see that partition of 5 is 7. One will immediately notice, however, that this is not the most efficient approach to answering the question: not only does partition grow quickly, attempting to organize and not miss or repeat an algebraic expression becomes messy and impractical. Chapter 1: Partition Tree A cleaner, but still not the best, approach would be to use tree diagrams to represent the partitions of a number. In a Partition Tree of $n$, every path to a terminating node will add up to the number $n$. And also, every child of a node (every nodes below a given parent node) will always be greater than or equal to the parent node in order to not

Vector Plane Rotation

Vector is a useful tool in maths and in physics that describes both magnitude and direction in a space. Vectors are used to describe concepts where direction matter, such as forces and velocity. For example, two cars can have same speed(scalar) but if one if heading north and the other south, they will have different velocity(vector). Vectors are usually written in terms of their components. Components are magnitude of the vector in one dimension. In 2D space, vector can be represented as coordinate of 2 components, <x,y>, and in 3D space, vector can be represented as coordinate of 3 components, <x, y, z>. Breaking down vectors into their components is extremely useful, especially in physics, because it allows one to break down complicated changes in vector into simpler and easier-to-work-with changes in its components. Take a look at projectile motion, for example. Velocity of an object fired up into the sky at an angle changes both its direction and magnitude. Attem

Summation of Harmonic Interval and Simplified Riemann Sum

When you first learn of Summation in Pre-Calc class, it is probably in build-up to Riemann Sum. You are taught the basics of Summation and simple manipulations, such a $\sum_nc*a_n = c*\sum_na_a$ for constant $c$, but you don't get to explore deeper into Summations and really play around with it. One thing that really intrigued me was why Summations only incremented by a unit. When we have a Sum like $\sum_{n=3}^{10}a_n$, it is equal to $a_3+a_4+a_5+\dots+a_9+a_{10}$, always incrementing by a unit( $1$ ). Why couldn't we Sum with interval that is not a unit? How could we have something like $a_3+a_{3.5}+a_4+a_{4.5}+a_5+a_{5.5}+\dots+a_{8.5}+a_9+a_{9.5}+a_{10}$, incrementing by a half instead of a full unit? Sets Of course you technically can use Sets and Set Builder Notation to create a specific Summation. $$\sum_{i \in S}i,S=\{\frac{x}{2}|x\in\mathbb{N_0}\} \, = \, 0+\frac{1}{2}+1+\frac{3}{2}+\dots$$ The above is Sum of all Rational Numbers incrementing by $\frac{1