[[!redirects Sandbox > history]] [[!redirects Sandbox]] < [[nlab:Sandbox]] Given a real quadratic function $f:\mathbb{R} \to \mathbb{R}$, $f(x) \coloneqq a x^2 + b x + c$ for real numbers $a \in \mathbb{R}$, $b \in \mathbb{R}$, $c \in \mathbb{R}$ such that $\vert a \vert \gt 0$, as shown above $$ f(x) = a \left(x + \frac{b}{2a}\right)^2 - \frac{b^2 - 4 a c}{4a} $$ The [[exponential function]] $\exp:\mathbb{R} \to (0, \infty) \hookrightarrow \mathbb{R}$ and [[natural logarithm]] $\ln:(0, \infty) \to \mathbb{R}$ are well defined and are [[inverse functions]] of each other. The square function could be defined on the open interval $(0, \infty)$ as $x^2 = \exp(2 \ln(x))$ and on the open interval $(-\infty, 0)$ as $x^2 = \exp(2 \ln(-x))$. Substituting the above results in the following: $$ f(x) = \begin{cases} a \exp\left(2 \ln \left(x + \frac{b}{2a}\right)\right) - \frac{b^2 - 4 a c}{4a} & x \gt -\frac{b}{2a} \\ a \exp\left(2 \ln \left(-\left(x + \frac{b}{2a}\right)\right)\right) - \frac{b^2 - 4 a c}{4a} & x \lt -\frac{b}{2a} \end{cases} $$ Suppose that $x \gt -\frac{b}{2a}$. Then the inverse function of $x^2$, $g$, is given by the functional equation $$x = a \exp\left(2 \ln\left(g(x) + \frac{b}{2a}\right)\right) - \frac{b^2 - 4 a c}{4a}$$ $$x + \frac{b^2 - 4 a c}{4a} = a \exp\left(2 \ln\left(g(x) + \frac{b}{2a}\right)\right)$$ $$\frac{x}{a} + \frac{b^2 - 4 a c}{4a^2} = \frac{4 a x + b^2 - 4 a c}{4a^2} = \exp\left(2 \ln\left(g(x) + \frac{b}{2a}\right)\right)$$ $$\ln\left(\frac{4 a x + b^2 - 4 a c}{4a^2}\right) = \ln(4 a x + b^2 - 4 a c) - 2 \ln(2a) = 2 \ln\left(g(x) + \frac{b}{2a}\right)$$ $$\frac{1}{2} \ln(4 a x + b^2 - 4 a c) - \ln(2a) = \ln\left(g(x) + \frac{b}{2a}\right)$$ $$\exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c) - \ln(2a)\right) = \exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c)\right) \exp(-\ln(2a)) = \frac{1}{2a} \exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c)\right) = g(x) + \frac{b}{2a}$$ $$g(x) = \frac{-b + \exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c)\right)}{2a}$$ Now, suppose that $x \lt -\frac{b}{2a}$. Then the inverse function of $x^2$, $h$, is given by the functional equation $$x = a \exp\left(2 \ln\left(-\left(h(x) + \frac{b}{2a}\right)\right)\right) - \frac{b^2 - 4 a c}{4a}$$ $$x + \frac{b^2 - 4 a c}{4a} = a \exp\left(2 \ln\left(-\left(h(x) + \frac{b}{2a}\right)\right)\right)$$ $$\frac{x}{a} + \frac{b^2 - 4 a c}{4a^2} = \frac{4 a x + b^2 - 4 a c}{4a^2} = \exp\left(2 \ln\left(-\left(h(x) + \frac{b}{2a}\right)\right)\right)$$ $$\ln\left(\frac{4 a x + b^2 - 4 a c}{4a^2}\right) = \ln(4 a x + b^2 - 4 a c) - 2 \ln(2a) = 2 \ln\left(-\left(h(x) + \frac{b}{2a}\right)\right)$$ $$\frac{1}{2} \ln(4 a x + b^2 - 4 a c) - \ln(2a) = \ln\left(-\left(h(x) + \frac{b}{2a}\right)\right)$$ $$\exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c) - \ln(2a)\right) = \exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c)\right) \exp(-\ln(2a)) = \frac{1}{2a} \exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c)\right) = -\left(h(x) + \frac{b}{2a}\right)$$ $$-\exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c)\right) = h(x) + \frac{b}{2a}$$ $$h(x) = \frac{-b - \exp\left(\frac{1}{2} \ln(4 a x + b^2 - 4 a c)\right)}{2a}$$ If $a \gt 0$, then $g$ and $h$ have domain $$\left(c - \frac{b^2}{4a}, \infty\right)$$ and if $a \lt 0$, $g$ and $h$ have domain $$\left(-\infty,c - \frac{b^2}{4a}\right)$$ category: redirected to nlab