Define
$$g(x)=\ln^2x$$
and
$$f(x) = \ln x$$
Note that
$$g(1) = \ln^2 1 = 0$$
Therefore,
$$f(g(1)) = \ln 0$$
Which does not exist. You are also right saying that $\ln x$ is only defined for $x>0$. But if we define your function as $f(g(x))$ as we did above, we notice that $f(x)$ is only defined for $g(x) > 0$. Note that for all $x>0$, $g(x) \geq 0$, but equals $0$ at $g(1)$. We now have enough information to determine the domain of $f(g(x))$ as
$$(0, 1) \cup (1, \infty) $$
0
Bumbble Comm
On
As you noted, $\ln x$ is defined (as a real function) only when $x>0$.
$\ln ((\ln x)^2$) is defined when $(\ln x)^2>0$.
For all $x>0$, $(\ln x)^2\ge0$, but $(\ln x)^2=0=\ln x$ when $x=1$.
Therefore, $\ln((\ln x)^2)$ is defined when $x>0$ and $x\ne1$.
Define $$g(x)=\ln^2x$$ and $$f(x) = \ln x$$ Note that $$g(1) = \ln^2 1 = 0$$ Therefore, $$f(g(1)) = \ln 0$$ Which does not exist. You are also right saying that $\ln x$ is only defined for $x>0$. But if we define your function as $f(g(x))$ as we did above, we notice that $f(x)$ is only defined for $g(x) > 0$. Note that for all $x>0$, $g(x) \geq 0$, but equals $0$ at $g(1)$. We now have enough information to determine the domain of $f(g(x))$ as $$(0, 1) \cup (1, \infty) $$