Showing posts with label intercepts. Show all posts
Showing posts with label intercepts. Show all posts

Friday, 12 August 2022

Skewed Ellipses

My diurnal age today is 26793 days and one of the properties of this number is that it's a member of OEIS A118886:


 A118886

Numbers expressible as \(x^2 + xy + y^2 \), \(0 \leq x \leq y\), in 2 or more ways.      


So in the case of 26793, this means that there are at least two values for \( (x,y) \) such that \(x^2 + xy + y^2 =26793\). It turns out that there are exactly two such values and they are (9, 159) and (93, 96). It's easy to forget that the equation  \(x^2 + xy + y^2 =26793\) is that of an ellipse that is skewed with respect to the \(x\) and \(y\) axes. In other words, it's not your more usual  \(x^2 + y^2 =a^2\) because the \(xy\) term skews it. 

Figure 1 shows the graph along with the two points that have positive integer values: A = (9, 159) and B = (93, 96).


Figure 1

These sorts of ellipses \(x^2 + xy + y^2 =a^2\) have axes of symmetry of \(y=x\) and \(y=-x\) and \( \pm a\) are the intercepts on the \(x\) and \(y\) axes. In the graph shown in Figure 1, the intercepts are \( \pm \sqrt{26793} \approx 163.7 \).

Of course, there are other points on the graph that have integer values but some of these are negative and so are not included in OEIS A118886, Without the condition that \( x \leq y), other points will arise as well. These full range of eight points is shown in Figure 2 and the graph with points added in Figure 3.


Figure 2


Figure 3

Now up to 27000, there are 2043 numbers that qualify for membership in  OEIS A118886 and that represents about 7.6%. However, there are only 69 numbers that are square numbers as well meaning that the intercepts of the \(x\) and \(y\) axes have integer values. These values are:

49, 169, 196, 361, 441, 676, 784, 961, 1225, 1369, 1444, 1521, 1764, 1849, 2401, 2704, 3136, 3249, 3721, 3844, 3969, 4225, 4489, 4900, 5329, 5476, 5776, 5929, 6084, 6241, 7056, 7396, 8281, 8649, 9025, 9409, 9604, 10609, 10816, 11025, 11881, 12321, 12544, 12996, 13689, 14161, 14884, 15376, 15876, 16129, 16641, 16900, 17689, 17956, 19321, 19600, 20449, 21316, 21609, 21904, 22801, 23104, 23716, 24025, 24336, 24649, 24964, 25921, 26569

Take 26569 as an example (see permalink). We have \(26569=159^2\) and the two \( (x,y) \) that satisfy  OEIS A118886 are (0,163) and (75, 112). The full range of ten points are:

(-163, 0), (-163, 163), (-112, -75), (-75, -112), (0, -163), (0, 163), (75, 112), (112, 75), (163, -163) (163, 0)

With these skewed ellipses, if the \(a^2\) in \(x^2 + xy + y^2 =a^2\) is a square number, then there are always another two integer-valued points, \( (a, -a) \) and \( (-a,a) \), compared to non-square numbers. 

Up to 27000, the maximum number of points that satisfy \( 0 \leq x \leq y \) is six. The numbers are 12103, 19747, 22477 and 23569. Using 12103 as an example, the points are (2, 109), (21, 98), (27, 94), (34, 89), (49, 77) and (61, 66). Even extending the range to 100,000, there are no numbers that yield seven points which is not surprising considering the symmetry of the graph. 

There are however, four numbers that yield eight points and these are 53599, 63973, 74347 and 84721. Using, 53599 as an example the eight points are (3, 230), (25, 218), (43, 207), (58, 197), (85, 177), (90, 173), (102, 163) and (122, 145).

Tuesday, 30 March 2021

Analysis of an Interesting Graph

In my last post I evaluated the integral of the function:$$y= \frac{\sin(\ln x)}{\ln x}$$ between 0 and 1 and arrived at a value of \( \frac{\pi}{4} \) using Feyman's technique. In this post, I want to look at the function more closely in terms of its turning points and intercepts on the \(x\) axis. Figure 1 shows the behaviour of the graph in the region between 0 and 1.



Figure 1: created using GeoGebra

Clearly there is a small negative area that will reduce the largely positive area slightly but the figure of \( \frac{\pi}{4} \approx \) 0.785398163397448 looks pretty right. Clearly, the graph cuts the \(x\) axis around 0.4 but what about further out along the \(x\) axis? Figure 2 shows the graph of the function in the range from 0 to 100:


Figure 2: created using Wolfram Alpha

Figure 3 shows a slightly different view. 


Figure 3: created using Wolfram Alpha

Let's look at the graph in the range from 0 to 1000. Figure 4 shows this:

Figure 4: created using Wolfram Alpha

To see what's going on with these intercepts on the \(x\) axis we just need to set the function equal to zero. Let's do this and solve the resulting equation:$$
\begin{align} \frac{\sin(\ln x)}{\ln x}&=0\\
\implies \sin(\ln x)&=0 \text{ provided that } \ln x \neq 0\\
\implies \ln x &=n\pi \text{ where }n \in \mathbb{Z} \text{ and } n \neq 0\\
\therefore x&=e^{\ \pi \ n} \text{ with } n \neq 0
\end{align}$$Thus we begin to see what's going on:
  • The intercept in Figure 1 corresponds to \(n=-1\) and \(e^{-\pi} \approx 0.04 \)
  • The intercept in Figure 2 corresponds to \(n=1\) and \(e^{\pi} \approx 23.14 \)
  • The intercept in Figure 4 corresponds to \(n=2\) and \(e^{2\pi} \approx 535.49 \)
Clearly as \(n\) grows larger, the values of \(e^{\ \pi \ n}\) become very large and the intercepts more and more spread out along the number line. Similarly as -\(n\) grows larger negatively, the values of \(e^{\ -\pi \ n}\) become very small and the intercepts closer and closer together.

What about the turning points of the graph? To explore this we need to find the first derivative of the function. We find:$$
\begin{align}
\frac{d}{dx} \left (\frac{\sin(\ln x)}{\ln x} \right )&=\frac{\ln x \cos(\ln x)-\sin(\ln x)}{x \ln^2 x}\\
\implies \ln x \cos(\ln x)-\sin(\ln x)&=0 \text{ provided } x \ln^2 x \neq 0
\end{align}$$A partial solution to this is offered by Wolfram Alpha but the computation times out so only three solutions are shown. See Figure 5:


Figure 5: from Wolfram Alpha

From these results we can see the local minimum of \(x \approx 0.01\) in Figure 1 and the local maximum of x=1 in Figure 3. Some further results can be obtained from Wolfram Alpha simply by asking for turning points. These are shown in Figure 6.


Figure 6: from Wolfram Alpha

These results are most interesting because we can see a maximum value of around 0.049 when \(x=0\) but a minimum value of around -0.058 when \(x=0\)! Clearly, the function should be undefined at \(x=0\) even though a limit of 0 seems to exist. The issue of the limit is an interesting one which I may take up in a subsequent post but for the time being that's probably enough for the graph.