3

For example, if we want to differentiate $y=x^x,$ we can turn it into $e^{\ln(y)}=y=e^{x\ln(x)},$ seemingly ignore when $x<0,$ differentiate, then convert back. This method can make differentiation (and solving limits) easier, so is obviously important, but I can't find a general proof that justifies it.


EDIT: $x^x$ has domain $\mathbb R^+,$ so the above was a bad example!

Instead, consider $y:\mathbb{R}\to\mathbb{R}.$ If we want to differentiate or take the limit of $y,$ can we take $\ln$ of $y$ without considering when $y\le0$ for $x\in\mathbb{R}\:?$ Then, differentiate or take the limit of $\ln y$ with respect to $x,$ then solve the equation for $\frac{\mathrm dy}{\mathrm dx}$ or $y$ and get the answer?

I'm guessing that since the domain was never explicitly stated, I missed that $y>0$ for $\ln y.$

So, if $x\in\mathbb{R}$ and we change $y=x$ to $\ln y=\ln x,$ we let $x=-x$ for $x<0,$ right?

ryang
  • 38,879
  • 14
  • 81
  • 179
  • 5
    The map $x^x$ is typically not defined for $x < 0$. While $(-1)^{-1}$ might be ok, we quickly run into complications with $(-1/2)^{-1/2}$, and yet more with negative irrational numbers. – Theo Bendit Jul 22 '22 at 23:39
  • 1
    We can just describe our reasoning more carefully. For example, we might write the argument as follows. Suppose that $y:\mathbb R^+ \to \mathbb R$ is the function defined by $y(x) = x^x$ for all $x > 0$. Notice that $\log(y(x)) = x \log(x)$ for all $x > 0$. Taking the derivative of both sides, we find that $y’(x) /y(x) = 1 + \log(x)$ for all $x > 0$. Thus, $y’(x) = x^x (1+ \log(x))$ for all $x > 0$. – littleO Jul 22 '22 at 23:47
  • Even if we define $x^x$ for some values of $x\le 0$ (for example, If $x$ is an integer or a rational number with an odd denominator in lowest terms we have no issues) it doesn't make sense to talk of differentiating at point where $f(x) =x^x$ is continuous. And if $x<0$, $x^x$ can't be continuous as $x^x < 0$ for any $x$ with an odd numerator and denominator (in lowest terms) bu $x^x > 0$ for any $x$ with an even numerator and odd denominator and every interval contains infinite points of both type (as well as points where $x^x$ can not be defined). – fleablood Jul 23 '22 at 00:20

4 Answers4

2

When performing logarithmic differentiation, texts frequently pretend that the function being taken logarithm of is positive then subsequently hand-wave away that restriction.

Consider $y:\mathbb{R}\to\mathbb{R}$. If we want to differentiate $y,$ can we take $\ln$ of $y$ without considering when $y\le0$ for $x\in\mathbb{R}\:?$

I'm guessing that since the domain was never explicitly stated, I missed that $y>0$ for $\ln y.$

So, if $x\in\mathbb{R}$ and we change $y=x$ to $\ln y=\ln x,$ we let $x=-x$ for $x<0,$ right?

No; no; no.

How is taking $\ln$ of both sides in calculus justified?

By considering only nonzero values of the function, and taking absolute value before taking $\ln.$

Here's a rigorous presentation of using logarithmic differentiation to determine $f'(x)$ for an identically nonzero $f:$ \begin{align}\text{Let }y=f(x); \text{then }\ln|y|&=\ln|f(x)|\\&=\text{<apply logarithmic identities>}\\\frac{\mathrm dy}{\mathrm dx}\left(\frac1y\right)&=\text{<differentiate the above using $\frac{\mathrm d}{\mathrm dx}\ln|h(x)|=\frac{h’(x)}{h(x)}$>}\\&\ldots\end{align}

(justification of $\frac{\mathrm d}{\mathrm dx}\ln|h(x)|=\frac{h’(x)}{h(x)}$).

As suggested above, this technique has a drawback: it does not apply wherever $f(x)=0$.


Addendum

Ok so if I'm getting this right, if $f(\alpha)=0,$ we can not make any conclusion about $f'(\alpha).$

Yes; for example, logarithmic differentiation by itself gives this result: $$x\ne0\implies \frac{\mathrm d(x^3)}{\mathrm dx}=3x^2.$$

ryang
  • 38,879
  • 14
  • 81
  • 179
  • 1
    Ok so if I'm getting this right it does not matter if y is negative, since we take the absolute value and $d(\ln(-y))/dx$ when $y<0$ will give the same expression as $d\ln(y)/dx$ when $y>0$.But $ \In y$ is not defined when $y=0$ so we can not make any conclusion about the function at those points. using the assumption. – per persson Jul 23 '22 at 23:37
  • 1
    This has been very helpful. Thank you. – per persson Jul 24 '22 at 05:55
1

The function $y = x^x$ does not have domain equal to $\mathbb{R}$. Its domain is in fact $D = (0, +\infty)$ which makes the rewrite of $y$ as $e^{xlnx}$ coherent.

$y = e^{lnx^x}$ is just the definition of logarithm

finch
  • 1,611
  • 4
  • 7
1

Taking logarithms or exponentials of both sides of an equation is justified because $\ln x$ and $e^x$ are monotone, strictly increasing functions, thus the mapping $x=e^y$ and $\ln x=y$ is bijective and hence unambiguous.

Suzu Hirose
  • 11,660
  • But $x<0$ is not defined for $\text{ln}x$ do we need to take this into consideration or does it not matter if we convert back. – per persson Jul 23 '22 at 00:04
  • 1
    Sorry I thought Theo Bendit's comment under the question addressed that, so I didn't include it in my answer. I didn't like the other two answers by finch and MathFail because they didn't address whether this mapping is unambiguous, so I added this answer. – Suzu Hirose Jul 23 '22 at 00:06
0

This proof is from the function and inversed function:

Let $f(x)=e^x$ and we have inversed function $f^{-1}(x)=\ln(x)$

$$f(f^{-1}(x))=x \Rightarrow e^{\ln(x)}=x$$

$$f^{-1}(f(x))=x \Rightarrow \ln(e^{x})=x$$

MathFail
  • 21,128