# Tangent line of a lemniscate at (0,0)

I need to find the tangent line of the function $y=g(x)$ implicitly defined by

$(x^2+y^2)^2-2a^2(x^2-y^2)=0$

at $(0,0)$, but I don't know how.

I can't use implicit differentiation and evaluate at $(0,0)$, because when $y=0$ I can't use the Implicit Function Theorem to calculate the derivative and, therefore, the slope of the tangent line.

I'd appreciate your help.

Thanks.

$$(x^2+y^2)^2-2a^2(x^2-y^2)=0$$

Solving for $y$ we do substitution $t=y^2$

$$x^4+x^2t+t^2-2a^2x^2+2a^2t=0$$ $$t^2+t(2x^2+2a^2)+x^4-2a^2x^2=0$$ $$t=\pm a\sqrt{4x^2+a^2}-x^2-a^2$$

As $t=-a\sqrt{4x^2+a^2}-x^2-a^2$ is not positive we get solutions

$$y=\pm \sqrt{a\sqrt{4x^2+a^2}-x^2-a^2}$$

Let $f(x)=\sqrt{a\sqrt{4x^2+a^2}-x^2-a^2}$. We have $y=\pm f(x)$, $y'=\pm f'(x)$. The derivative of $f$ is the following

$$f'(x)=\frac{1}{2\sqrt{a\sqrt{4x^2+a^2}-x^2-a^2}}\cdot \left( a\frac{1}{2\sqrt{4x^2+a^2}}\cdot(8x)-2x \right)$$ $$=\frac{x\left(a\frac{2}{\sqrt{4x^2+a^2}}-1\right)}{\sqrt{a\sqrt{4x^2+a^2}-x^2-a^2}}$$

Function $f$ is continuous and differentiable at any small neighborhood of $0$ excluding $0$ itself. The limits of $f'(x)$ as $x\to0^\pm$ exist and they are given by

$$\lim\limits_{x\to0^+}f'(x)=1$$ $$\lim\limits_{x\to0^-}f'(x)=-1$$

Thus at $(0,0)$ there are two tangent lines with equations

$$t_1(x)=x$$ $$t_2(x)=-x$$