Alexander Bass

Math Notes 2025

I enjoy tinkering with math. Unfortunately, I often forget the little things I discover. On this page you will find all the tidbits I found interesting enough to record.

I don't strive for academic perfection, however I also do not want to spread blatant errors. If you notice any errors in these notes, please email me.

See all math notes

Fibonacci Moduli

Single Page

For the Fibonacci sequence, defined by F1=1,F2=1,Fn=Fn1+Fn2F_{1} = 1,\> F_{2} = 1,\quad F_{n} = F_{n-1} + F_{n-2}

I believe the following is true (Haven’t found any counterexamples)

(Fnmodn)0when(nmod6){2,3,4} (F_{n} \operatorname{mod} n) \ne 0\quad \text{when}\quad (n \operatorname{mod} 6) \in \{2,3,4\}

Complete Factorization

Single Page

Quick! what are all the factors of 720720?

Instead of giving you an answer, here’s an algorithm to find it.

First, by repeated division, find the prime factors.

720/2=360360/2=180180/2=9090/2=4545/3=1515/3=55/5=1 \begin{align*} 720 / 2 &= 360 \\ 360 / 2 &= 180 \\ 180 / 2 &= 90 \\ 90 / 2 &= 45 \\ 45 / 3 &= 15 \\ 15 / 3 &= 5 \\ 5 / 5 &= 1 \\ \end{align*} F0=[2,2,2,2,3,3,5] F_{0} = [2,\,2,\,2,\,2,\,3,\,3,\,5]

Find the all unique factors and their cartesian products in F0F_{0} to create P0P_{0}.

P0={2,3,5,6,10,15,30} P_{0} = \{2,\,3,\,5,\,6,\,10,\,15,\,30\} S0=P0 S_{0} = P_{0}

Remove one of each unique factor from F0F_{0} to make F1F_{1}.

F1=[2,2,2,2,3,3,5] F_{1} = [\,\cancel{2},\,2,\,2,\,2,\,\cancel{3},\,3,\,\cancel{5}]

Find the all unique factors and their cartesian products in F1F_{1} to create P1P_{1}.

P1={2,3,6} P_{1} = \{\, 2,\,3,\,6 \,\}

Multiply each number in P1P_{1} by each number in S0S_{0} to find S1S_{1} Remove any duplicate values and remove any values which had been found in previous SnS_{n}.

S1={4,6,10,12,20,30,606,9,15,18,30,45,9012,18,30,36,60,90,180}S1={4,10,12,20,60,9,18,45,90,36,180} \begin{align*} S_{1} = \{\,& 4,\,\cancel{6},\,10,\,12,\,20,\,\cancel{30},\,60\\ & \cancel{6},\,9,\,\cancel{15},\,18,\,\cancel{30},\,45,\,90\\ & \cancel{12},\,\cancel{18},\,\cancel{30},\,36,\,\cancel{60},\,\cancel{90},\,180 \}\\ S_{1} = \{\,& 4,\,10,\,12,\,20,\,60,\,9,\,18,\,45,\,90,\,36,\,180\} \end{align*}

Remove one of each unique factor from F1F_{1} to make F2F_{2}.

F2=[2,2,2,2,3,3,5] F_{2} = [\,\cancel{2},\,\cancel{2},\,2,\,2,\,\cancel{3},\,\cancel{3},\,\cancel{5}]

Find the all unique factors and their cartesian products in F2F_{2} to create P2P_{2}.

P2={2} P_{2} = \{\, 2\, \}

Multiply each number in P2P_{2} by each number in S1S_{1} to find S2S_{2} Remove any duplicate values and remove any values which had been found in previous SnS_{n}.

S2={8,20,24,40,120,18,36,90,180,72,360}S2={8,24,40,120,72,360} \begin{align*} S_{2} &=\{\,8,\, \cancel{20},\, 24,\,40,\, 120,\, \cancel{18},\, \cancel{36},\, \cancel{90},\, \cancel{180},\, 72,\, 360\,\}\\ S_{2} &=\{\,8,\, 24,\,40,\, 120,\, 72,\, 360\,\}\\ \end{align*}

Remove one of each unique factor from F2F_{2} to make F3F_{3}.

F3=[2,2,2,2,3,3,5] F_{3} = [\,\cancel{2},\,\cancel{2},\,\cancel{2},\,2,\,\cancel{3},\,\cancel{3},\,\cancel{5}]

Find the all unique factors and their cartesian products in F3F_{3} to create P3P_{3}.

P3={2} P_{3} = \{\, 2\, \}

Multiply each number in P3P_{3} by each number in S2S_{2} to find S3S_{3} Remove any duplicate values and remove any values which had been found in previous SnS_{n}.

S3={16,48,80,240,144,720} S_{3} = \{\,16,\,48,\,80,\,240,\,144,\,720 \,\}

Remove one of each unique factor from F3F_{3} to make F4F_{4}.

F4=[2,2,2,2,3,3,5] F_{4} = [\,\cancel{2},\,\cancel{2},\,\cancel{2},\,\cancel{2},\,\cancel{3},\,\cancel{3},\,\cancel{5}]

Seeing as there are no more prime factors left in FF, Halt. The factors of 720720 are found in the union S0,S1,S2,S3S_0,\,S_1,\,S_2,\, S_3 and of course 11.

S={1}S0S1S2S3S={={1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,30,36,={40,45,48,60,72,80,90,120,144,180,240,360,720={} \begin{align*} S &= \{1\}\cup S_0 \cup S_1 \cup S_2 \cup S_3 \\ S &=\{\\ &\phantom{=\{}1,\,2,\,3,\,4,\,5,\,6,\,8,\,9,\,10,\,12,\,15,\,16,\,18,\,20,\,24,\,30,\,36,\\ &\phantom{=\{}40,\,45,\, 48,\,60,\,72,\,80,\,90,\,120,\,144,\,180,\,240,\,360,\,720 \\ &\phantom{=\{}\} \end{align*}

I don’t know the name of this algorithm. I figured it out myself, but the simplicity of the algorithm leads me to believe it has been known for quite some time. There are likely more efficient algorithms, but compared to the naive algorithm of dividing by all numbers less than, it is appreciably efficient. An advantage of this algorithm is that it can be done on pen-and-paper and also can be done using a computer.

Example Python Program

Squares mod 100

Single Page

Two neat little identities for squares mod 100.

n2(n+50)2mod100 n^2\equiv (n+50)^2 \mod 100

And

n2(50n)2mod100 n^2\equiv (50-n)^2 \mod 100

These can be algebraically shown to be true

n2(n2+2500+100n)mod100 n^2 \equiv (n^2 + 2500 + 100n) \mod 100

What about the generic case of a modulus kk? What is the specific mm to be added to nn to make the squares congruent?

n2(n+m)2modk n^2 \equiv (n+m)^2 \mod k

Expand

n2(n2+m2+2mn)modk n^2 \equiv (n^2 + m^2 + 2mn) \mod k

The trivial case is for m20modkm^2 \equiv 0 \mod k and 2mn0modk2mn \equiv 0 \mod k. Let’s just ignore the possibility that both of those aren’t true and yet still (m2+2mn)0modk(m^2 + 2mn) \equiv 0 \mod k

The smallest natural number mm such that 2mn0modk2mn \equiv 0 \mod k for any integer nn is clearly k/2k/2 if kk is even, and kk if kk is odd.

The smallest natural number mm such that m20modk m^2\equiv 0 \mod k is a bit trickier.

m2=k2m^2 = k^2 Obviously works, but the case of m2=(k/2)2m^2 = (k/2)^2 only works if kk is divisible by 44

m=k2 m = \frac{k}{2} m2=k222 m^2 = \frac{k^2}{2^2} m2k=k4 \frac{m^2}{k} = \frac{k}{4}

So for

n2(n+m)2modk n^2 \equiv (n+m)^2 \mod k

If kk is divisible by 44

m=k/2 m = k/2

Otherwise:

m=k m = k

Calculus of Inverses

Single Page

Let f(x),g(x)f(x), g(x) be functions that are defined and differentiable over some interval. Further, let

f(g(x))=xg(f(x))=x \begin{aligned} f(g(x)) &= x\\ g(f(x)) &= x\\ \end{aligned}

Such that g,fg,f are inverses.

Differentiate by chain rule.

f(g(x))g(x)=1 f'(g(x))g'(x) = 1 g(x)=1f(g(x)) g'(x) = \frac{1}{f'(g(x))}

This already has some neat results

f(x)=sin(x)g(x)=sin1(x)ddxsin1(x)=1cos(sin1(x)) \begin{aligned} f(x) &= \sin(x)\\ g(x) &= \sin^{-1}(x)\\ \frac{d}{dx} \sin^{-1}(x) &= \frac{1}{\cos(\sin^{-1}(x))} \end{aligned} f(x)=cos(x)g(x)=cos1(x)ddxcos1(x)=1sin(cos1(x)) \begin{aligned} f(x) &= \cos(x)\\ g(x) &= \cos^{-1}(x)\\ \frac{d}{dx} \cos^{-1}(x) &= -\frac{1}{\sin(\cos^{-1}(x))} \end{aligned} f(x)=tan(x)g(x)=tan1(x)ddxtan1(x)=1sec2(tan1(x)) \begin{aligned} f(x) &= \tan(x)\\ g(x) &= \tan^{-1}(x)\\ \frac{d}{dx} \tan^{-1}(x) &= \frac{1}{\sec^2(\tan^{-1}(x))} \end{aligned}

These aren’t the standard forms you’re familiar with, but they are equivalent.

By this we can create a very annoying looking integral (for fun of course).

1sec2(tan1(x))tan1(x)2dx \int \frac{1}{\sec^2(\tan^{-1}(x))\tan^{-1}(x)^2} \,dx

Inverse Inverse Trigonometry

Single Page

In the section on derivatives of inverses, these came up

cos(arcsin(x))sin(arccos(x))sec2(arctan(x)) \begin{aligned} \cos(\arcsin(x))\\ \sin(\arccos(x))\\ \sec^2(\arctan(x))\\ \end{aligned}

These forms can be simplified to remove any notion of trigonometry.

Draw a right triangle with angle θ\theta, adjacent side length 1x2\sqrt{1-x^2}, opposite side length xx, and hypotenuse side length 11.

Of course, sin(θ)=x\sin(\theta) = x, so arcsin(x)=θ\arcsin(x) = \theta within bounds of course.

And by definition cos(θ)=1x2\cos(\theta) = \sqrt{1-x^2}, so

cos(arcsin(x))=1x2,where1x1 \cos(\arcsin(x)) = \sqrt{1-x^2},\quad\text{where}\quad -1\leq x\leq 1

Some more identities found by similar method

cos(arcsin(x))=1x2,where1x1sin(arccos(x))=1x2,where1x1tan(arcsin(x))=x1x2,where1x1tan(arccos(x))=1x2x,where1x1 \begin{aligned} \cos(\arcsin(x)) &= \sqrt{1-x^2},\quad&\text{where}\quad &-1\leq x\leq 1\\ \sin(\arccos(x)) &= \sqrt{1-x^2},\quad&\text{where}\quad &-1\leq x\leq 1\\ \tan(\arcsin(x)) &= \frac{x}{\sqrt{1-x^2}},\quad&\text{where}\quad &-1\leq x\leq 1\\ \tan(\arccos(x)) &= \frac{\sqrt{1-x^2}}{x},\quad&\text{where}\quad &-1\leq x\leq 1\\ \end{aligned}

Arctangent is a bit more complex to deal with. Let’s do sec2(arctan(x))\sec^2(\arctan(x))

Draw a right triangle with angle θ\theta, adjacent side length AA, opposite side length of OO, and hypotenuse side length 11.

We know that tan(θ)=OA\tan(\theta) = \frac{O}{A} so set x=OAx =\frac{O}{A}. Also known is O2+A2=1O^2+A^2 = 1

So

A2+x2A2=1A2(1+x2)=1A2=11+x2A=11+x2Ax=OO=x1+x2 \begin{aligned} A^2+x^2A^2&=1\\ A^2(1+x^2)&=1\\ A^2 &= \frac{1}{1+x^2}\\ A &= \frac{1}{\sqrt{1+x^2}}\\ Ax &= O\\ O &= \frac{x}{\sqrt{1+x^2}} \end{aligned}

And so, the triangle has been completed.

Finally, csc2(θ)=1A2\csc^2(\theta) = \frac{1}{A^2}

This leads to another set of identities

sec2(arctan(x))=1+x2cos(arctan(x))=11+x2sin(arctan(x))=x1+x2 \begin{aligned} \sec^2(\arctan(x)) &= 1+x^2\\ \cos(\arctan(x)) &= \frac{1}{\sqrt{1+x^2}}\\ \sin(\arctan(x)) &= \frac{x}{\sqrt{1+x^2}} \end{aligned}

As a sidenote, it seems weird to me that

f(x)=sin(arctan(x))f1(x)=tan(arcsin(x)) \begin{aligned} f(x)&= \sin(\arctan(x))\\ f^{-1}(x)&= \tan(\arcsin(x)) \end{aligned}

Textbook Derivatives

Single Page

I know, it’s in the textbook (any textbook), but I never really learned the derivative of f(x)=logn(x)f(x) = \log_n(x)

It’s not too complicated though using the logarithm change-of-base identity.

ddxlogn(x)=ddxln(x)ln(n)=1xln(n) \frac{d}{dx} \log_n(x) = \frac{d}{dx} \frac{\ln(x)}{\ln(n)} = \frac{1}{x\ln(n)}

The exponential form isn’t that bad either.

g(x)=nxln(g(x))=xln(n)ddxln(g(x))=ddxxln(n)1g(x)g(x)=ln(n)ddxnx=ln(n)nx \begin{aligned} g(x) &= n^x\\ \ln(g(x)) &= x\ln(n)\\ \frac{d}{dx} \ln(g(x)) &= \frac{d}{dx} x\ln(n)\\ \frac{1}{g(x)}g'(x) &= \ln(n)\\ \frac{d}{dx}n^x &= \ln(n)n^x \end{aligned}

Of course, given that nxn^x and logn(x)\log_n(x) are inverses, we can also find the exponential through the identity found in the previous section.

f(x)=logn(x)g(x)=nxddxnx=11ln(n)nx=ln(n)nx \begin{aligned} f(x) &= \log_n(x)\\ g(x) &= n^x\\ \frac{d}{dx} n^x &= \frac{1}{\frac{1}{ \ln(n)n^x}} = \ln(n)n^x \end{aligned}

Partial sums of the Geometric Series+

Single Page

So, the geometric series: if you’ve taken some Calculus, you know of it.

r=1+x+x2+x3+ r = 1 + x + x^2+x^3+ \dots

Solve for rr

r=1+rx r = 1 + rx rrx=1 r-rx = 1 r(1x)=1 r(1-x) = 1 r=11x r = \frac{1}{1-x}

And there’s the formula the textbook gave ya'

j=0xj=11x \sum_{j=0}^{\infty} x^j = \frac{1}{1-x}

But what about the partial sums?

j=0nxj=? \sum_{j=0}^{n} x^j = ?

Decompose into difference of sums

j=0nxj=j=0xjj=n+1xj \sum_{j=0}^{n} x^j = \sum_{j=0}^{\infty} x^j - \sum_{j=n+1}^{\infty} x^j

We know the value of the left sum, and the right sum can be found similarly.

h=xn+1+xn+2+xn+3+ h = x^{n+1} + x^{n+2} + x^{n+3}+ \dots h=xn+1+x(xn+1+xn+2+) h = x^{n+1} + x(x^{n+1} + x^{n+2} + \dots) h=xn+1+x(h) h = x^{n+1} + x(h) h=xn+11x h = \frac{x^{n+1}}{1-x}

So the partial sum can be found

j=0nxj=11xxn+11x=1xn+11x \sum_{j=0}^{n} x^j = \frac{1}{1-x} - \frac{x^{n+1}}{1-x} = \frac{1-x^{n+1}}{1-x}

Some alternate forms are common

j=0n1xj=1xn1x=xn1x1 \sum_{j=0}^{n-1} x^j = \frac{1-x^{n}}{1-x} = \frac{x^n-1}{x-1}

Also note that, now that the upper bound of the sum is not infinity, the sum is defined for values x1 \lvert x \rvert \ge 1

Partial Extended-Geometric Sums

This also applies to series like

x1+x4+x7+x10+ x^1 + x^4 + x^7 + x^{10} + \dots

or in general terms where a>b0a > b \ge 0

r=xa+b+x2a+b+x3a+b+ r = x^{a+b} + x^{2a+b} + x^{3a+b} + \dots

Finding a closed form for this is not too much more difficult. First find the closed for to the simpler

h=xa+x2a+x3a+ h = x^{a} + x^{2a} + x^{3a} +\dots h=xa(1+xa+x2a+) h = x^{a}(1 + x^{a} + x^{2a} +\dots) h=xa+xah h = x^{a} + x^a h h=xa1xa h =\frac{ x^{a}}{1-x^a}

Now the more complex form can be found

r=xa+b+x2a+b+x3a+b+ r = x^{a+b} + x^{2a+b} + x^{3a+b} + \dots r=xa+b+x2a+b+x3a+b+ r = x^{a+b} + x^{2a+b} + x^{3a+b} + \dots r=xb(xa+x2a+x3a+) r = x^b (x^{a} + x^{2a} + x^{3a} + \dots) r=xbh=xa+b1xa r= x^bh = \frac{x^{a+b}}{1-x^a} j=1xaj+b=xa+b1xa \sum_{j=1}^{\infty} x^{aj+b} = \frac{x^{a+b}}{1-x^a}

Following similar reasoning as the regular geometric series, the partial form is found.

m=xan+b+xa(n+1)+b+xa(n+2)+b+ m = x^{an+b} + x^{a(n+1)+b} + x^{a(n+2)+b} + \dots m=xb(xan+xa(n+1)+xa(n+2)+) m = x^b( x^{an} + x^{a(n+1)} + x^{a(n+2)} + \dots) m=xb(xan+xa(n+1)+xa(n+2)+) m = x^b ( x^{an} + x^{a(n+1)} + x^{a(n+2)} + \dots)

Pause solving mm, introduce new equation, tt

t=xan+xa(n+1)+xa(n+2)+ t = x^{an} + x^{a(n+1)} + x^{a(n+2)} + \dots t=xan+xan+1a+xan+2a+ t = x^{an} + x^{an+1a} + x^{an+2a} + \dots t=xan(1+x1a+x2a+) t = x^{an}(1 + x^{1a} + x^{2a} + \dots)

Pause solving tt, introduce new equation oo

o=xa+x2a+x3a+ o = x^{a} + x^{2a} + x^{3a} + \dots o=xa(1+o) o = x^{a}(1 + o) o=xa1xa o = \frac{x^a}{1-x^a}

Resume solving tt

t=xan(1+x1a+x2a+) t = x^{an}(1 + x^{1a} + x^{2a} + \dots) t=xan(1+xa1xa) t = x^{an}\left(1 + \frac{x^a}{1-x^a}\right) t=xan11xa t = x^{an}\frac{1}{1-x^a}

Resume solving mm

m=xb(xan+xa(n+1)+xa(n+2)+) m = x^b ( x^{an} + x^{a(n+1)} + x^{a(n+2)} + \dots) m=xan+b1xa m = \frac{x^{an+b}}{1-x^a}

Thus

j=nxaj+b=xan+b1xa \sum_{j=n}^{\infty} x^{aj+b} = \frac{x^{an+b}}{1-x^a}

So

j=1n1xaj+b=j=1xaj+bj=nxaj+b \sum_{j=1}^{n-1} x^{aj+b} = \sum_{j=1}^{\infty} x^{aj+b} - \sum_{j=n}^{\infty} x^{aj+b} j=1n1xaj+b=xa+b1xaxan+b1xa=xa+bxan+b1xa=xa+b(1xa(n1))1xa \sum_{j=1}^{n-1} x^{aj+b} = \frac{x^{a+b}}{1-x^a} - \frac{x^{an+b}}{1-x^a} = \frac{x^{a+b} - x^{an+b}}{1-x^a} = \frac{x^{a+b}\left(1-x^{a(n-1)} \right)}{1-x^a}

For convenience, increment the value of nn by one.

j=1nxaj+b=xa+b(1xan)1xa \sum_{j=1}^{n} x^{aj+b} = \frac{x^{a+b}\left(1-x^{an} \right)}{1-x^a}

When 0b<a0 \le b < a

I’m not sure if any of that made any sense, but from my bit of verification, I believe it’s true.

As far as verification goes, it wouldn’t hurt to do so through Induction.

First the base case of n=1n=1

j=11xaj+b=xa+b \sum_{j=1}^{1} x^{aj+b} = x^{a+b} xa+b(1xa)1xa \frac{x^{a+b}\cancel{\left(1 - x^{a}\right)}}{\cancel{1-x^a}}

The base case is satisfied

The equation is valid if the following holds

xa+b(1xan)1xa+xa(n+1)+b=xa+b(1xa(n+1))1xa \frac{x^{a+b}\left(1-x^{an} \right)}{1-x^a} + x^{a(n+1)+b} = \frac{x^{a+b}\left(1-x^{a(n+1)} \right)}{1-x^a} xa+b(1xan)+xa(n+1)+b(1xa)=xa+b(1xa(n+1)) x^{a+b}\left(1-x^{an} \right) + x^{a(n+1)+b}({1-x^a}) = x^{a+b}\left(1-x^{a(n+1)} \right) xa+bxa(n+1)+b+xa(n+1)+b(1xa)=xa+bxa(n+2)+b x^{a+b} -x^{a(n+1)+b} + x^{a(n+1)+b}({1-x^a}) = x^{a+b}-x^{a(n+2) + b} xa+bxa(n+1)+b+xa(n+1)+bxa(n+2)+b=xa+bxa(n+2)+b x^{a+b} -x^{a(n+1)+b} + x^{a(n+1)+b} - x^{a(n+2)+b} = x^{a+b}-x^{a(n+2) + b} xa+bxa(n+1)+b+xa(n+1)+bxa(n+2)+b=xa+bxa(n+2)+b x^{a+b} \cancel{-x^{a(n+1)+b} + x^{a(n+1)+b}} - x^{a(n+2)+b} = x^{a+b}-x^{a(n+2) + b}

And so it has been proven.

Complex Exponentials and Trigonometric functions

Single Page

The value of the exponential function with an imaginary input is of interest.

eix=? e^{ix} = ?

Using the well known series expansion of the exponential function:

ex=n=0xnn! e^{x} = \sum_{n=0}^{\infty} \frac{x^{n}}{n!}

Substitute in imaginary constant

eix=n=0(i)nxnn! e^{ix} = \sum_{n=0}^{\infty} \frac{(i)^{n}x^n}{n!}

There is no direct way to simplify this expression as (i)n(i)^n doesn’t directly work out to anything nice. This expression is equivalent to a few other, more-useful ones.

eix=n=0(i)nxnn!=n=0(i)2nx2n(2n)!+(i)2n+1x2n+1(2n+1)!=n=0(i)4nx4n(4n)!+(i)4n+1x4n+1(4n+1)!+(i)4n+2x4n+2(4n+2)!+(i)4n+3x4n+3(4n+3)! \begin{aligned} e^{ix} &= \sum_{n=0}^{\infty} \frac{(i)^{n}x^n}{n!}\\ &= \sum_{n=0}^{\infty} \frac{(i)^{2n}x^{2n}}{(2n)!} + \frac{(i)^{2n+1}x^{2n+1}}{(2n+1)!}\\ &= \sum_{n=0}^{\infty} \frac{(i)^{4n}x^{4n}}{(4n)!} + \frac{(i)^{4n+1}x^{4n+1}}{(4n+1)!} + \frac{(i)^{4n+2}x^{4n+2}}{(4n+2)!} + \frac{(i)^{4n+3}x^{4n+3}}{(4n+3)!} \end{aligned}

Now the powers of ii can be simplified

i4n=i4n=1i4n+1=i4ni=ii4n+2=i4ni2=1i4n+3=i4ni3=i \begin{aligned} i^{4n} &= i^{4^n} = 1\\ i^{4n+1} &= i^{4n}i = i\\ i^{4n+2} &= i^{4n}i^2 = -1\\ i^{4n+3} &= i^{4n}i^3 = -i \end{aligned}

Back-substituting these into the above sum

eix=n=0x4n(4n)!+ix4n+1(4n+1)!x4n+2(4n+2)!ix4n+3(4n+3)! e^{ix} = \sum_{n=0}^{\infty}\frac{x^{4n}}{(4n)!}+i\frac{x^{4n+1}}{(4n+1)!}-\frac{x^{4n+2}}{(4n+2)!}-i\frac{x^{4n+3}}{(4n+3)!}

Remember the power series for sine and cosine

sin(x)=n=0x2n+1(1)n(2n+1)!cos(x)=n=0x2n(1)n(2n)! \begin{aligned} \sin(x) &=\sum_{n=0}^{\infty} \frac{x^{2n+1}(-1)^{n}}{(2n+1)!}\\ \cos(x) &=\sum_{n=0}^{\infty} \frac{x^{2n}(-1)^{n}}{(2n)!} \end{aligned}

Reorder series

eix=n=0x4n(4n)!x4n+2(4n+2)!+ix4n+1(4n+1)!ix4n+3(4n+3)! e^{ix} = \sum_{n=0}^{\infty}\frac{x^{4n}}{(4n)!} - \frac{x^{4n+2}}{(4n+2)!} + i \frac{x^{4n+1}}{(4n+1)!} - i\frac{x^{4n+3}}{(4n+3)!}

Split sums based on evens, and odds

eix=[n=0x4n(4n)!x4n+2(4n+2)!]+[in=0x4n+1(4n+1)!x4n+3(4n+3)!] \begin{aligned} e^{ix} &= \left[{\sum_{n=0}^{\infty}\frac{x^{4n}}{(4n)!} - \frac{x^{4n+2}}{(4n+2)!}}\right]\\ &+ \left[i\sum_{n=0}^{\infty} \frac{x^{4n+1}}{(4n+1)!} - \frac{x^{4n+3}}{(4n+3)!}\right] \end{aligned}

Notice the first sum is simply iterating over the even numbers, and the second is iterating over the odds. Simplify

eix=[n=0x2n(1)n(2n)!]+[in=0x2n+1(1)n(2n+1)!] \begin{aligned} e^{ix} &= \left[{\sum_{n=0}^{\infty}\frac{x^{2n}(-1)^n}{(2n)!}}\right]\\ &+ \left[i\sum_{n=0}^{\infty} \frac{x^{2n+1}(-1)^{n}}{(2n+1)!} \right] \end{aligned}

Notice

eix=cosx+isinx e^{ix} = \cos{x} + i\sin{x}

With Negatives

Recall these two properties of sine and cosine

sin(x)=sin(x)cos(x)=cos(x) \begin{aligned} \sin(-x) &= -\sin(x)\\ \cos(-x) &= \cos(x)\\ \end{aligned}

With that, use the exponential function with a negative imaginary number

eix=cosxisinx e^{-ix} = \cos{x} - i\sin{x}

We can now solve for cosine and sine using the exponential function.

eix+eix=2cosx e^{-ix} + e^{ix} = 2\cos{x}

cosx=eix+eix2 \cos{x} = \frac{e^{ix} + e^{-ix}}{2} eixeix=2sinx e^{ix} - e^{-ix} = 2\sin{x}

sinx=eixeix2 \sin{x} = \frac{e^{ix} - e^{-ix}}{2}

Proof by Multiplicative Inverse

Single Page

We have functions f(x),g(x),h(x)f(x), g(x), h(x).

Given h(x)f(x)=1h(x) f(x) = 1. (they are multiplicative inverses)

We would like to determine whether f(x)=g(x)f(x) = g(x).

Naturally, h(x)g(x)=1      f(x)=g(x)h(x)g(x) = 1\ \implies\ f(x) = g(x)

Application

I discovered this trick when searching for a proof to Euler’s Formula:

eit=cost+isint e^{it} = \cos{t} + i\sin{t}

We define

f(x)=eitg(x)=(cost+isint) \begin{aligned} f(x) &= e^{it}\\ g(x) &= \left(\cos{t} + i\sin{t}\right) \end{aligned}

Naturally, eith(x)=1e^{it}h(x) = 1, so

h(x)=eit h(x) = e^{-it}

So, if we can prove that h(x)g(x)=1h(x)g(x) = 1, then it is clear that f(x)=g(x)f(x)=g(x). Introduce j(x)j(x) for brevity.

h(x)g(x)=j(x)=eit(cost+isint) h(x)g(x) = j(x) = e^{-it}\left(\cos{t} + i\sin{t}\right)

Differentiate j(x)j(x)

j(x)=eit(sint+icost)ieit(cost+isint)=eit(sint+icost)+eit(icost+sint)=eit(icostsint+sinticost)=0 \begin {aligned} j'(x) &= e^{-it}\left(-\sin{t} + i\cos{t}\right) - i e^{-it}\left(\cos{t} + i\sin{t}\right)\\ &= e^{-it}\left(-\sin{t} + i\cos{t}\right) + e^{-it}\left(-i\cos{t} + \sin{t}\right)\\ &= e^{-it}\left(i\cos{t} -\sin{t} + \sin{t} -i\cos{t} \right)\\ &= 0 \end{aligned}

That is, j(x)=0j'(x) =0 for all xx, which means that j(x)j(x) is constant for all xx.

Find value of j(x)j(x)

j(0)=e0(cos0+isin0)=1 j(0) = e^{0}\left(\cos{0} + i\sin{0}\right) = 1

So, j(x)=1j(x) = 1 for all xx, which shows that g(x)g(x) is the multiplicative inverse of h(x)h(x). Given that g(x)g(x) is also the multiplicative inverse of h(x)h(x):

f(x)=g(x) f(x) = g(x)

Source: https://math.stackexchange.com/a/8612

Clever proof of solutions to linear diophantine equation

Single Page

A simple result in elementary number theory relates to the linear diophantine equation

ax+by=c ax + by = c

a,x,b,y,cZ a,x,b,y,c \in \mathbb{Z}

A property of this equation (which is not proven here) is that it has infinitely many (x,y)(x,y) solutions if cc is a multiple of gcd(a,b)\gcd(a,b), otherwise it has none.

The clever part is, after finding the first solution we can find the rest. Suppose there exists a solution (x,y)(x,y), and that (x,y)(x',y') is another solution:

c=ax+by=ax+by c = ax+by = ax'+by'

Rearrange equation

a(xx)=b(yy) a(x-x') = -b(y-y')

Let d=gcd(a,b)d = \gcd(a,b). Naturally, aa and bb are both divisible by dd. Divide by dd

ad(xx)=bd(yy) \frac{a}{d}(x-x') = -\frac{b}{d}(y-y')

Now, a/da/d and b/db/d share no common factors, therefor a/da/d does not divide b/db/d and b/db/d does not divide a/ba/b. Note however that b/db/d does divide the right side of the equation, and therefor must divide the left side of the equation. Because we already determined that b/db/d does not divide a/da/d, b/db/d must divide (xx)(x-x'), thus (xx)(x-x') must be a multiple of b/db/d (likewise (yy)(y-y') is a multiple of a/da/d).

State that (xx)(x-x') is a multiple of b/db/d in a new equation:

bnd=xx \frac{bn}{d} = x - x'

Likewise of yy

and=yy \frac{an}{d} = y - y'

Thus, given the initial solutions of x,yx,y, the other solutions are found as:

bnd+x=x \frac{bn}{d}+x = x'

and+y=y \frac{an}{d}+y = y'

This proof is not complete but highlights the clever trick of extracting an equation based on divisibility. It comes down to the (often subtle) fact that when xx divides yy, y=xqy=xq.

Complex Difference of Squares

Single Page

Sometimes the solution to math puzzles lies in the difference off squares identity, x2y2=(x+y)(xy)x^2-y^2 = (x+y)(x-y). I’ve often thought that it’s a shame how there is no similar identity for x2+y2x^2+y^2, but… there is!

x2+y2=(x+iy)(xiy) x^2+y^2 = (x+iy)(x-iy)

Where ii is the imaginary constant.