0
$\begingroup$

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$$

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$.

Proof $$y = k\log x$$ $$\iff e^y = e^{k\log x}$$ $$\iff e^y = x^k $$ $$\iff y =\log x^k$$

Is there something that I'm missing that would explain why the composite function acts this way?

$\endgroup$
1
  • 2
    $\begingroup$ After you're "however" you are defining get another function $h(x) = x^2$ and then composing it $g\circ h(x) = \ln(x^2) = 2\ln |x|$. But $h(x)$ isn't among the functions at your disposal. $\endgroup$
    – amWhy
    Commented May 22, 2017 at 22:29

1 Answer 1

2
$\begingroup$

First, note that the domain of $\log x^2$ is not $\mathbb R$ because $\log 0^2$ is not defined.

But about your actual question: For real numbers, the relation $x^k = \mathrm e^{k\log x}$ only holds for $x>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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .