A funny looking log identity

December 9, 2024 math and physics play No comments

[Click here for a PDF version of this post]

On twitter, I saw a funny looking identity
\begin{equation}\label{eqn:logab:20}
\log_{ab} x = \frac{ \log_a x \log_b x}{\log_a x + \log_b x}.
\end{equation}

To verify this, let
\begin{equation}\label{eqn:logab:40}
\begin{aligned}
u &= \log_a x \\
v &= \log_b x.
\end{aligned}
\end{equation}

This means that
\begin{equation}\label{eqn:logab:60}
\log_{ab} x = \log_{ab} a^u = \log_{ab} b^v.
\end{equation}

We may rewrite either of these in terms of \( a b \), for example
\begin{equation}\label{eqn:logab:80}
\begin{aligned}
\log_{ab} x
&= \log_{ab} b^v \\
&= v \log_{ab} b \\
&= v \log_{ab} \frac{ab}{a} \\
&= v \lr{ 1 – \log_{ab} a },
\end{aligned}
\end{equation}
so
\begin{equation}\label{eqn:logab:100}
u \log_{ab} a = v \lr{ 1 – \log_{ab} a },
\end{equation}
or
\begin{equation}\label{eqn:logab:120}
\lr{ u + v } \log_{ab} a = v,
\end{equation}
or
\begin{equation}\label{eqn:logab:140}
u \log_{ab} a = \frac{u v}{u + v},
\end{equation}
and since \( x = a^u \), our proof is complete.

Area within closed boundary

August 11, 2024 math and physics play , , , , , ,

[Click here for a PDF version of this post]

Motivation.

On vacation I was reading some more of [1]. It was mentioned in passing that the area contained within a closed parameterized curve is given by
\begin{equation}\label{eqn:containedArea:20}
A = \inv{2} \int_{t_0}^{t_1} \lr{x y’ – y x’} dt,
\end{equation}
where \( x = x(t), y = y(t), t \in [t_0, t_1] \). This has the look of a Stokes theorem coordinate expansion (specifically, the Green’s theorem special case of Stokes’), but with somewhat mysterious looking factor of one half out in front. My aim in this post is to understand the origins of this area relationship, and play with it a bit.

Circular coordinates example.

The book suggests that the reader verify this for a circular parameterization, so we’ll do that here too.

Let
\begin{equation}\label{eqn:containedArea:40}
\begin{aligned}
x(t) &= r \cos t \\
y(t) &= r \sin t,
\end{aligned}
\end{equation}
where \( t \in [0, 2 \pi] \). Plugging in this, we have
\begin{equation}\label{eqn:containedArea:60}
\begin{aligned}
A
&= \inv{2} \int_0^{2 \pi} \lr{ r \cos t \lr{ r \cos t } – r \sin t \lr{ – r \sin t } } dt \\
&= \frac{r^2}{2} \int_0^{2 \pi} \lr{ \cos^2 t + \sin^2 t } dt \\
&= \frac{2 \pi r^2}{2} \\
&= \pi r^2.
\end{aligned}
\end{equation}
This simple example works out.

Piecewise linear parametrization example.

One parameterization of the unit parallelogram depicted in fig. 1 is

\begin{equation}\label{eqn:containedArea:340}
\begin{aligned}
(x,y) &= (t, 0),\quad t \in [0,1] \\
&= (t, t – 1),\quad t \in [1,2] \\
&= (4 – t, 1),\quad t \in [2,3] \\
&= (4 – t, 4 – t),\quad t \in [3,4]
\end{aligned}
\end{equation}

fig. 1. Parallelogram with unit area.

fig. 1. Parallelogram with unit area.

Respective evaluating of \( x y’ – y x’ \) in each of these regions gives
\begin{equation}\label{eqn:containedArea:360}
\begin{aligned}
(t) (0) – (0)(0) &= 0 \\
(t) (1) – (t-1)(1) &= 1 \\
(4-t)(0) – (1)(-1) &= 1 \\
(4-t)(-1) – (4-t)(-1) &= 0,
\end{aligned}
\end{equation}
and integrating
\begin{equation}\label{eqn:containedArea:380}
\inv{2} \int_0^4 \lr{ x y’ – y x’} dt = \frac{2}{2} = 1,
\end{equation}
as expected. In this example, the directional derivative is not continuous at the corners of the parallelogram, but that is not a requirement (as it should not be, as the area is well defined despite any corners.)

Can we discover this relationship using the Jacobian?

Graphically, I can imagine that we could find this area relationship, by considering a parameterization of a family of nested closed curves, as depicted in fig. 2.

fig. 2. Family of nested closed curves.

fig. 2. Family of nested closed curves.

For such a parameterization, calculating the area is just a Jacobian evaluation
\begin{equation}\label{eqn:containedArea:80}
\begin{aligned}
A
&= \iint \frac{\partial(x, y)}{\partial(u,t)} du dt \\
&= \iint \lr{ \PD{u}{x} \PD{t}{y} – \PD{u}{y} \PD{t}{x} } du dt \\
&= \iint \lr{ \PD{u}{x} y’ – \PD{u}{y} x’ } du dt.
\end{aligned}
\end{equation}
Let’s try to eliminate the \( u \) derivatives using integration by parts, and see what we get.
\begin{equation}\label{eqn:containedArea:100}
\begin{aligned}
A
&= \iint \lr{ \PD{u}{x} y’ – \PD{u}{y} x’ } du dt \\
&= \iint \frac{d}{du} \lr{ x y’ – y x’ } du dt – \iint \lr{ x \PD{u}{y’} – y \PD{u}{x’} } du dt \\
&= \int \lr{ x y’ – y x’ } dt – \iint \lr{ x \PD{u}{y’} – y \PD{u}{x’} } du dt.
\end{aligned}
\end{equation}
This is interesting, as we find the area equation that we are interested (times two), but we have a strange new area equation. Essentially, we have found, assuming we trust the claim in the book, that
\begin{equation}\label{eqn:containedArea:120}
A = 2 A – \iint \lr{ x \PD{u}{y’} – y \PD{u}{x’} } du dt,
\end{equation}
so it seems that the area can also be expressed as
\begin{equation}\label{eqn:containedArea:140}
A = \iint \lr{ x \frac{\partial^2 y}{\partial u \partial t} – y \frac{\partial^2 x}{\partial u \partial t} } du dt.
\end{equation}
Let’s again use the circular parameterization to verify that this works. I won’t try to prove this directly, but instead, we’ll use Stokes’ theorem to prove the stated result, from which we get this second derivative area formula as a side effect by virtue of our integration by parts expansion above.

For the circular parameterization, we have
\begin{equation}\label{eqn:containedArea:160}
\begin{aligned}
A
&= \int_{r = 0}^R dr \int_{t = 0}^{2 \pi} dt \lr{ x \frac{\partial^2 y}{\partial r \partial t} – y \frac{\partial^2 x}{\partial r \partial t} } \\
&= \int_{r = 0}^R dr \int_{t = 0}^{2 \pi} dt \lr{ r \cos t \frac{\partial \sin t}{\partial t} – r \sin t \frac{\partial \cos t}{\partial t} } \\
&= \int_{r = 0}^R r dr \int_{t = 0}^{2 \pi} dt \lr{ \cos^2 t + \sin^2 t } \\
&= \frac{R^2}{2} 2 \pi \\
&= \pi R^2.
\end{aligned}
\end{equation}
This checks out, at least for this one specific circular parameterization.

Area formula derivation using Stokes’ theorem.

Theorem 1.1: Green’s theorem.

\begin{equation}\label{eqn:containedArea:260}
\iint dx dy \lr{ \PD{x}{M} – \PD{y}{L} } = \oint L dx + M dy.
\end{equation}

Start proof:

We start with the general two parameter integration theorem
\begin{equation}\label{eqn:containedArea:180}
\iint F d^2 \Bx \lrpartial G = -\oint F d\Bx G,
\end{equation}
set \( F = 1, G = \Bf \), and apply scalar selection
\begin{equation}\label{eqn:containedArea:200}
\iint \gpgradezero{ d^2 \Bx \lrpartial \Bf } = -\oint d\Bx \cdot \Bf,
\end{equation}
to find the two parameter form of Stokes’ theorem
\begin{equation}\label{eqn:containedArea:220}
\iint d^2 \Bx \cdot \lr{ \spacegrad \wedge \Bf } = -\oint d\Bx \cdot \Bf,
\end{equation}

With a planar parameterization, say \( \Bf = L \Be_1 + M \Be_2 \), we have \( d\Bx \cdot \Bf = L dx + M dy \), and for the LHS
\begin{equation}\label{eqn:containedArea:240}
\begin{aligned}
\iint d^2 \Bx \cdot \lr{ \spacegrad \wedge \Bf }
&=
\iint dx dy \Be_{12}^2
\begin{vmatrix}
\partial_1 & \partial_2 \\
L & M
\end{vmatrix} \\
&=
-\iint dx dy \lr{ \PD{x}{M} – \PD{y}{L} }.
\end{aligned}
\end{equation}

End proof.

Parameterized area equation.

If we wish to evaluate an elementary area, we can pick \( L, M \) such that \( \PDi{x}{M} – \PDi{y}{L} = 1 \). One such selection is
\begin{equation}\label{eqn:containedArea:280}
\begin{aligned}
M &= \frac{x}{2} \\
L &= -\frac{y}{2},
\end{aligned}
\end{equation}
so
\begin{equation}\label{eqn:containedArea:300}
A = \inv{2} \oint -y dx + x dy = \inv{2} \int \lr{ x y’ – y x’ } dt.
\end{equation}
Clearly, there are other possible choices of \( L, M \) that we could use to find alternate area equations, but this choice seems to be independent of the shape of the region.

References

[1] F.W. Byron and R.W. Fuller. Mathematics of Classical and Quantum Physics. Dover Publications, 1992.

Hyperbolic sine representation of mth Fibonacci number

July 26, 2024 math and physics play , , , , ,

[Click here for a PDF version of this post]

I saw a funky looking formula for the mth Fibonacci number on twitter
\begin{equation}\label{eqn:fibonacci_sinh:20}
F_m = \frac{2}{\sqrt{5} i^m} \sinh\lr{ m \ln\lr{i\phi} },
\end{equation}
where
\begin{equation}\label{eqn:fibonacci_sinh:60}
\phi = \frac{ 1 + \sqrt{5} }{2},
\end{equation}
is the golden ratio.

This certainly doesn’t look like it’s a representation of the sequence
\begin{equation}\label{eqn:fibonacci_sinh:40}
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, \cdots
\end{equation}
We can verify that it works in Mathematica, as seen in fig. 1.

fig. 1. Verification of hyperbolic sine representation of mth Fibonacci numbe

Recall that we previously found this formula for the mth Fibonacci number
\begin{equation}\label{eqn:fibonacci_sinh:80}
F_m = \inv{\sqrt{5}} \lr{ \phi^m – { \bar{\phi}}^m },
\end{equation}
where \( \bar{\phi} \) is the conjugate of the golden ratio
\begin{equation}\label{eqn:fibonacci_sinh:100}
\bar{\phi} = \frac{ 1 – \sqrt{5} }{2}.
\end{equation}

Let’s see how these are equivalent. First observe that the golden conjugate is easily related to the inverse of the golden ratio
\begin{equation}\label{eqn:fibonacci_sinh:120}
\begin{aligned}
\inv{\phi}
&=
\frac{2}{1 + \sqrt{5}} \\
&=
\frac{2\lr{ 1 – \sqrt{5}} }{1^2 – \lr{\sqrt{5}}^2 } \\
&=
-\frac{1 – \sqrt{5} }{2} \\
&=
-\bar{\phi}.
\end{aligned}
\end{equation}
Substitution gives
\begin{equation}\label{eqn:fibonacci_sinh:140}
F_m = \inv{\sqrt{5}} \lr{ \phi^m – \lr{\frac{-1}{\phi}}^m }.
\end{equation}
Multiplying by \( i^m \), we have
\begin{equation}\label{eqn:fibonacci_sinh:160}
\begin{aligned}
i^m F_m
&= \inv{\sqrt{5}} \lr{ i^m \phi^m – \inv{(-i)^m} \lr{\frac{-1}{\phi}}^m } \\
&= \inv{\sqrt{5}} \lr{ \lr{ i \phi} ^m – \lr{i \phi}^{-m} } \\
\end{aligned}
\end{equation}

We can write any exponent in terms of \( e \)
\begin{equation}\label{eqn:fibonacci_sinh:180}
a^m = e^{\ln a^m} = e^{m \ln a},
\end{equation}
so
\begin{equation}\label{eqn:fibonacci_sinh:200}
\begin{aligned}
i^m F_m
&= \inv{\sqrt{5}} \lr{ e^{m \ln \lr{ i \phi}} – e^{-m \ln\lr{i \phi} } } \\
&= \inv{\sqrt{5}} 2 \sinh\lr{ m \ln \lr{ i \phi } },
\end{aligned}
\end{equation}
as we wanted to show. It’s a bit strange looking, but we see why it works.

A fun cube root simplification problem.

July 14, 2024 math and physics play , , , , , ,

[Click here for a PDF version of this post]

I saw a thumbnail of a cube root simplification problem on youtube, and tried it myself before watching the video. I ended up needing two hints from the video to solve the problem.  The problem was to simplify
\begin{equation}\label{eqn:cuberootsimplify:20}
x = \lr{ \sqrt{5} – 2 }^{1/3}.
\end{equation}
My guess was that the solution was of the form
\begin{equation}\label{eqn:cuberootsimplify:40}
x = a \sqrt{5} + b,
\end{equation}
where \(a,b\) are rational numbers. I say that because, if we cube that expression for \(x\) we get
\begin{equation}\label{eqn:cuberootsimplify:60}
x^3 = a^3 5 \sqrt{5} + 15 a^2 b + 3 \sqrt{5} a b^2 + b^3,
\end{equation}
so if we can find rational solutions to the system
\begin{equation}\label{eqn:cuberootsimplify:80}
\begin{aligned}
\sqrt{5} \lr{ 5 a^3 + 3 a b^2 } &= \sqrt{5} \\
15 a^2 b + b^3 &= -2.
\end{aligned}
\end{equation}
My problem now was that this doesn’t look like it’s particularly easy to solve. Mathematica can do it easily, as shown in fig. 1.

fig. 1. Mathematica simultaneous rational cubic reduction.

But if I wanted to cheat, I can just ask Mathematica to simplify the expression, as in fig. 2

fig. 2. Direct Mathematica simplification.

So, back to the drawing board. One thing that we can notice is that the expression in the cube root, looks like it could be recast in terms of a difference of squares
\begin{equation}\label{eqn:cuberootsimplify:100}
\sqrt{5} – 2 = \sqrt{5} – \sqrt{4}.
\end{equation}
Let’s let \( a = \sqrt{5}, b = \sqrt{4} \), so that
\begin{equation}\label{eqn:cuberootsimplify:120}
\begin{aligned}
\sqrt{5} – \sqrt{4} &=
a – b \\
&= \frac{a^2 – b^2}{a + b} \\
&= \frac{5 – 4}{\sqrt{5} + \sqrt{4} }.
\end{aligned}
\end{equation}
This shows that we have a sort of “conjugate” relationship for this difference
\begin{equation}\label{eqn:cuberootsimplify:140}
\sqrt{5} – 2 = \inv{\sqrt{5} + 2}.
\end{equation}
Surely this can be exploited somehow in the simplification process. I was stumped at this point, and didn’t see where to go with this, so I cheated a different way (not using Mathematica this time) and looked at the video to see where he went with it. Sure enough, he used these related pairs, and let
\begin{equation}\label{eqn:cuberootsimplify:160}
\begin{aligned}
x &= \lr{ \sqrt{5} – 2 }^{1/3} \\
y &= \lr{ \sqrt{5} + 2 }^{1/3}.
\end{aligned}
\end{equation}
Without looking further, let’s see what we can do with these. Clearly, we’d like to cube them, so that we seek solutions to
\begin{equation}\label{eqn:cuberootsimplify:180}
\begin{aligned}
x^3 &= \sqrt{5} – 2 \\
y^3 &= \sqrt{5} + 2.
\end{aligned}
\end{equation}
Sums and differences look like they would be interesting
\begin{equation}\label{eqn:cuberootsimplify:200}
\begin{aligned}
x^3 + y^3 &= 2 \sqrt{5} \\
y^3 – x^3 &= 4.
\end{aligned}
\end{equation}
We’ve also seen that
\begin{equation}\label{eqn:cuberootsimplify:220}
x y = 1,
\end{equation}
so just like the initial guess problem, we are left with having to solve two simulateous cubics, but this time the cubics are simpler, and we have a constraint condition that should be helpful.
My next guess was to form the cubes of \( x \pm y \), and use our constraint equation \( x y = 1 \) to simplify that. We find
\begin{equation}\label{eqn:cuberootsimplify:240}
\begin{aligned}
\lr{ x + y }^3
&= x^3 + 3 x^2 y + 3 x y^2 + y^3 \\
&= 2 \sqrt{5} + 3 \lr{ x + y} x y \\
&= 2 \sqrt{5} + 3 \lr{ x + y },
\end{aligned}
\end{equation}
and
\begin{equation}\label{eqn:cuberootsimplify:260}
\begin{aligned}
\lr{ y – x }^3
&= y^3 – 3 y^2 x + 3 y x^2 – x^3 \\
&= 4 – 3 \lr{ y – x } x y \\
&= 4 – 3 \lr{ y – x }.
\end{aligned}
\end{equation}
We can now let \( u = x + y, v = y – x \), and have a pair of independent equations to solve
\begin{equation}\label{eqn:cuberootsimplify:280}
\begin{aligned}
u^3 &= 2 \sqrt{5} + 3 u \\
v^3 &= 4 – 3 v.
\end{aligned}
\end{equation}
However, we still have cubic equations to solve, neither of which look particularly fun to reduce. I went around in circles from here and didn’t make much headway, and eventually went back to the video to see what he did. He ended up with an equivalent to my equation for \( v \) above, but I actually got there much more directly (my \( v \) was his \( -u \), so the exact steps he used differed.) His basic technique was to note that \( 4 = 3 + 1 \) so he looked for factors with \( 3 \) and \( 1 \) terms. In my case, that is equivalent to the observation that \( v = 1 \) is a root to the cubic in \( v \). So, we want to factor out \( v – 1 \) from
\begin{equation}\label{eqn:cuberootsimplify:300}
v^3 + 3 v – 4 = 0,
\end{equation}
Long dividing this by \( v -1 \) gives
\begin{equation}\label{eqn:cuberootsimplify:320}
\lr{ v – 1 } \lr{ v^2 + v + 4 } = 0.
\end{equation}
Completing the square for the quadratic factor gives
\begin{equation}\label{eqn:cuberootsimplify:340}
\lr{v + \inv{2} }^2 = -4 – \inv{4},
\end{equation}
which has only complex solutions (and we want a positive real solution.) Equating the remaining factor to zero, and reminding ourselves about our \( x y \) constraint, we are now left with
\begin{equation}\label{eqn:cuberootsimplify:360}
\begin{aligned}
v = y – x &= 1,
x y &= 1.
\end{aligned}
\end{equation}
Solving both for \( y \) gives
\begin{equation}\label{eqn:cuberootsimplify:380}
y = x + 1 = \inv{x},
\end{equation}
or
\begin{equation}\label{eqn:cuberootsimplify:400}
x^2 + x = 1,
\end{equation}
or
\begin{equation}\label{eqn:cuberootsimplify:420}
\lr{ x + \inv{2} }^2 = 1 – \inv{4} = \frac{5}{4}.
\end{equation}
We are left with two possible solutions for \( x \)
\begin{equation}\label{eqn:cuberootsimplify:440}
x = -\inv{2} \pm \frac{\sqrt{5}}{2},
\end{equation}
and we can now discard the negative solution, and find
\begin{equation}\label{eqn:cuberootsimplify:460}
x = \frac{ \sqrt{5} – 1 }{2},
\end{equation}
matching the answer that we’d found with the Mathematica cheat earlier.

Seeing the effort required to simplify this makes me impressed once again with Mathematica. I wonder what algorithm it uses to do the simplification?

Quantum Man, Richard Feynman’s Life in Science, by Lawrence Krauss.

July 13, 2024 Reviews , , ,

I just finished “Quantum Man”, Richard Feynman’s Life in Science, by Lawrence Krauss.
 
I finished Gleick’s Genius recently.  When I finished that I thought I’d read all the Feynman biographies and autobiographies.  However, I heard Krauss mention his Feynman bio on his origins podcast, a book that was not just a book on Feynman, but on Feynman’s science.  I’m very pleased that the Toronto Public Library is finally operational again after the hacking fiasco last year, and was able to get this book to read with only a couple days wait.
A large part of this book isn’t a biography of Feynman, but the story of the creation of quantum electrodynamics.  From a technical (physics) perspective, I know little bits of that story, certainly not as much as I would like.  This book described a number of the key problems and solutions that were dealt with in the evolution of this science.  Should I ever find the time to study more of the physics of QED, which I’d like to do, having read this story will provide some useful context.
There are a lot of tricky details of the theory that are explained in this book in an accessible way.  I thought the description of positrons as electrons moving backwards in time was especially well done, possibly because it was set in the context of forward and backward time processes in classical electrodynamics.  It seems clear that forward and backwards propagators are really the interesting character hiding behind the curtain here (but the book didn’t include any of the mathematics that would confirm that.)  In a number of places, Krauss did a remarkable job of describing complex and abstract mathematical ideas in a way that was accessible.

A book on Feynman can’t just be about his physics, but also about the man.  There were lots of examples of that here too, with lots to keep the reader laughing and amused.  Here’s a characteristic quote from the book that I found particularly funny:

one of the items brought up in the divorce proceedings was telling.  She reported, “He begins working calculus problems in his head as soon as he awakens.  He did calculus while driving his car, while sitting in the living room and while lying in bed at night”
… all in all, this was a highly enjoyable book.