text:
Following Einstein: deriving Riemannian metric on the Poincaré disk

There is no geometry without metry. That is, without metric. It was Bernhard Riemann who gave the foundations to what we call today “Riemannian geometry”. When Einstein learned Rimennian geometry, he was able to compete with smart mathematicians and lay the foundations of the theory of gravitation – the General Relativity Theory.
[latexpage]

“[In 1912] I suddenly realized that Gauss’s theory of surfaces holds the key for unlocking this mystery. I realized that Gauss’s surface coordinates had a profound significance. However, I did not know at that time that Riemann had studied the foundations of geometry in an even more profound way. I suddenly remembered that Gauss’s theory was contained in the geometry course given by Geiser when I was a student… I realized that the foundations of geometry have physical significance. My dear friend the mathematician Grossmann was there when I returned from Prague to Zürich. From him I learned for the first time about Ricci and later about Riemann. So I asked my friend whether my problem could be solved by Riemann’s theory [Pais’s italics], namely, whether the invariants of the line element could completely determine the quantities I had been looking for.”

Albert Einstein, as quoted by Abraham Pais in Subtle is the Lord, Pais’s scientific biography of Einstein.

So, it is time for us to get familiar with this “line element“. Here it is, written with the hand of Albert Einstein himself, probably in 1913, in his Zurich notebook:

We want to find our “line element” on the disk. Equivalently: we want to find the metric tensor $G_{\mu\nu}.$

That is, when from a point with disk coordinates $(x,y)$ we make a small step, and arrive at the point with coordinates $(x+dx,y+dy)$ what will be the length $ds$ of this step? If the geometry were Euclidean, and our coordinates were Cartesian, rectangular, the answer would be simple: $ds^2=dx^2+dy^2$ from the Pythagoras formula. But our geometry is non-Euclidean. And we want our step length to be invariant under SU(1,1) transformations, which are non-linear on the disk. What to do?

We do what Einstein did in 1912

We calculate. By the way: as we can learn from History of General Relativity and Gravitation, on his way to General Theory of Relativity Einstein was making errors

Two fundamental errors led Einstein to reject generally covariant gravitational field equations for over two years as he was developing his general theory of relativity. The first is now well known. It was the presumption that weak, static gravitational fields must be spatially flat and a corresponding assumption about his weak field equations. I conjecture that a second hitherto unrecognized error also defeated Einstein’s efforts: he unwittingly reified his spacetime coordinate systems. The same error, months later, allowed the hole argument to convince Einstein that all generally covariant gravitational field equations would be physically uninteresting.

While doing our calculations we will try to avoid errors, at least those computational. We will listen to Gottfried Leibniz who, as mentioned in the last note, has made this advice:

“It is unworthy of excellent men to lose hours like slaves in the labor of calculation which could be relegated to anyone else if machines were used.”

Again we will use a machine, though a different one than in From SU(1,1) to the Lorentz group.

As we have learned in From SU(1,1) to the Lorentz group, a point $(x,y)$ on the disk determines a point $(X,Y,T)$ on the hyperboloid in three-dimensional space-time

When we are making a small step $(dx,dy)$ on the disk, we are making also a small step $(dX,dY,dT)$ on the hyperboloid. Well, I am joking. When our step on the disk is very close to the boundary, the corresponding step on the hyperboloid can be “huge”. What I really mean is: when we make an infinitesimally small step …. The concept of an infinitesimally small step belongs to the calculus, and I will assume that we know how to use the elementary calculus concepts.

In the the previous post we used the formulas expressing $(X,Y,T)$ as functions of $(x,y)$:

\begin{eqnarray}
X&=&\frac{2x}{1-x^2-y^2},\\
Y&=&\frac{2y}{1-x^2-y^2},\\
T&=&\frac{1+x^2+y^2}{1-x^2-y^2}.
\end{eqnarray}

From these formulas we can calculate $(dX,dY,dT)$ in terms of $(dx,dy)$ according to the following general prescription
\begin{eqnarray}
dX&=&\frac{\partial X}{\partial x}dx+\frac{\partial X}{\partial y}dy,\\
dY&=&\frac{\partial Y}{\partial x}dx+\frac{\partial Y}{\partial y}dy,\\
dT&=&\frac{\partial T}{\partial x}dx+\frac{\partial T}{\partial y}dy.
\end{eqnarray}

We can do these calculations by hand, but that would be unworthy of excellent men. Machine will do it for us. Once we know $(dX,dY,dT)$ we can calculate the corresponding line element using the formula of special relativity, a generalization of the Pythagoras law from space to space-time. I our case it is now convenient to chose the signature $(+1,+1,-1)$ then
$$ds^2=dX^2+dY^2-dT^2.$$

I let Maxima to do the calculations using this code:

X(x,y):=2*x/(1-x^2-y^2);
Y(x,y):=2*y/(1-x^2-y^2);
T(x,y):=(1+x^2+y^2)/(1-x^2-y^2);
factor(ratsimp(
(diff(X(x,y),x)*dx+diff(X(x,y),y)*dy)^2+
(diff(Y(x,y),x)*dx+diff(Y(x,y),y)*dy)^2-
(diff(T(x,y),x)*dx+diff(T(x,y),y)*dy)^2);

If you want, save this code as a file, say, “ds2.mac”. Install and run wxMaxima, use File/Batch File … to load the code. The answer is produced immediately:

$$ds^2=\frac{4(dx^2+dy^2)}{(1-x^2-y^2)^2}.$$

And that is the famous line element of hyperbolic geometry – see Metric and volume element on the Poincaré disk on Wikipedia.

We will yet have to find out what can we do with it? Lot of things. We can find geodesics (we have already guessed what they are), curvature …. Yes, our disk is curved even if it does not look so.


text:
Precalculus : Solve Trigonometric Equations and Inequalities

Example Questions

Example Question #1 : Solving Trigonometric Equations And Inequalities

Use trigonometric identities to solve the following equation for :

Explanation:

Use the trigonometric identities to switch sec into terms of tan:

hence,

So we have , making

Therefore the solution is  for n being any integer.

Example Question #1 : Solving Trigonometric Equations And Inequalities

Which of the following is not a solution to   for

Explanation:

We begin by setting the right side of the equation equal to 0.

The equation might be easier to factor using the following substitution.

This gives the following

This can be factored as follows

Therefore

Replacing our substitution therefore gives

Within our designated domain, we get three answers between our two equations.

when

when

Therefore, the only choice that isn't correct is

Example Question #15 : Trigonometric Identities

Find one possible value of .

Explanation:

Begin by isolating the tangent side of the equation:

Next, take the inverse tangent of both sides:

Divide by five to get the final answer:

Example Question #16 : Trigonometric Identities

Use trigonometric identities to solve for the angle value.

Explanation:

There are two ways to solve this problem. The first involves two trigonometric identities:

The second method allows us to only use the first trigonometric identity:

Example Question #1 : Solve Trigonometric Equations And Inequalities

Use trigonometric identities to solve the equation for the angle value.

format: plain


text:
# What is Man in the Middle Attack and Techniques of Deployment

January 30, 2018

Security is kept at the topmost priority when it comes in the field of networking and communications. Surfing the internet through untrustworthy public networks (whether wired or wireless) has been known to be risky for a long time now. We all think twice before logging into our bank account or accessing any kind of sensitive information. this topic is helps to understand the man-in-the-middle attack.

### Overview of man-in-the-middle attack

A man-in-the-middle attack is a type of cyberattack where a malicious actor inserts him/herself into a conversation between two parties, impersonates both parties and gains access to information that the two parties were trying to send to each other. A man-in-the-middle attack allows a malicious actor to intercept, send and receive data meant for someone else, or not meant to be sent at all, without either outside party knowing until it is too late. MITM attacks are relatively uncommon in the wired Internet, since there are very few places where an attacker can insert itself between two communicating terminals and remain undetected. For wireless links, however, the situation is quite different. Unless proper security is maintained on wireless last hop links, it can be fairly easy for an attacker to insert itself, depending on the nature of the wireless link layer protocol.

Man-in-the-middle (MITM) attacks occur when the attacker manages to position himself between the legitimate parties to a conversation. The attacker spoofs the opposite legitimate party so that all parties believe they are actually talking to the expected other, legitimate parties. Following are the Key concept of the Man in the Middle Attack:

• Man-in-the-middle is a type of eavesdropping attack that occurs when a malicious actor inserts himself as a relay/proxy into a communication session between people or systems.
• A MITM attack exploits the real-time processing of transactions, conversations or transfer of other data.
• Man-in-the-middle attacks allow attackers to intercept, send and receive data never meant to be for them without either outside party knowing until it is too late.

Example

For example, ABC and XYZ are communicating. And there is King, the attacker, who eavesdrops their conversation. King is the man-in-the-middle and in this case he performs passive attack. Instead, if King interferes with the conversation and sends message to ABC while pretending to be XYZ and sends message to XYZ while pretending to be ABC, he performs an active attack in which ABC and XYZ do not know that the message they receive is not from the real person.

figure 1 Man-in-the-Middle Attack example

### Man-in-the-Middle Attack Techniques

Sniffing

Attackers use packet capture tools to inspect packets at a low level. Using specific wireless devices that are allowed to be put into monitoring or promiscuous mode can allow an attacker to see packets that are not intended for it to see, such as packets addressed to other hosts.

Packet Injection

An attacker can also leverage their device’s monitoring mode to inject malicious packets into data communication streams. The packets can blend in with valid data communication streams, appearing to be part of the communication, but malicious in nature. Packet injection usually involves first sniffing to determine how and when to craft and send packets.

Session Hijacking

Most web applications use a login mechanism that generates a temporary session token to use for future requests to avoid requiring the user to type a password at every page. An attacker can sniff sensitive traffic to identify the session token for a user and use it to make requests as the user. The attacker does not need to spoof once he has a session token.

SSL Stripping

Since using HTTPS is a common safeguard against ARP or DNS spoofing, attackers use SSL stripping to intercept packets and alter their HTTPS-based address requests to go to their HTTP equivalent endpoint, forcing the host to make requests to the server unencrypted. Sensitive information can be leaked in plain text.

### Different Types of Man in the Middle attack

As you imagine, there is complexity in the subject and there is not just simply ‘one type of Man in the Middle attack’ – rather, the term is used to describe a category of attack. Here are a few types of MITM attacks:

• ARP poisoning
• Wi-Fi WEP/ WPA/2 Hacking
• DNS spoofing
• STP mangling
• Port stealing

### References

[1] Man in the Middle (MITM) Attack: Man-in-the-Middle Tutorial: Learn About Man-in-the-Middle Attacks, Vulnerabilities and How to Prevent MITM Attacks, available online at: https://www.veracode.com/security/man-middle-attack

[2] Subodh Gangan, “A review of man-in-the-middle attacks.” arXiv preprint arXiv: 1504.02115 (2015).

[3] “Man-in-the-Middle (MITM) Attacks”, available online at: https://www.rapid7.com/fundamentals/man-in-the-middle-attacks/

[4] Jesudoss A, and Subramaniam N.P, A Survey on Authentication Attacks and Countermeasures in a Distributed Environment, Indian Journal of Computer Science and Engineering (IJCSE), Volume 5 Number 2 Apr-May 2014

$${}$$


text:
# How do I apply a single iteration of Floyd's algorithm to an adjacency matrix? [closed]

I have the following adjacency matrix for a graph with nodes {a,b,c,d}:

\begin{bmatrix} & & a& b& c& d\\ & & & & & \\ a& & 0& 1& 100& 10\\ b& & 13& 0& 2& 100\\ c& & 100& 12& 0& 3\\ d& & 4& 100& 11& 0 \end{bmatrix} I want to apply the Warshall-Floyd algorithm. I can do this since I know it computes the shortest paths between each pair of nodes. By manually calculating each individual entry, I get the final matrix:

\begin{bmatrix} & & a& b& c& d\\ & & & & & \\ a& & 0& 1& 3& 6\\ b& & 9& 0& 2& 5\\ c& & 7& 8& 0& 3\\ d& & 4& 5& 7& 0 \end{bmatrix}

My question is this: how can I draw the matrix after each 'iteration' of the algorithm? What qualifies as a single iteration and what does the matrix look like after iteration 1?

## closed as unclear what you're asking by David Richerby, Luke Mathieson, Juho, lPlant, Nicholas MancusoMay 26 '15 at 0:11

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• What have you tried? Did you find the pseudocode for Floyd-Warshall? Did you try running the pseudocode by hand? Is there something specific you are confused about? – D.W. May 19 '15 at 18:19


text:
# American Institute of Mathematical Sciences

June  2020, 28(2): 1107-1121. doi: 10.3934/era.2020061

## Generating geometric body shapes with electromagnetic source scattering techniques

 1 Department of Mathematics, Hong Kong Baptist University, Kowloon, Hong Kong SAR, China 2 School of Mathematics and Statistics, Qilu University of Technology (Shandong Academy of Sciences), Jinan 250353, Shandong, China 3 School of Economics, Changchun University of Finance and Economics, Changchun 130122, Jilin, China 4 Department of Mathematics, City University of Hong Kong, Kowloon, Hong Kong SAR, China 5 School of Astronautics, Harbin Institute of Technology, Harbin 150001, Heilongjiang, China

* Corresponding author: Xianchao Wang

Received  May 2020 Revised  May 2020 Published  June 2020

In this paper, we are concerned with the three-dimensional (3D) geometric body shape generation with several well-selected characteristic values. Since 3D human shapes can be viewed as the support of the electromagnetic sources, we formulate a scheme to regenerate 3D human shapes by inverse scattering theory. With the help of vector spherical harmonics expansion of the magnetic far field pattern, we build on a smart one-to-one correspondence between the geometric body space and the multi-dimensional vector space that consists of all coefficients of the spherical vector wave function expansion of the magnetic far field pattern. Therefore, these coefficients can serve as the shape generator. For a collection of geometric body shapes, we obtain the inputs (characteristic values of the body shapes) and the outputs (the coefficients of the spherical vector wave function expansion of the corresponding magnetic far field patterns). Then, for any unknown body shape with the given characteristic set, we use the multivariate Lagrange interpolation to get the shape generator of this new shape. Finally, we get the reconstruction of this unknown shape by using the multiple-frequency Fourier method. Numerical examples of both whole body shapes and human head shapes verify the effectiveness of the proposed method.

Citation: Youzi He, Bin Li, Tingting Sheng, Xianchao Wang. Generating geometric body shapes with electromagnetic source scattering techniques. Electronic Research Archive, 2020, 28 (2) : 1107-1121. doi: 10.3934/era.2020061
##### References:
 [1] D. Anguelov, P. Srinivasan, D. Koller, S. Thrun, J. Rodgers and J. Davis, SCAPE: Shape completion and animation of people, ACM Transactions on Graphics (TOG), 24 (2005), 408-416.  doi: 10.1145/1186822.1073207.  Google Scholar [2] D. Colton and R. Kress, Inverse Acoustic and Electromagnetic Scattering Theory, Applied Mathematical Sciences, Vol. 93. Springer-Verlag, Berlin, 1998. doi: 10.1007/978-3-662-03537-5.  Google Scholar [3] J. Li, H. Liu, Z. Shang and H. Sun, Two single-shot methods for locating multiple electromagnetic scatterers, SIAM J. Appl. Math., 73 (2013), 1721-1746.  doi: 10.1137/130907690.  Google Scholar [4] J. Li, H. Liu, W.-Y. Tsui and X. Wang, An inverse scattering approach for geometric body generation: A machine learning perspective, Mathematics in Engineering, 1 (2019), 800-823.  doi: 10.3934/mine.2019.4.800.  Google Scholar [5] J. Li, H. Liu and J. Zou, Locating multiple multiscale acoustic scatterers, Multiscale Model. Simul., 12 (2014), 927-952.  doi: 10.1137/13093409X.  Google Scholar [6] I. V. Lindell, TE/TM decomposition of electromagnetic sources, IEEE Trans. Antennas and Propagation, 36 (1988), 1382-1388.  doi: 10.1109/8.8624.  Google Scholar [7] H. Liu, A global uniqueness for formally determined inverse electromagnetic obstacle scattering, Inverse Problems, 24 (2008), 035018, 13 pp. doi: 10.1088/0266-5611/24/3/035018.  Google Scholar [8] H. Liu, L. Rondi and J. Xiao, Mosco convergence for $H(\rm curl)$ spaces, higher integrability for Maxwell's equations, and stability in direct and inverse EM scattering problems, J. Eur. Math. Soc. (JEMS), 21 (2019), 2945-2993.  doi: 10.4171/JEMS/895.  Google Scholar [9] H. Liu, M. Yamamoto and J. Zou, Reflection principle for the Maxwell's equations and its application to inverse electromagnetic scattering problem, Inverse Problems, 23 (2007), 2357-2366.  doi: 10.1088/0266-5611/23/6/005.  Google Scholar [10] H. Liu and J. Zou, Uniqueness in an inverse acoustic obstacle scattering problem for both sound-hard and sound-soft polyhedral scatterers, Inverse Problems, 22 (2006), 515-524.  doi: 10.1088/0266-5611/22/2/008.  Google Scholar [11] T. Sauer and Y. Xu, On multivariate Lagrange interpolation, Math. Comp., 64 (1995), 1147-1170.  doi: 10.1090/S0025-5718-1995-1297477-5.  Google Scholar [12] H. Seo, F. Cordier and N. Magnenat-Thalmann, Synthesizing animatable body models with parameterized shape modifications, Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation. Eurographics Association, (2003), 120–125. Google Scholar [13] M. Takada and T. Esaki, Method and apparatus for measuring human body or the like, U.S. Patent, (1983), 406–544. Google Scholar [14] G. Wang, F. Ma, Y. Guo and J. Li, Solving the multi-frequency electromagnetic inverse source problem by the Fourier method, J. Differential Equations, 265 (2018), 417-443.  doi: 10.1016/j.jde.2018.02.036.  Google Scholar [15] X. Wang, M. Song, Y. Guo, H. Li and H. Liu, Fourier method for identifying electromagnetic sources with multi-frequency far-field data, J. Comput. Appl. Math., 358 (2019), 279-292.  doi: 10.1016/j.cam.2019.03.013.  Google Scholar [16] D. Zhang and Y. Guo, Fourier method for solving the multi-frequency inverse source problem for the Helmholtz equation, Inverse Problems, 31 (2015), 035007, 30 pp. doi: 10.1088/0266-5611/31/3/035007.  Google Scholar [17] D. Zhang, Y. Guo, J. Li and H. Liu, Retrieval of acoustic sources from multi-frequency phaseless data, Inverse Problems, 34 (2018), 094001, 21 pp. doi: 10.1088/1361-6420/aaccda.  Google Scholar [18] D. Zhang, Y. Guo, J. Li and H. Liu, Locating multiple multipolar acoustic sources using the direct sampling method, Commun. Comput. Phys., 25 (2019), 1328-1356.  doi: 10.4208/cicp.oa-2018-0020.  Google Scholar [19] D. Zhang, F. Sun, Y. Guo and H. Liu, Unique determinations in inverse scattering problems with phaseless near-field measurements, Inverse Problems and Imaging, 14 (2020), 569-582.   Google Scholar [20] Make Human Community: Open Source tool for making 3D characters, Available from: http://www.makehumancommunity.org. Google Scholar

show all references

##### References:
 [1] D. Anguelov, P. Srinivasan, D. Koller, S. Thrun, J. Rodgers and J. Davis, SCAPE: Shape completion and animation of people, ACM Transactions on Graphics (TOG), 24 (2005), 408-416.  doi: 10.1145/1186822.1073207.  Google Scholar [2] D. Colton and R. Kress, Inverse Acoustic and Electromagnetic Scattering Theory, Applied Mathematical Sciences, Vol. 93. Springer-Verlag, Berlin, 1998. doi: 10.1007/978-3-662-03537-5.  Google Scholar [3] J. Li, H. Liu, Z. Shang and H. Sun, Two single-shot methods for locating multiple electromagnetic scatterers, SIAM J. Appl. Math., 73 (2013), 1721-1746.  doi: 10.1137/130907690.  Google Scholar [4] J. Li, H. Liu, W.-Y. Tsui and X. Wang, An inverse scattering approach for geometric body generation: A machine learning perspective, Mathematics in Engineering, 1 (2019), 800-823.  doi: 10.3934/mine.2019.4.800.  Google Scholar [5] J. Li, H. Liu and J. Zou, Locating multiple multiscale acoustic scatterers, Multiscale Model. Simul., 12 (2014), 927-952.  doi: 10.1137/13093409X.  Google Scholar [6] I. V. Lindell, TE/TM decomposition of electromagnetic sources, IEEE Trans. Antennas and Propagation, 36 (1988), 1382-1388.  doi: 10.1109/8.8624.  Google Scholar [7] H. Liu, A global uniqueness for formally determined inverse electromagnetic obstacle scattering, Inverse Problems, 24 (2008), 035018, 13 pp. doi: 10.1088/0266-5611/24/3/035018.  Google Scholar [8] H. Liu, L. Rondi and J. Xiao, Mosco convergence for $H(\rm curl)$ spaces, higher integrability for Maxwell's equations, and stability in direct and inverse EM scattering problems, J. Eur. Math. Soc. (JEMS), 21 (2019), 2945-2993.  doi: 10.4171/JEMS/895.  Google Scholar [9] H. Liu, M. Yamamoto and J. Zou, Reflection principle for the Maxwell's equations and its application to inverse electromagnetic scattering problem, Inverse Problems, 23 (2007), 2357-2366.  doi: 10.1088/0266-5611/23/6/005.  Google Scholar [10] H. Liu and J. Zou, Uniqueness in an inverse acoustic obstacle scattering problem for both sound-hard and sound-soft polyhedral scatterers, Inverse Problems, 22 (2006), 515-524.  doi: 10.1088/0266-5611/22/2/008.  Google Scholar [11] T. Sauer and Y. Xu, On multivariate Lagrange interpolation, Math. Comp., 64 (1995), 1147-1170.  doi: 10.1090/S0025-5718-1995-1297477-5.  Google Scholar [12] H. Seo, F. Cordier and N. Magnenat-Thalmann, Synthesizing animatable body models with parameterized shape modifications, Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation. Eurographics Association, (2003), 120–125. Google Scholar [13] M. Takada and T. Esaki, Method and apparatus for measuring human body or the like, U.S. Patent, (1983), 406–544. Google Scholar [14] G. Wang, F. Ma, Y. Guo and J. Li, Solving the multi-frequency electromagnetic inverse source problem by the Fourier method, J. Differential Equations, 265 (2018), 417-443.  doi: 10.1016/j.jde.2018.02.036.  Google Scholar [15] X. Wang, M. Song, Y. Guo, H. Li and H. Liu, Fourier method for identifying electromagnetic sources with multi-frequency far-field data, J. Comput. Appl. Math., 358 (2019), 279-292.  doi: 10.1016/j.cam.2019.03.013.  Google Scholar [16] D. Zhang and Y. Guo, Fourier method for solving the multi-frequency inverse source problem for the Helmholtz equation, Inverse Problems, 31 (2015), 035007, 30 pp. doi: 10.1088/0266-5611/31/3/035007.  Google Scholar [17] D. Zhang, Y. Guo, J. Li and H. Liu, Retrieval of acoustic sources from multi-frequency phaseless data, Inverse Problems, 34 (2018), 094001, 21 pp. doi: 10.1088/1361-6420/aaccda.  Google Scholar [18] D. Zhang, Y. Guo, J. Li and H. Liu, Locating multiple multipolar acoustic sources using the direct sampling method, Commun. Comput. Phys., 25 (2019), 1328-1356.  doi: 10.4208/cicp.oa-2018-0020.  Google Scholar [19] D. Zhang, F. Sun, Y. Guo and H. Liu, Unique determinations in inverse scattering problems with phaseless near-field measurements, Inverse Problems and Imaging, 14 (2020), 569-582.   Google Scholar [20] Make Human Community: Open Source tool for making 3D characters, Available from: http://www.makehumancommunity.org. Google Scholar
Isosurface plots of some random training body data with different characteristic values
Isosurface plots of the exact and reconstucted body shapes. (a) The exact child body, (b) the reonstucted child body with the given characteristic values
Isosurface plots of some random training head data with different characteristic values
Plots of the exact and reconstruted head shapes with the given characteristic values. The left column: the exact head shapes, the right column: the reconstruted head shapes
 [1] Xiaoxu Xu, Bo Zhang, Haiwen Zhang. Uniqueness in inverse acoustic and electromagnetic scattering with phaseless near-field data at a fixed frequency. Inverse Problems & Imaging, 2020, 14 (3) : 489-510. doi: 10.3934/ipi.2020023 [2] Beatrice Bugert, Gunther Schmidt. Analytical investigation of an integral equation method for electromagnetic scattering by biperiodic structures. Discrete & Continuous Dynamical Systems - S, 2015, 8 (3) : 435-473. doi: 10.3934/dcdss.2015.8.435 [3] Masaru Ikehata. The enclosure method for inverse obstacle scattering using a single electromagnetic wave in time domain. Inverse Problems & Imaging, 2016, 10 (1) : 131-163. doi: 10.3934/ipi.2016.10.131 [4] Elena Cordero, Fabio Nicola, Luigi Rodino. Time-frequency analysis of fourier integral operators. Communications on Pure & Applied Analysis, 2010, 9 (1) : 1-21. doi: 10.3934/cpaa.2010.9.1 [5] Ting Zhou. Reconstructing electromagnetic obstacles by the enclosure method. Inverse Problems & Imaging, 2010, 4 (3) : 547-569. doi: 10.3934/ipi.2010.4.547 [6] Gusein Sh. Guseinov. Spectral method for deriving multivariate Poisson summation formulae. Communications on Pure & Applied Analysis, 2013, 12 (1) : 359-373. doi: 10.3934/cpaa.2013.12.359 [7] Tao Jie, Gao Yan. Computing shadow prices with multiple Lagrange multipliers. Journal of Industrial & Management Optimization, 2020  doi: 10.3934/jimo.2020070 [8] Matti Lassas, Teemu Saksala, Hanming Zhou. Reconstruction of a compact manifold from the scattering data of internal sources. Inverse Problems & Imaging, 2018, 12 (4) : 993-1031. doi: 10.3934/ipi.2018042 [9] Christodoulos E. Athanasiadis, Vassilios Sevroglou, Konstantinos I. Skourogiannis. The inverse electromagnetic scattering problem by a mixed impedance screen in chiral media. Inverse Problems & Imaging, 2015, 9 (4) : 951-970. doi: 10.3934/ipi.2015.9.951 [10] Frederic Weidling, Thorsten Hohage. Variational source conditions and stability estimates for inverse electromagnetic medium scattering problems. Inverse Problems & Imaging, 2017, 11 (1) : 203-220. doi: 10.3934/ipi.2017010 [11] Tan Bui-Thanh, Omar Ghattas. Analysis of the Hessian for inverse scattering problems. Part III: Inverse medium scattering of electromagnetic waves in three dimensions. Inverse Problems & Imaging, 2013, 7 (4) : 1139-1155. doi: 10.3934/ipi.2013.7.1139 [12] John C. Schotland, Vadim A. Markel. Fourier-Laplace structure of the inverse scattering problem for the radiative transport equation. Inverse Problems & Imaging, 2007, 1 (1) : 181-188. doi: 10.3934/ipi.2007.1.181 [13] Carlos J. S. Alves, Nuno F. M. Martins, Nilson C. Roberty. Full identification of acoustic sources with multiple frequencies and boundary measurements. Inverse Problems & Imaging, 2009, 3 (2) : 275-294. doi: 10.3934/ipi.2009.3.275 [14] Gaohang Yu, Shanzhou Niu, Jianhua Ma. Multivariate spectral gradient projection method for nonlinear monotone equations with convex constraints. Journal of Industrial & Management Optimization, 2013, 9 (1) : 117-129. doi: 10.3934/jimo.2013.9.117 [15] Jun Guo, Qinghua Wu, Guozheng Yan. The factorization method for cracks in elastic scattering. Inverse Problems & Imaging, 2018, 12 (2) : 349-371. doi: 10.3934/ipi.2018016 [16] Jingzhi Li, Hongyu Liu, Qi Wang. Fast imaging of electromagnetic scatterers by a two-stage multilevel sampling method. Discrete & Continuous Dynamical Systems - S, 2015, 8 (3) : 547-561. doi: 10.3934/dcdss.2015.8.547 [17] Hao-Chun Lu. An efficient convexification method for solving generalized geometric problems. Journal of Industrial & Management Optimization, 2012, 8 (2) : 429-455. doi: 10.3934/jimo.2012.8.429 [18] Zhanyuan Hou. Geometric method for global stability of discrete population models. Discrete & Continuous Dynamical Systems - B, 2020, 25 (9) : 3305-3334. doi: 10.3934/dcdsb.2020063 [19] Shi Jin, Dongsheng Yin. Computational high frequency wave diffraction by a corner via the Liouville equation and geometric theory of diffraction. Kinetic & Related Models, 2011, 4 (1) : 295-316. doi: 10.3934/krm.2011.4.295 [20] Jinkui Liu, Shengjie Li. Multivariate spectral DY-type projection method for convex constrained nonlinear monotone equations. Journal of Industrial & Management Optimization, 2017, 13 (1) : 283-295. doi: 10.3934/jimo.2016017

2018 Impact Factor: 0.263

## Tools

Article outline

Figures and Tables


text:
How is a Godel sentence constructed?

I'm missing something in the argument for Godel's First Incompleteness Theorem, and I'm hoping that someone can clear up my muddle.

Godel constructs a sentence that is true iff it is unprovable. Here's my understanding of how he constructs it (taken from Peter Smith):

1. Consider U(y), with open variable y. U(y) is defined as "For all x, x does not code for a sequence of numbers that constitutes a proof of the diagonalization of the wff coded for by y."
2. The Godel sentence is the diagonalization of U(y). Meaning, the Godel sentence is "For all x, x does not code for a sequence of numbers that constitutes a proof of the diagonalization of U(y)."

The thing that I'm having trouble getting my head around is this: isn't U(y) an open sentence? Meaning, the variable 'y' is free in U(y). It was my understanding that open sentences aren't the sort of things that we could prove or not prove.

Now, I understand that the diagonalization of U(y) itself is not an open sentence, since it takes U(y) as its input. Still, I'm having trouble understanding what a proof of U(y) or its diagonalization would even look like. It seems trivial to me that the diagonalization of an open sentence wouldn't have a proof.

Can somebody check my understanding? What am I missing or misunderstanding? Thanks in advance.

-
Thinking about this some more, my inclination is that, no, it's not entirely shocking that a sentence constructed in this way (as the diagonalization of U(y) is) is unprovable. The real surprise is that the sentence is, as a consequence, true. Does that make sense? –  MBP Apr 24 '11 at 20:53
The best thing to do is forget about the "intuitive description" and look at the formal mathematics. –  quanta Apr 24 '11 at 21:33
U(y) is: If you consider y as an encoding of a statement Y(z) with one free variable, then there is no proof of Y(y). Then if u is an encoding of U(y), then U(u) essentially becomes: "There is no proof of U(u)." The statement U(y) is a general statement that might be true for some specific y, and not true for other specific y. But when the specific u is applied, we see Godel's result. –  Thomas Andrews Apr 24 '11 at 22:22
Nobody is stating anything about proving a statement with a free variable. Let's say $z$ encodes the statement Z(x)="x is a prime." Z(x) has a free variable, $x$, but the statement $U(z)$ states: "There does not exist a proof of Z(z)," which can be written as "There does not exist a proof that z is prime." –  Thomas Andrews Apr 24 '11 at 22:36

The actual Gödel sentence is obtained by taking the general formula $U_T(y)$, which has one free variable $y$, and substituting a particular closed term (that is, an expression of the form $1+1+\cdots+1$ with a certain number of 1s) into $y$. The term corresponding to a number $n$ might be denoted $\underline{n}$, $\dot{n}$, or $\ulcorner n \urcorner$ depending on the text you use. I will use $\ulcorner n \urcorner$, and I will use $\#(\phi)$ to refer to the Gödel number of a formula $\phi$.

In Gödel's original proof, the formula $U(y)$ is chosen so that, in the standard model, for any formula $\phi$, $U_T(\ulcorner \#(\phi) \urcorner)$ holds if and only if $\phi$ is not provable from the axioms of the theory $T$.

The number $n$ that is plugged in is chosen in such a way that that $U_T(\ulcorner n \urcorner)$ is equivalent, in $T$, to $U_T(\ulcorner \#(U_T(\ulcorner{}n\urcorner))\urcorner)$. The fact that such an $n$ exists is a consequence of the Diagonal Lemma.

The Gödel sentence is then defined to be the sentence $U_T(\ulcorner n \urcorner)$. This has no free variables because the term for $n$ has been substituted for the only free variable of $U_T(y)$.

It is true, separately, that the usual proof systems for first order logic do let you prove open sentences. It turns out that proving an open sentence is essentially the same as proving its universal closure. But this isn't really important for the case at hand, because the Gödel sentence doesn't have free variables.

-

You can indeed prove an open formula. For example, from $\forall x (x = x)$ you can deduce $x = x$. Although you can't assign the latter a truth-value in the same way which you can for the former, this is still a valid deduction. If you have some notes or text to reference, look at the rule for universal elimination, it will tell you precisely when you can eliminate a universal quantifier, and you'll see in particular that it allows you to deduce open formulas from closed sentences.

-
The poster is talking about formulas with free variables, which $\forall x(x=x)$ is not an example of. Rather, the formula $x=x$ is a formula with a free variable. In your express, $x$ is bound. –  Thomas Andrews Apr 24 '11 at 22:37
@Thomas: I believe Amit is saying that we can prove "x=x", which does have a free variable (of course). –  Carl Mummert Apr 24 '11 at 22:58
Some authors (e.g. Enderton) define an interpretation in such a way that it does assign truth values to all formulas, regardless whether they have free variables. In that convention, the truth values of open formulas are defined exactly the same way as the truth values of other formulas (using the same T-schema). –  Carl Mummert Apr 24 '11 at 23:14
Thanks for the help, Carl and Amit. I appreciate the point that the Godel sentence has no free variables (I tried to say that in my muddled original question), but I was missing the idea that open sentences can be proved from universal elimination. –  MBP Apr 27 '11 at 2:03


text:
# On Catalan’S constant

@article{Nesterenko2016OnCC,
title={On Catalan’S constant},
author={Yu. V. Nesterenko},
journal={Proceedings of the Steklov Institute of Mathematics},
year={2016},
volume={292},
pages={153-170}
}
• Y. Nesterenko
• Published 14 May 2016
• Mathematics
• Proceedings of the Steklov Institute of Mathematics
A new efficient construction of Diophantine approximations to Catalan’s constant is presented that is based on the direct analysis of the representation of a hypergeometric function with specially chosen half-integer parameters as a series and as a double Euler integral over the unit cube. This allows one to significantly simplify the proofs of Diophantine results available in this domain and substantially extend the capabilities of the method. The sequences of constructed rational…
9 Citations
On the Connection Between Irrationality Measures and Polynomial Continued Fractions
• Mathematics
• 2021
Linear recursions with integer coefficients, such as the recursion that generates the Fibonacci sequence Fn = Fn−1 + Fn−2, have been intensely studied over millennia and yet still hide interesting
Tweaking the Beukers integrals in search of more miraculous irrationality proofs a la Apéry
• Philosophy, Computer Science
The Ramanujan Journal
• 2022
As we all know, he was proven wrong by Gödel and Turing in general, but even for such concrete problems, like the irrationality of a specific, natural, constant, like the Euler-Mascheroni constant
Normality Analysis of Current World Record Computations for Catalan's Constant and Arc Length of a Lemniscate with $a=1$
Catalan's constant and the lemniscate constants have been important mathematical constants of interest to the mathematical society, yet various properties are unknown. An important property of
Generating conjectures on fundamental constants with the Ramanujan Machine.
• Mathematics, Computer Science
Nature
• 2021
This work supports a different conceptual framework for research: computer algorithms use numerical data to unveil mathematical structures, thus trying to replace the mathematical intuition of great mathematicians and providing leads to further mathematical research.
Hankel and Toeplitz Determinants
det(Hn) = Qn−1 k=1(k!) 4 Q2n−1 =1 ! = G(n+ 1) G(2n+ 1) → 0 as n→∞. More precisely [1], det(Hn) 4−n(2π)nn−1/4 → 21/12e1/4A−3 = 0.6450024485... where A denotes the Glaisher-Kinkelin constant [2]. Such
A Determinantal Approach to Irrationality
It is a classical fact that the irrationality of a number $$\xi \in \mathbb R$$ξ∈R follows from the existence of a sequence $$p_n/q_n$$pn/qn with integral $$p_n$$pn and $$q_n$$qn such that q_n\xi
Maximum Queue Length for Traffic Light with Bernoulli Arrivals
Cars arrive at an intersection with a stoplight, which is either red or green. The cars all travel in the same direction, that is, we ignore cross-traffic & oncoming traffic. Assume that the
Triangles Formed via Poisson Nearest Neighbors
We start with certain joint densities (for sides and for angles) corresponding to pinned Poissonian triangles in the plane, then discuss analogous results for staked and anchored triangles.
How Far Might We Walk at Random
This elementary treatment first summarizes extreme values of a Bernoulli random walk on the one-dimensional integer lattice over a finite discrete time interval. Both the symmetric (unbiased) and

## References

SHOWING 1-10 OF 21 REFERENCES
An Apery-like Difference Equation for Catalan's Constant
Applying Zeilberger's algorithm of creative telescoping to a family of certain very-well-poised hypergeometric series involving linear forms in Catalan’s constant with rational coecients, a second-order dierence equation is obtained and a new way of fast calculation of Catalan's constant as well as a new continued-fraction expansion for it is derived.
Diophantine properties of numbers related to Catalan's constant
• Mathematics
• 2003
1) as a linear form in 1 and even beta valuesonly. The following Lemma 2 is almost the same as the correspondingone in [BR] and we only include a sketch of the proof. We would like toemphasise the
ON ARITHMETIC PROPERTIES OF THE VALUES OF HYPERGEOMETRIC FUNCTIONS
The author proposes an effective method of constructing a linear approximating form for a hypergeometric function of general type and its derivatives, which has a zero of the maximal possible order
On the irrationality exponent of the number ln 2
We propose another method of deriving the Marcovecchio estimate for the irrationality measure of the number ln 2 following, for the most part, the method of proof of the irrationality of the number
Lower bounds for linear forms in values of certain hypergeometric functions
By using Pade approximations of the first kind, a lower bound for the modulus of a linear form with integer coefficients in the values of certain hypergeometric functions at a rational point are
Rational approximations for values of derivatives of the Gamma function
The arithmetic nature of Euler's constant γ is still unknown and even getting good rational approximations to it is difficult. Recently, Aptekarev managed to find a third order linear recurrence with
Ramanujan's Notebooks
During the time period between 1903 and 1914, Ramanujan worked in almost complete isolation in India. Throughout these years, he recorded his mathematical results without proofs in notebooks. Upon
Nombres D’Euler, approximants de Padé et constante de Catalan
RésuméAu moyen d’une méthode d’approximation de Padé introduite par Prévost dans [13], nous construisons des familles d’approximations rationnelles rapidement convergentes vers la constante de
A Course of Modern Analysis
• Art
Nature
• 1916
The volume now gives a somewhat exhaustive account of the various ramifications of the subject, which are set out in an attractive manner and should become indispensable, not only as a textbook for advanced students, but as a work of reference to those whose aim is to extend the knowledge of analysis.


text:
Peeter Joot's (OLD) Blog.

Math, physics, perl, and programming obscurity.

 papasu on PHY450H1S. Relativistic Electr… papasu on Energy term of the Lorentz for… lidiodu on PHY450H1S. Relativistic Electr… lidiodu on PHY450H1S. Relativistic Electr… lidiodu on bivector form of Stokes t…

• 307,917

Archive for August, 2012

C++ syntax, nested loops and continue — an embarrassing experiment?

Posted by peeterjoot on August 28, 2012

For whatever reason, the C++ continue keyword is not used often in the portions of the code I normally deal with.  I was moving code in a function that had gotten waaay to big into a helper function. This changed the scope of some continue and break usage, and thought I’d double check that these only impact the inner loop:

#include <stdio.h>

int main()
{
for ( int i = 0 ; i < 5 ; i++ )
{
for ( int j = 0 ; j < 5 ; j++ )
{
if ( j % 2 )
{
continue ;
}

printf( "i,j = %d, %d\n", i, j ) ;
}
}

printf( "\n\n" ) ;
for ( int i = 0 ; i < 5 ; i++ )
{
for ( int j = 0 ; j < 5 ; j++ )
{
if ( 3 == j )
{
break ;
}

printf( "i,j = %d, %d\n", i, j ) ;
}
}

return 0 ;
}

I see:

i,0 = 0, 0
i,2 = 0, 2
i,4 = 0, 4
i,0 = 1, 0
i,2 = 1, 2
i,4 = 1, 4
i,0 = 2, 0
i,2 = 2, 2
i,4 = 2, 4
i,0 = 3, 0
i,2 = 3, 2
i,4 = 3, 4
i,0 = 4, 0
i,2 = 4, 2
i,4 = 4, 4

i,0 = 0, 0
i,1 = 0, 1
i,2 = 0, 2
i,0 = 1, 0
i,1 = 1, 1
i,2 = 1, 2
i,0 = 2, 0
i,1 = 2, 1
i,2 = 2, 2
i,0 = 3, 0
i,1 = 3, 1
i,2 = 3, 2
i,0 = 4, 0
i,1 = 4, 1
i,2 = 4, 2

This makes logical sense, and protects me from breaking code containing the inner loop in question should I move it to a helper function (where there will no longer be an outer loop in scope).

Should it be embarrassing that I actually did this experiment after so many years of programming?

Scotiabank iTrade RESP … they are sneaky little buggers with their hidden fees.

Posted by peeterjoot on August 21, 2012

Watch out if you are considering opening a Scotiabank iTrade RESP account.  I got the email below from Scotiabank where I currently have a very minimal RESP account.  I’d opened this account with the intention of increasing it, assuming I’d eventually have the funds to do so, but will now likely close it out of principle and look elsewhere:

“As a valued Scotia iTRADE® client, your continued satisfaction is important to us.
That’s why we’re writing to you today to remind you that your combined assets with Scotia iTRADE need to reach certain levels as of August 31st, 2012 for you to avoid an annual fee charged to your registered account(s) on September 15th, 2012 (covering a one year period to September 14th, 2013).
Here is the breakdown for meeting asset levels to avoid the fee:
• If you hold an RESP account with Scotia iTRADE, you need to have $15,000 or greater in combined assets with Scotia iTRADE to avoid a$25 annual fee (plus HST) charged to your RESP account(s) on September 15th.
• For registered accounts, other than RESP accounts, you need to have $25,000 or greater in combined assets with Scotia iTRADE to avoid a$100 annual fee (plus HST) charged to your registered account(s) on September 15th.
With our powerful trading platforms, easy-to-use trading and investment tools, and friendly customer service, consolidating more of your assets with Scotia iTRADE is a wise decision.

Somewhere in the fine print of the Scotia iTrade agreement must be some statement of fees for less than this minimum “\$15,000”.  When I read the fine print, I saw the fees schedule for the per trade fees, but not this one.

I can summarize this email from Scotiabank, “As a valued iTrade customer, we will charge you fees that will encourage you to look into our competitors banking products.”

Posted in Incoherent ramblings | Tagged: , , , , | 5 Comments »

Geometry of general Jones vector (problem 2.8)

Posted by peeterjoot on August 9, 2012

Another problem from [1].

Problem

The general case is represented by the Jones vector

\begin{aligned}\begin{bmatrix}A \\ B e^{i\Delta}\end{bmatrix}.\end{aligned} \hspace{\stretch{1}}(1.1.1)

Show that this represents elliptically polarized light in which the major axis of the ellipse makes an angle

\begin{aligned}\frac{1}{{2}} \tan^{-1} \left( \frac{2 A B \cos \Delta }{A^2 - B^2} \right),\end{aligned} \hspace{\stretch{1}}(1.1.2)

with the $x$ axis.

Solution

Prior to attempting the problem as stated, let’s explore the algebra of a parametric representation of an ellipse, rotated at an angle $\theta$ as in figure (1). The equation of the ellipse in the rotated coordinates is

Figure 1: Rotated ellipse

\begin{aligned}\begin{bmatrix}x' \\ y'\end{bmatrix}=\begin{bmatrix}a \cos u \\ b \sin u\end{bmatrix},\end{aligned} \hspace{\stretch{1}}(1.2.3)

which is easily seen to have the required form

\begin{aligned}\left( \frac{x'}{a} \right)^2+\left( \frac{y'}{b} \right)^2 = 1.\end{aligned} \hspace{\stretch{1}}(1.2.4)

We’d like to express $x'$ and $y'$ in the “fixed” frame. Consider figure (2) where our coordinate conventions are illustrated. With

Figure 2: 2d rotation of frame

\begin{aligned}\begin{bmatrix}\hat{\mathbf{x}}' \\ \hat{\mathbf{y}}'\end{bmatrix}=\begin{bmatrix}\hat{\mathbf{x}} e^{\hat{\mathbf{x}} \hat{\mathbf{y}} \theta} \\ \hat{\mathbf{y}} e^{\hat{\mathbf{x}} \hat{\mathbf{y}} \theta}\end{bmatrix}=\begin{bmatrix}\hat{\mathbf{x}} \cos \theta + \hat{\mathbf{y}} \sin\theta \\ \hat{\mathbf{y}} \cos \theta - \hat{\mathbf{x}} \sin\theta\end{bmatrix},\end{aligned} \hspace{\stretch{1}}(1.2.5)

and $x \hat{\mathbf{x}} + y\hat{\mathbf{y}} = x' \hat{\mathbf{x}} + y' \hat{\mathbf{y}}$ we find

\begin{aligned}\begin{bmatrix}x' \\ y'\end{bmatrix}=\begin{bmatrix}\cos \theta & \sin\theta \\ -\sin\theta & \cos\theta\end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix},\end{aligned} \hspace{\stretch{1}}(1.2.22)

so that the equation of the ellipse can be stated as

\begin{aligned}\begin{bmatrix}\cos \theta & \sin\theta \\ -\sin\theta & \cos\theta\end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}=\begin{bmatrix}a \cos u \\ b \sin u\end{bmatrix},\end{aligned} \hspace{\stretch{1}}(1.2.7)

or

\begin{aligned}\begin{bmatrix}x \\ y\end{bmatrix}=\begin{bmatrix}\cos \theta & -\sin\theta \\ \sin\theta & \cos\theta\end{bmatrix}\begin{bmatrix}a \cos u \\ b \sin u\end{bmatrix}=\begin{bmatrix}a \cos \theta \cos u - b \sin \theta \sin u \\ a \sin \theta \cos u + b \cos \theta \sin u\end{bmatrix}.\end{aligned} \hspace{\stretch{1}}(1.2.8)

Observing that

\begin{aligned}\cos u + \alpha \sin u = \text{Real}\left( (1 + i \alpha) e^{-i u} \right)\end{aligned} \hspace{\stretch{1}}(1.2.9)

we have, with $\text{atan2} = \text{atan2}(x, y)$ a Jones vector representation of our rotated ellipse

\begin{aligned}\begin{bmatrix}x \\ y\end{bmatrix}=\text{Real}\begin{bmatrix}( a \cos \theta - i b \sin\theta ) e^{-iu} \\ ( a \sin \theta + i b \cos\theta ) e^{-iu}\end{bmatrix}=\text{Real}\begin{bmatrix}\sqrt{ a^2 \cos^2 \theta + b^2 \sin^2 \theta } e^{i \text{atan2}(a \cos\theta, -b\sin\theta) - i u} \\ \sqrt{ a^2 \sin^2 \theta + b^2 \cos^2 \theta } e^{i \text{atan2}(a \sin\theta, b\cos\theta) - i u}\end{bmatrix}.\end{aligned} \hspace{\stretch{1}}(1.2.10)

Since we can absorb a constant phase factor into our $-iu$ argument, we can write this as

\begin{aligned}\begin{bmatrix}x \\ y\end{bmatrix}=\text{Real}\left(\begin{bmatrix}\sqrt{ a^2 \cos^2 \theta + b^2 \sin^2 \theta } \\ \sqrt{ a^2 \sin^2 \theta + b^2 \cos^2 \theta } e^{i \text{atan2}(a \sin\theta, b\cos\theta) -i \text{atan2}(a \cos\theta, -b\sin\theta)} \end{bmatrix} e^{-i u'}\right).\end{aligned} \hspace{\stretch{1}}(1.2.11)

This has the required form once we make the identifications

\begin{aligned}A = \sqrt{ a^2 \cos^2 \theta + b^2 \sin^2 \theta }\end{aligned} \hspace{\stretch{1}}(1.2.12)

\begin{aligned}B = \sqrt{ a^2 \sin^2 \theta + b^2 \cos^2 \theta } \end{aligned} \hspace{\stretch{1}}(1.2.13)

\begin{aligned}\Delta =\text{atan2}(a \sin\theta, b\cos\theta) - \text{atan2}(a \cos\theta, -b\sin\theta).\end{aligned} \hspace{\stretch{1}}(1.2.14)

What isn’t obvious is that we can do this for any $A$, $B$, and $\Delta$. Portions of this problem I tried in Mathematica starting from the elliptic equation derived in section 8.1.3 of [2]. I’d used Mathematica since on paper I found the rotation angle that eliminated the cross terms to always be 45 degrees, but this turns out to have been because I’d first used a change of variables that scaled the equation. Here’s the whole procedure without any such scaling to arrive at the desired result for this problem. Our starting point is the Jones specified field, again as above I’ve using $-iu = i (k z - \omega t)$

\begin{aligned}\mathbf{E} = \text{Real}\left( \begin{bmatrix}A \\ B e^{i \Delta}\end{bmatrix}e^{-i u}\right)=\begin{bmatrix}A \cos u \\ B \cos ( \Delta - u )\end{bmatrix}e^{-i u}\end{aligned} \hspace{\stretch{1}}(1.2.15)

We need our cosine angle addition formula

\begin{aligned}\cos( a + b ) = \text{Real} \left( (\cos a + i \sin a)(\cos b + i \sin b)\right) =\cos a \cos b - \sin a \sin b.\end{aligned} \hspace{\stretch{1}}(1.2.16)

Using this and writing $\mathbf{E} = (x, y)$ we have

\begin{aligned}x = A \cos u\end{aligned} \hspace{\stretch{1}}(1.2.17)

\begin{aligned}y = B ( \cos \Delta \cos u + \sin \Delta \sin u ).\end{aligned} \hspace{\stretch{1}}(1.2.18)

Subtracting $x \cos \Delta/A$ from $y/B$ we have

\begin{aligned}\frac{y}{B} - \frac{x}{A} \cos \Delta = \sin \Delta \sin u.\end{aligned} \hspace{\stretch{1}}(1.2.27)

Squaring this and using $\sin^2 u = 1 - \cos^2 u$, and 1.2.17 we have

\begin{aligned}\left( \frac{y}{B} - \frac{x}{A} \cos \Delta \right)^2 = \sin^2 \Delta \left( 1 - \frac{x^2}{A^2} \right),\end{aligned} \hspace{\stretch{1}}(1.2.27)

which expands and simplifies to

\begin{aligned}\left( \frac{x}{A} \right)^2 +\left( \frac{y}{B} \right)^2 - 2 \left( \frac{x}{A} \right)\left( \frac{y}{B} \right)\cos \Delta = \sin^2 \Delta,\end{aligned} \hspace{\stretch{1}}(1.2.27)

which is an equation of a rotated ellipse as desired. Let’s figure out the angle of rotation required to kill the cross terms. Writing $a = 1/A$, $b = 1/B$ and rotating our primed coordinate frame by $\theta$ degrees

\begin{aligned}\begin{bmatrix}x \\ y\end{bmatrix}=\begin{bmatrix}\cos \theta & -\sin\theta \\ \sin\theta & \cos\theta\end{bmatrix}\begin{bmatrix}x' \\ y'\end{bmatrix},\end{aligned} \hspace{\stretch{1}}(1.2.22)

we have

\begin{aligned}\begin{aligned}\sin^2 \Delta &=a^2 (x' \cos \theta - y'\sin\theta)^2+b^2 ( x' \sin\theta + y' \cos\theta)^2 \\ &- 2 a b (x' \cos \theta - y'\sin\theta)( x'\sin\theta + y'\cos\theta)\cos \Delta \\ &=(x')^2 ( a^2 \cos^2 \theta + b^2 \sin^2 \theta - 2 a b \cos \theta \sin \theta \cos \Delta ) \\ &+(y')^2 ( a^2 \sin^2 \theta + b^2 \cos^2 \theta + 2 a b \cos \theta \sin \theta \cos \Delta ) \\ &+ 2 x' y' ( (b^2 -a^2) \cos \theta \sin\theta + a b (\sin^2 \theta - \cos^2 \theta) \cos \Delta ).\end{aligned}\end{aligned} \hspace{\stretch{1}}(1.2.27)

To kill off the cross term we require

\begin{aligned}\begin{aligned}0 &= (b^2 -a^2) \cos \theta \sin\theta + a b (\sin^2 \theta - \cos^2 \theta) \cos \Delta \\ &= \frac{1}{{2}} (b^2 -a^2) \sin (2 \theta) - a b \cos (2 \theta) \cos \Delta,\end{aligned}\end{aligned} \hspace{\stretch{1}}(1.2.27)

or

\begin{aligned}\tan (2 \theta) = \frac{2 a b \cos \Delta}{b^2 - a^2} = \frac{2 A B \cos \Delta}{A^2 - B^2}.\end{aligned} \hspace{\stretch{1}}(1.2.27)

This yields 1.1.2 as desired. We also end up with expressions for our major and minor axis lengths, which are respectively for $\sin \Delta \ne 0$

\begin{aligned}\sin\Delta/ \sqrt{ b^2 + (a^2 - b^2) \cos^2 \theta - a b \sin (2 \theta) \cos \Delta }\end{aligned} \hspace{\stretch{1}}(1.2.27)

\begin{aligned}\sin\Delta/\sqrt{ b^2 + (a^2 - b^2)\sin^2 \theta + a b \sin (2 \theta) \cos \Delta },\end{aligned} \hspace{\stretch{1}}(1.2.27)

which completes the task of determining the geometry of the elliptic parameterization we see results from the general Jones vector description.

References

[1] G.R. Fowles. Introduction to modern optics. Dover Pubns, 1989.

[2] E. Hecht. Optics. 1998.

Complex form of Poynting relationship

Posted by peeterjoot on August 2, 2012

This is a problem from [1], something that I’d tried back when reading [2] but in a way that involved Geometric Algebra and the covariant representation of the energy momentum tensor. Let’s try this with plain old complex vector algebra instead.

Question: Average Poynting flux for complex 2D fields (problem 2.4)

Given a complex field phasor representation of the form

\begin{aligned}\tilde{\mathbf{E}} = \mathbf{E}_0 e^{i (\mathbf{k} \cdot \mathbf{x} - \omega t)}\end{aligned} \hspace{\stretch{1}}(1.0.1)

\begin{aligned}\tilde{\mathbf{H}} = \mathbf{H}_0 e^{i (\mathbf{k} \cdot \mathbf{x} - \omega t)}.\end{aligned} \hspace{\stretch{1}}(1.0.2)

Here we allow the components of $\mathbf{E}_0$ and $\mathbf{H}_0$ to be complex. As usual our fields are defined as the real parts of the phasors

\begin{aligned}\mathbf{E} = \text{Real}( \tilde{\mathbf{E}} )\end{aligned} \hspace{\stretch{1}}(1.0.3)

\begin{aligned}\mathbf{H} = \text{Real}( \tilde{\mathbf{H}} ).\end{aligned} \hspace{\stretch{1}}(1.0.4)

Show that the average Poynting vector has the value

\begin{aligned}\left\langle{{ \mathbf{S} }}\right\rangle = \left\langle{{ \mathbf{E} \times \mathbf{H} }}\right\rangle = \frac{1}{{2}} \text{Real}( \mathbf{E}_0 \times \mathbf{H}_0^{*} ).\end{aligned} \hspace{\stretch{1}}(1.0.5)

While the text works with two dimensional quantities in the $x,y$ plane, I found this problem easier when tackled in three dimensions. Suppose we write the complex phasor components as

\begin{aligned}\mathbf{E}_0 = \sum_k (\mathbf{E}_{kr} + i \mathbf{E}_{ki}) \mathbf{e}_k = \sum_k {\left\lvert{\mathbf{E}_k}\right\rvert} e^{i \phi_k} \mathbf{e}_k\end{aligned} \hspace{\stretch{1}}(1.0.6)

\begin{aligned}\mathbf{H}_0 = \sum_k (\mathbf{H}_{kr} + i \mathbf{H}_{ki}) \mathbf{e}_k = \sum_k {\left\lvert{\mathbf{H}_k}\right\rvert} e^{i \psi_k} \mathbf{e}_k,\end{aligned} \hspace{\stretch{1}}(1.0.7)

and also write $\phi_k' = \phi_k + \mathbf{k} \cdot \mathbf{x}$, and $\psi_k' = \psi_k + \mathbf{k} \cdot \mathbf{x}$, then our (real) fields are

\begin{aligned}\mathbf{E} = \sum_k {\left\lvert{\mathbf{E}_k}\right\rvert} \cos(\phi_k' - \omega t) \mathbf{e}_k\end{aligned} \hspace{\stretch{1}}(1.0.8)

\begin{aligned}\mathbf{H} = \sum_k {\left\lvert{\mathbf{H}_k}\right\rvert} \cos(\psi_k' - \omega t) \mathbf{e}_k,\end{aligned} \hspace{\stretch{1}}(1.0.9)

and our Poynting vector before averaging (in these units) is

\begin{aligned}\mathbf{E} \times \mathbf{H} = \sum_{klm} {\left\lvert{\mathbf{E}_k}\right\rvert} {\left\lvert{\mathbf{H}_l}\right\rvert} \cos(\phi_k' - \omega t) \cos(\psi_l' - \omega t) \epsilon_{klm} \mathbf{e}_m.\end{aligned} \hspace{\stretch{1}}(1.0.10)

We are tasked with computing the average of cosines

\begin{aligned}\left\langle{{ \cos(a - \omega t) \cos(b - \omega t) }}\right\rangle=\frac{1}{{T}} \int_0^T \cos(a - \omega t) \cos(b - \omega t) dt=\frac{1}{{\omega T}} \int_0^T \cos(a - \omega t) \cos(b - \omega t) \omega dt=\frac{1}{{2 \pi}} \int_0^{2 \pi}\cos(a - u) \cos(b - u) du=\frac{1}{{4 \pi}} \int_0^{2 \pi}\cos(a + b - 2 u) + \cos(a - b) du=\frac{1}{{2}} \cos(a - b).\end{aligned} \hspace{\stretch{1}}(1.0.11)

So, our average Poynting vector is

\begin{aligned}\left\langle{{\mathbf{E} \times \mathbf{H}}}\right\rangle = \frac{1}{{2}} \sum_{klm} {\left\lvert{\mathbf{E}_k}\right\rvert} {\left\lvert{\mathbf{H}_l}\right\rvert} \cos(\phi_k - \psi_l) \epsilon_{klm} \mathbf{e}_m.\end{aligned} \hspace{\stretch{1}}(1.0.12)

We have only to compare this to the desired expression

\begin{aligned}\frac{1}{{2}} \text{Real}( \mathbf{E}_0 \times \mathbf{H}_0^{*} )= \frac{1}{{2}} \sum_{klm} \text{Real}\left({\left\lvert{\mathbf{E}_k}\right\rvert} e^{i\phi_k}{\left\lvert{\mathbf{H}_l}\right\rvert} e^{-i\psi_l}\right)\epsilon_{klm} \mathbf{e}_m = \frac{1}{{2}} \sum_{klm} {\left\lvert{\mathbf{E}_k}\right\rvert} {\left\lvert{\mathbf{H}_l}\right\rvert} \cos( \phi_k - \psi_l )\epsilon_{klm} \mathbf{e}_m.\end{aligned} \hspace{\stretch{1}}(1.0.13)

This proves the desired result.

References

[1] G.R. Fowles. Introduction to modern optics. Dover Pubns, 1989.

[2] JD Jackson. Classical Electrodynamics Wiley. John Wiley and Sons, 2nd edition, 1975.

Posted in Math and Physics Learning. | Tagged: , , | 2 Comments »

Ease of screwing up C string operations.

Posted by peeterjoot on August 2, 2012

Here’s a new way to mess up a strncpy that I hadn’t seen before. I found about 50 instances of this in the component I was working on today:

ossStrNCopy( pszTarget, pszSource, strlen( pszSource ) + 1 ) ;

Our ossStrNCopy function is a lot like strncpy, but unlike the library interface, ours is explicitly truncating and won’t leave a dangling non-null terminated string. It’s supposed to be called like:

ossStrNCopy( pszTarget, pszSource, sizeof(pszTarget) ) ;

(where pszTarget is a char [] array and not a char *). The idea is to avoid buffer overflows that would occur if you were to copy more bytes than the target can hold.

This incorrect use is an excellent example of what was probably clueless cut and paste. Perhaps the thought process was: “I don’t know what this last parameter is for. It’s too much work to read the documentation … I’ll just put something.”

The caller is requesting to have one plus the null terminator of the source string copied into the target. If you are going to do that, why not just call strcpy?


text:
# Revision history [back]

### CSRF token missing or incorrect

When I try to change the skin for Askbot, I get the following error:

Forbidden (403)

CSRF verification failed. Request aborted.
Reason given for failure:
CSRF token missing or incorrect.

This puts me in a catch 22 situation whereby I need to change the skin to fix the error, but without fixing the error I can't change the skin. Can anyone tell me how to get round this?

### CSRF token missing or incorrect

When I try to change the skin for Askbot, I get the following error:

Forbidden (403)

CSRF verification failed. Request aborted.
Reason given for failure:
CSRF token missing or incorrect.

This puts me in a catch 22 situation whereby I need to change the skin to fix the error, but without fixing the error I can't change the skin. Can anyone tell me how to get round this?

Edit: I'm using the default skin. I don't know which templates are used in the settings interface. I would prefer a solution that didn't involve editing the default skin templates as those changes would be harder to maintain.

 3 retagged

### CSRF token missing or incorrect

When I try to change the skin for Askbot, I get the following error:

Forbidden (403)

CSRF verification failed. Request aborted.
Reason given for failure:
CSRF token missing or incorrect.

This puts me in a catch 22 situation whereby I need to change the skin to fix the error, but without fixing the error I can't change the skin. Can anyone tell me how to get round this?

Edit: I'm using the default skin. I don't know which templates are used in the settings interface. I would prefer a solution that didn't involve editing the default skin templates as those changes would be harder to maintain.


text:
# What’s your favourite function? Part II

We have received loads of feedback from people telling us their favourite function

A few weeks ago on this blog we featured some of the Chalkdust team’s favourite functions. Since then we have received loads of feedback from people telling us their favourite function, so in part II of this blog we’re featuring some of the best of the contributions we have received. Our reddit thread got many other excellent contributions, from the Cantor function to the zeta function, and there was a heated debate about whether the Dirac delta function is actually a function (it is).

### The Bessel Function (Ian Stewart)

First up is eminent maths populariser, Professor Ian Stewart. Last week we had the privilege of interviewing him for Chalkdust Issue 3, and  the chance to ask him about his favourite function.  His immediate response was the Bessel function. He thinks “they are fascinating because they turn up in all sorts of problems in circular symmetry.” They were first introduced to him at school through a popular maths book by W W Sawyer, which accomplished the task of introducing hypergeometric functions to a general audience. Sawyer described Bessel functions as “like trigonometric functions, but much more interesting”, which intrigued Ian Stewart. He appreciates them because they have all sorts of interesting applications in many different fields: they are connected to representation theory of groups in addition to coming up in optics and astronomy; in fact Bessel himself was an astronomer. Ian Stewart has in the past conducted research involving Bessel functions, looking at a particular type of spiral formation in nature. The proposed hypotheses at the time were that these were Archimidean spirals or involute spirals. Instead Stewart found they were in fact parametrized by a certain combination of Bessel functions.

Look out for the rest of our fascinating interview with Ian Stewart, coming up next year in Issue 3 of Chalkdust!

Next up is Luciano, who has a challenge for you:

### The Taboo Cubic (Luciano Rila)

Before you read this, please sketch a cubic graph. I bet you chose a cubic with two stationary points. Possibly a cubic with one stationary point but you would be in a minority here. I am still to meet someone who would sketch a cubic with no stationary points (I’ll buy you a coffee if you did). Sadly they seem to have vanished from our collective mathematical conscience or at least from our classroom. They are beautiful though, such a simple shape, and I love that their gradient function is a quadratic with complex roots. As we never talk about them, I call them The Taboo Cubic.

David Silvester got in touch to suggest an improvement on Matthew Scroggs’s nomination of the linear hat function from Part I. I agree with him, this is far better than the linear hat function:

### Piecewise Quadratic Hat Function (David Silvester)

My favourite function is the piecewise quadratic hat function.

$$f_2(x)= \begin{cases} 0 &\mbox{if } x \leq x_{i-2}, \\ {(x-x_{i-1})(x-x_{i-2})\over (x_i-x_{i-1})(x_i-x_{i-2})} &\mbox{if } x_{i-2} \leq x < x_i ,\\ {(x-x_{i+1})(x-x_{i+2})\over (x_i-x_{i+1})(x_i-x_{i+2})} &\mbox{if } x_i \leq x < x_{i+2} ,\\ 0 &\mbox{if } x\geq x_{i+2} .\end{cases}$$

The quadratic hat function is more attractive than the linear hat function (highlighted in the last issue). It is also more useful for practical finite element applications like computing the deflection of an elastic structure when loaded (such as a suspension bridge or a tall building), or computing the motion of a fluid flowing in an axisymmetric pipe. The flow profile that can be observed coming out of a tap is called Poiseuille flow—it can be represented exactly using a small set of quadratic hat functions defined over a radial cross section of the pipe.

The quadratic hat function is also a little rough around the edges (because it does not have a derivative at the joins). The cubic B-spline function $S_3(x)$ is a smooth relative. Cubic spline functions are used everyday in computer graphics and drawing applications where more smoothness is needed. It is just a little too smooth for my taste.

Chris Smith sent us this contribution via Twitter:

### Super-Logarithm (Chris Smith)

The Super-Logarithm function is ok but hard work…it can be a bit of a ‘slog’ to use…

Although in all seriousness the super-logarithm is actually a pretty interesting function. Chris is correct that it is hard to use, check out its intimidating recursive definition on Wikipedia….

### Chaitin’s Constant/ Omega Number (Mike Lynch)

My favourite function is usually referred to as Chaitin’s constant or omega number. For a computer program F the omega number is an infinite sum over all of its valid inputs (p):

$$\Omega_F=\sum_{p\in P_F }2^{-p}$$

Omega can be interpreted as the probability that the program F will eventually terminate, rather than go into an infinite loop: computing this is equivalent to solving the halting problem, which was shown to be undecidable by Alan Turing. This gives the omega numbers the perversely intriguing quality they cannot be computed, even in principle. Some properties of all omega numbers have been proven – they converge to a value between 0 and 1, their digits are random, and evenly distributed, they are all transcendental – but only for very simple programs can the first few dozen digits be calculated.

Rob Beckett’s favourite is a classic:

### $e^x$ (Rob Beckett)

My favourite function is the exponential function $f(x)=e^x$. This is primarily because $\frac{d}{dx}(f(x))=e^x$, in other words the function is growing at a rate which is equal to its current size. This is a really interesting property which comes from the fact that $e=\lim\limits_{n\rightarrow \infty}{(1+\frac{1}{n})^n}$. Just like pi, the number $e$ has a special property. It is the base rate of growth which means it crops up whenever things are growing or decaying continuously and exponentially. This exponential function, and variations, appear when considering bacterial growth rates, populations, radioactive decay and can be seen in the Black-Scholes formula that is used in the financial market.

This contribution from Chris Budd is certainly something to think about:

### Unevaluable function (Chris Budd)

My favourite function is something like the following:

$$f(x) = \begin{cases} 1 &\mbox{ if Father Christmas exists} \\ 0 &\mbox{otherwise. } \end{cases}$$

It is nice because (like many functions) it is perfectly well defined, but we cannot evaluate it…

Stuart Price has a fantastic example of a really simple function which can exhibit incredibly interesting and complicated behaviour:

### Logistic map (Stuart Price)

The logistic map refers to the family of functions $f_k(x)=kx(1-x)$. I have chosen this as my favourite function as it was my first introduction to chaos theory when I was an A level student. It also appealed to me as I was learning computer programming at the time and it was satisfying to be able to produce my own bifurcation diagram for the parameter space. This model gained popularity through the work of mathematical biologist Robert May published in the 1970s.

A significant amount of interesting behaviour is exhibited by this function, and much of it can be analysed with relatively straightforward algebra. The variable $x$ lies between zero and one and represents, as a proportion, the population of a species. In this context the mapping is interpreted as a discrete model with $x_{n+1}=kx_n(1-x_n)$.
It turns out that for values of $k\in[0,1]$ the iterates will converge to zero indicating extinction of the species. However, for $k\in[1,3]$ the long-term population will approach a fixed value, $\frac{k-1}{k}$. For values of $k$ greater than 3, we see what is called a “period doubling cascade’’. The population oscillates between two values, then four, eight, sixteen… ultimately resulting in chaotic behaviour for $k\approx 3.57$ and beyond. Beautifully, however, for a range of values beginning at $k=1+\sqrt{8}$ there is an oscillation between three values, which then  exhibits its own period doubling cascade. There is also a fundamental connection between the mathematics of this model and the Mandelbrot set. Although they parameterise the family of quadratics in slightly different ways, the line of symmetry of the Mandelbrot set exhibits the same dynamical behaviour as the logistic map.

And finally, we also had an interesting function from a German contributor, clearly inspired from one of the choices from part I:

### Funky Funktion (Mattheas Recht)

Let $\mathbb{S}$ be the set of all strings of letters from the Roman alphabet. Then meine lieblingsfunktion ist the map $F: \mathbb{S}\rightarrow \mathbb{S}$ such that
\begin{align*}
F(x)=\begin{cases} \textrm{funk}x &\textrm{ if } x=\textrm{tions} \\
x &\textrm{ otherwise} \end{cases}
\end{align*}
Why do I like this funktion? Because it is the funktion which puts the funk into funktions! Funky.

Matt is a PhD student at UCL, working in the fields of general relativity and cosmology.
ucl.ac.uk/~ucahawr    + More articles by Matthew

• ### Power-up review

"Unlocking the hidden mathematics in video games"
• ### Modelling in a heartbeat

Learn how to model your heart one beat at a time ❤
• ### Math Blaster

Belgin plays a classic mathsy game from her childhood...in 16-bit graphics! Here's her review...
• ### Why Knot?

You can un-knot a knot, by cutting it not?
• ### Surname Extinction

Why do surnames die out? We take a look at the Galton-Watson process for modelling the extinction of surnames to answer the question: 'When will we all be Smiths?'
• ### Crossnumber winners, Issue 06

Did you solve it?

## 3 thoughts on “What’s your favourite function? Part II”

1. Pingback: My favourite function… | rbeckettyd

2. Pingback: My favourite function… | rbeckettyd