What is wrong with this method for a rotated and shifted parabola?
Solution 1:
This parabola cannot be written in $x=f(y)$ form (like a sideways parabola) or in $y=f(x)$ form (vertical parabola). You can see this by the mixed $xy$ term when you expand everything. It is a parabola rotated to some arbitrary angle. That's why none of your methods work. You need to first find out the rotation angle, then use a coordinate transformation to put it in a standard form and then you can do all the good things you want to do with it.
If your parabola is of the form $Ax^2+Bxy+Cy^2+Dx+Ey+F=0$ then the angle by which the parabola has been rotated is given by $$\cot(2\theta)=\frac{A-C}{B}.$$
In your case you have $x^2+4xy+4y^2-4x+4y=0$ so $$\theta = \frac{1}{2}\cot^{-1}\left(\frac{-3}{4}\right)\approx-26.56^{\circ}\approx333.43^{\circ}$$
and indeed your parabola looks like
The thing here is that we actually don't need $\theta$ itself but rather we need $\sin(\theta)$ and $\cos(\theta)$ to "undo" the rotation. We can get the exact values without computing $\theta$ itself by drawing a triangle and using half-angle identities
$$\cos(\theta)=\cos\left(\frac{1}{2}\arctan(-4/3)\right)=\frac{2}{\sqrt{5}}$$ $$\sin(\theta)=\sin\left(\frac{1}{2}\arctan(-4/3)\right)=-\frac{1}{\sqrt{5}}$$
and then substitute (call this set 1)
$$x = x'\cos(\theta)-y'\sin(\theta)$$ $$y = x'\sin(\theta)+y'\cos(\theta)$$
and simplify the given parabola to get
$$-12x'+4y'+5\sqrt{5}y'^2=0.$$
So now we have a sideways parabola and notice how the mixed term $xy$ has disappeared so now you get do whatever you need to do to this rotated parabola. But after you find the directrix, vertix, focus, etc, you would have to rotate all those by $\theta$ above to get the correct values in the correct coordinate system. So we unrotate the parabola, find everything we need, and then rotate everything we found.
Continuing this example, the sideways parabola looks like this.
It is very slightly shifted and scaled. I leave the rest of algebra up to you. After you find everything you need, for some of them you will need (call this set 2)
$$x' = x\cos(\theta)+y\sin(\theta)$$ $$y' = -x\sin(\theta)+y\cos(\theta)$$
to go back to the original coordinate system.
To go from $(x',y')\rightarrow (x,y)$ use set 1. To go from $(x,y)\rightarrow (x',y')$ use set 2.
Addendum: Your method doesn't work because it only works with unrotated (canonical) parabolas meaning parabolas where the axis of symmetry is parallel to the $x$-axis or the $y$-axis. The methods you are using don't work when there is a mixed $xy$ term present so we change coordinates and eliminate the $xy$ term and then use the "shortcuts" you know. Like Blue said, you can use the easy (shortcut) methods in a complicated way or you can use complicated methods (basics/using definitions) in a simple way. For example, the definition of a parabola is that given a point (the focus) and a straight line (a directrix), a parabola is the set of all points equidistant from both. For any parabola rotated or not, you can use this definition to find the focus and the directrix. But if you want to use the
"Start with $y=ax^2+bx+c$ and put it into $4p(y-k)=(x-h)^2$ and your focus stares at you in your face with coordinates $(h,k)$ and $p$ is the distance from the vertex to the focus, and the directrix"
then your parabola MUST be a canonical form (in this case opening up or down). This shortcut for finding the focus, vertex, and directrix ONLY works if there is no $xy$ term. And that is because this shortcut is derived assuming that the parabola opens only up or down. It cannot be sideways nor at any other angle. Since your parabola isn't canonical, these shortcuts fail. So you either "make it canonical" or you use the more complicated/definition method like Blue's method. They both work. You decide which one you prefer.
Solution 2:
As mentioned in my comment, your method finds the point at which the tilted parabola has a vertical tangent. The problem is that, for a tilted parabola, the tangent line at the vertex isn't vertical.
Here's an overly-complicated way to adapt your strategies to the problem at hand.
We'll start with this observation:
A line that meets a parabola at one point is either tangent to the parabola or parallel to the parabola's axis.
The parabola in question passes through the origin, so let's consider lines through that point; such lines have the form $y=mx$. (This leaves out vertical lines, but that's okay.) Finding where such a line meets the parabola, we can substitute $mx$ for $y$ in the parabola's equation: $$\left(\; x + 2\; (m x) \;\right)^2 = 4\;\left(\; x - (mx)\;\right) \qquad \to \qquad x^2 ( 1 + 2 m )^2 = 4 x ( 1 - m ) \quad (\star)$$ You can work out the discriminant to figure out which $m$s cause $(\star)$ to have only one solution in $x$, but notice that you can also do this "by inspection". If $m=1$, then the right-hand side vanishes, and we get the double-root $x=0$; the fact that it's a double root says that this $m$ corresponds to the line tangent to the parabola. On the other hand, $m=-1/2$ causes the left-hand side to vanish, and we get the single root, $x=0$; this corresponds to the line parallel to the parabola's axis.[*]
Since the axis has slope $-1/2$, it must be that the tangent line at the vertex has slope $2$ (as it's perpendicular to the axis). So, the tangent line has equation $y=2x+p$ some $p$ ... namely, the $p$ that gives us a single solution $x$ to $$\left(\; x + 2 ( 2 x + p ) \;\right)^2 = 4 \left(\; x - ( 2 x + p ) \;\right) \qquad (\star\star)$$ Expanding, and forcing the discriminant to vanish, we find that $p = 1/15$. Replacing that value into $(\star\star)$ gives $$\frac{1}{225}\left( 75x + 8 \right)^2 = 0$$ so that $x = -8/75$. Replacing $x$ and $p$ in the tangent line equation gives $$y = 2 \left(-\frac{8}{75}\right) + \frac{1}{15} = -\frac{11}{75}$$
Granted, this is a great deal of work just to find the vertex of the parabola. Other strategies work more efficiently in general; for instance, as @FixedPoint suggests: Rotate the plane until the parabola opens upwards ---since it's easy to find the vertex in that position--- then rotate the plane back to put the vertex where it belongs. There's a bit of Conservation of Math Energy involved: you can use more-basic techniques in a more-complicated argument, or you can use more-sophisticated techniques in a more-straightforward (even automatable) argument. Your choice.
By the way ... Looking back on what we did, it's clear that a parabola of the form $$\left(\; p x + q y \;\right)^2 + r x + s y + t = 0$$ has an axis with slope $-p/q$ (with a caveat in the case of $q=0$). If you can "see" this in an equation, then you can save yourself a bit of work deriving the fact. This is another aspect of the Conservation of Math Energy. (And it's why we put so much emphasis on "standard forms" of equations: standard forms make it easier to "see" important information in the equation.)
[*] If you're not convinced that the double/single root thing distinguishes the tangent/parallel-to-axis cases, consider the family of lines of the form $y=-1/2x+b$. Regardless of the particular value of $b$, substituting $-1/2x+b$ for $y$ in the parabola's equation eliminates the $x^2$ term. Thus, every line with slope $-1/2$ meets the parabola at one point, which can only happen in the parallel-to-axis case.
Solution 3:
This is actually the duplicate of an answer to the following question: Proving that for each two parabolas, there exists a transformation taking one to the other . According to the theory presented there, it is advantageous to write the OP's equation as follows: $$ 2(x-y) = \frac{1}{2} (x+2y)^2 \qquad \mbox{or} \qquad \eta = \frac{1}{2} \xi^2 $$ Where it is noted that $\;\xi\;$ physically corresponds with "time" . Anyway, it follows that: $$ \left\{ \begin{array}{l} \xi = x+2y \\ \eta = 2(x-y) \end{array}\right. \qquad \Longleftrightarrow \qquad \left\{ \begin{array}{l} x = \frac{1}{3}\xi + \frac{1}{3}\eta \\ y = \frac{1}{3}\xi - \frac{1}{6}\eta \end{array}\right. $$ Giving the "velocities", "accelerations" and "origin" in the parameter equations of the parabola. $$ v_x = v_y = \frac{1}{3} \quad ; \quad a_x = \frac{1}{3} \quad ; \quad a_y = - \frac{1}{6} \quad ; \quad s_x = s_y = 0 $$ In matrix form: $$ \left[ \begin{array}{c} x \\ y \end{array} \right] = \left[ \begin{array}{cc} v_x & a_x \\ v_y & a_y \end{array} \right] \left[ \begin{array}{c} \xi \\ \xi^2/2 \end{array} \right] = \left[ \begin{array}{cc} +\frac{1}{3} & +\frac{1}{3} \\ +\frac{1}{3} & -\frac{1}{6} \end{array} \right] \left[ \begin{array}{c} \xi \\ \eta \end{array} \right] $$ If you believe that a linear mapping transforms a parabola into a parabola then we are done.
Otherwise. An orthogonal coordinate transformation, still according to the same theory, is obtained by a parameter shift $\;\tau$ : $$ \tau = \frac{v_x a_x + v_y a_y}{a^2_x + a^2_y} = \frac{1/3 \cdot 1/3 - 1/3 \cdot 1/6}{1/9 + 1/36} = \frac{2}{5} $$ Resulting in: $$ x = (v_x-a_x\tau)\xi + a_x\eta + (\frac{1}{2}a_x\tau^2-v_x\tau+s_x) = \frac{1}{5}\xi + \frac{1}{3}\eta - \frac{8}{75} \\ y = (v_y-a_y\tau)\xi + a_y\eta + (\frac{1}{2}a_y\tau^2-v_y\tau+s_y) = \frac{2}{5}\xi - \frac{1}{6}\eta - \frac{11}{75} $$ In matrix form: $$ \left[ \begin{array}{c} x \\ y \end{array} \right] = \left[ \begin{array}{cc} +\frac{1}{5} & +\frac{1}{3} \\ +\frac{2}{5} & - \frac{1}{6} \end{array} \right] \left[ \begin{array}{c} \xi \\ \eta \end{array} \right] - \left[ \begin{array}{c} \frac{8}{75} \\ \frac{11}{75} \end{array} \right] = \left[ \begin{array}{cc} \frac{1}{\sqrt{5}} & -\frac{2}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}} \end{array} \right] \left[ \begin{array}{c} \frac{1}{\sqrt{5}}\xi \\ -\frac{\sqrt{5}}{6}\eta \end{array} \right] - \left[ \begin{array}{c} \frac{8}{75} \\ \frac{11}{75} \end{array} \right] $$ The meaning of this is transforming $\;\eta = \xi^2/2\;$ into the original $\;(x+2y)^2=4(x-y)\;$ by scaling the $\xi$ coordinate with a factor $1/\sqrt{5}$ , scaling the $\eta$ coordinate with a factor $-\sqrt{5}/6$ (i.e. scaling and mirroring), followed by a rotation over an angle $\;\arctan(2)\;$ and a translation over $\;-(8,11)/75$ . Nobody will deny that $\;\eta = \xi^2/2\;$ represents a "standard" parabola and these transformations don't change that fact.
Viewports:
xmin := -5; xmax := 5; xmin := -1/3; xmax := 1.1; ymin := -5; ymax := 5; ymin := -1/3; ymax := 1.1;Colors:
- Blue: standard parabola $y = x^2/2$
- Red: original parabola $(x+2y)^2=4(x-y)$
- Grey: global Cartesian coordinate system / unit vectors of standard parabola.
- Lime: non-orthogonal coordinate system / unit vectors if "we are done".
- Green: orthogonal coordinate system if "Otherwise". Note that the system is left handed and that the axis corresponding with "acceleration" does not change / is parallel to the Lime one.
- Black: translation vector $(s_x,s_y)$ corresponding with "time" $\tau$ needed to travel along the (red) parabola from the origin to that position.