I have the following equation:
$$ \left(10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1}+x\right) \left(10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1}+y\right) = k $$
Entering the above in Wolfram Alpha gives some details.
I'm looking to graph that for a given $k$, e.g. for $k=416375599$ or for $k=115701923737787$.
I'm actually only interested in $x$ and $y$ in $\mathbb R^+$.
Regardless if you expand the properties tab on the graph you get analytic calculations for the following properties: foci, vertices, center, semimajor axis length, semiminor axis length, focal parameter, eccentricity and asymptotes.
I'm assuming derivations of these 8 properties are sufficient to graph a given $k$, I'm just not sure
- how to derive those properties and
- how to use them to programmatically draw the curve.
It is important for my application that I do not resort to brute force plotting.
Update:
I have looked at http://mathworld.wolfram.com/Hyperbola.html and cracked my pre-calc book (which was from a course I took 15 years ago and is in a chapter we didn't actually make it to). In both cases I do not see a way to calculate the foci analytically from my equation for a given k.
After that is explained I think I need to perform algebraic manipulation to get it into a standard form to use the methodology described in that article. I'm fairly confident I'd be able to figure that out using wolfram (I certainly have no chance doing it by hand).
I would also appreciate links to algorithms in a general purpose language (C-syntax appreciated) to apply that methodology, as I really don't need to actually graph it, I just need the computational equivalent of a graph (don't ask).
I've determined the properties to be as followed:
foci: $(-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} -\sqrt{2*k},-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} -\sqrt{2*k}),(-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} +\sqrt{2*k},-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} +\sqrt{2*k})$
vertices: $(-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} -\sqrt{k},-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} -\sqrt{k}),(-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} +\sqrt{k},-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} +\sqrt{k})$
center: $(-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1},-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1})$
semimajor axis length: $\sqrt{2*k}$
semiminor axis length: $\sqrt{2*k}$
focal parameter: $\sqrt{k}$
eccentricity: $\sqrt2$
asymptotes: $x=-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} | y=-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1}$
I wish I could say I gained insight from those calculations, but I just looked at what wolfram churned out for the values and figured out the formula.
Now on to part 2: How do I use this information to write an algorithm to graph without resorting to brute force? Basically I am trying to gain insight on the curve, so I can limit the potential range of integer y solutions for a range of x solutions, and be able to pick the size of my x range test to optimize against the curvature, so I have to test against few values as possible.
$xy=1$ is you standard $y=1/x$ hyperbola, with center at the origin and the coordinate axes as asymptotes. $xy=k$ takes that and scales it by $\sqrt k$ in both coordinate directions. Finally $(x-x_c)(y-y_c)=k$ takes that and moves its ceter to $(x_c,y_c)$. You just have $x_c$ and $y_c$ which happen to be complicated formulas in $k$, namely
$$ x_c=y_c=-10^{\left\lfloor\frac{\ln\sqrt k}{\ln10}\right\rfloor-1} $$
So the hyperbola is still axis-aligned. Therefore it is very similar to the standard hyperbola I started with. As Wolfram Alpha will tell you, the standard hyperbola has these properties:
The points (i.e. foci, vertices, center) you have to scale by $\sqrt k$ then translate by $(x_c,y_c)$. The lengths (axis lengths, focal parameter) you just scale by $\sqrt k$. The eccentricity is a dimensionless constant affected by neither scaling nor translation, so it remains fixed at $\sqrt2$. The asymptotes get translated to $x=x_c$ and $y=y_c$.