Let $\lim_{x\to a}\frac{a^4-(x^2-x\left | x \right |-a^2)^2}{x-a}=L$, find the value of $\lim_{x\to a}\frac{x(x^2-x\left | x \right |-a^2)^2-a^4\left | a \right |}{x-a}$ for $a\neq0$.
Using L'Hopital rule I found that the answer is $a^4-aL$. My question is how to solve this problem without using L'Hopital rule.
Here's my attempt using L'Hopital. $$ \begin{aligned} \lim_{x\to a}\frac{a^4-(x^2-x\left | x \right |-a^2)^2}{x-a}&=L\\ \lim_{x\to a}\frac{d}{dx}(x^2-x\left | x \right |-a^2)^2&=-L...(1)\\ \end{aligned} $$ Let the numerator equal to zero. $$ (x^2-x\left | x \right |-a^2)^2=a^4...(2) $$ Ergo $$\begin{aligned} \lim_{x\to a}\frac{(x^2-x\left | x \right |-a^2)^2-a^4\left | a \right |}{x-a}&=\lim_{x\to a}(x^2-x\left | x \right |-a^2)^2+x\cdot\frac{d}{dx}(x^2-x\left | x \right |-a^2)^2\\ &=a^4-aL \end{aligned} $$
Hint: The numerator can be written as $$-x \left( \left| x \right| -x \right) \left( x \left| x \right| +2\, {a}^{2}-{x}^{2} \right) $$ and now distinguish the cases $$x\geq 0$$ or $$x<0$$