For what values of $x$ is the composite function defined? - Mathematics Stack Exchange most recent 30 from math.stackexchange.com 2024-08-22T19:48:08Z https://math.stackexchange.com/feeds/question/2292609?session=90e1655d57c935797c8e2f15120a4183 https://creativecommons.org/licenses/by-sa/4.0/rdf https://math.stackexchange.com/q/2292609 0 For what values of $x$ is the composite function defined? Ziad Fakhoury https://math.stackexchange.com/users/295839 2017-05-22T22:11:36Z 2017-05-22T22:31:35Z <p>Let $f(x) = 2x$ and $g(x) = \log x$ where the domain of $f(x)$ is $\mathbb R$ and of $g(x)$ is $\mathbb R^+$. Now if we compose the functions to get $$f\circ g(x)= 2\log x = \log x^2$$</p> <p>So now I know the domain is $\mathbb R^+$ but what if I wanted to define the domain to be $\mathbb R$ if we first evaluate $\log x$ adn then multiply it by $2$ we don't always get a real number. However if we square $x$ first we always do get a real number. My question is why does this happen? Is this logarithm rule defined for positive $x$ only because the proof does not require any constraints on $x$.</p> <p>Proof $$y = k\log x$$ $$\iff e^y = e^{k\log x}$$ $$\iff e^y = x^k $$ $$\iff y =\log x^k$$</p> <p>Is there something that I'm missing that would explain why the composite function acts this way? </p> https://math.stackexchange.com/questions/2292609/-/2292626#2292626 2 Answer by celtschk for For what values of $x$ is the composite function defined? celtschk https://math.stackexchange.com/users/34930 2017-05-22T22:31:35Z 2017-05-22T22:31:35Z <p>First, note that the domain of $\log x^2$ is not $\mathbb R$ because $\log 0^2$ is not defined.</p> <p>But about your actual question: For real numbers, the relation $x^k = \mathrm e^{k\log x}$ only holds for $x&gt;0$. As a counterexample, take $x=-1$ and $k=1$. Then the left hand side is $(-1)^1=-1$ and therefore negative, while the exponential function is everywhere positive.</p> -