Calculate domain $f(x)=x^{\frac{x+1}{x+2}}$

I have the following function: $$f(x)=x^{\frac{x+1}{x+2}}$$ I tried to calculate the domain, which seems easy, and my result is: $D(f)=(0,\infty)$.

When I tried to calculate it, by using Wolfram-Alpha, I obtain: $D(f)=[0,\infty)$.

Can someone explain me the reason, or if it is just a Wolfram's error?

I proceed in this way: $$f(x)=x^{\frac{x+1}{x+2}} = e^{\frac{x+1}{x+2} \log(x)}$$ $$\left\{ \begin{array}{c} x+2\ne0 \ \Rightarrow\ x\ne -2 \\ x>0 \end{array} \right.$$ Hence: $D(f)=(0,\infty)$.

• What do you get for $0^{1/2}$ ? Is $x = e^{\log x}$ true when $x = 0$ ? Commented Feb 2, 2018 at 13:31
• @DanielV I get $0$, and $x = e^{\log x}$ is not true when $x = 0$. But I do not understand what happen with my function. Commented Feb 2, 2018 at 13:36
• well, this is the maximum domain restricted to $\Bbb R$. If $x\in\Bbb C$ then the domain is bigger than $[0,\infty)$ using the principal value of the complex logarithm. Commented Feb 2, 2018 at 13:50

The problem is on the first line of your proof. The functions $log$ and $e$ are inverse to one another, but are not both defined on all of the real line. $$log : (0, \infty) \rightarrow \mathbb{R}$$ $$e : \mathbb{R} \rightarrow (0 , \infty)$$ and so it is only true that, $$e(\log(x)) = x \mbox{ , }\forall x \in (0, \infty)$$

The function $f$ itself can be defined at zero, and also at $-1$, $$f(-1) = (-1)^{\frac{(-1)+1}{(-1) + 2}} = (-1)^{0} = 1$$

• But $-1$ is not accepted even with $D(f)=[0,\infty)$. Could you argument more? Commented Feb 3, 2018 at 8:50
• The function is defined by its domain, range and expression; it is not computed. However, it does make sense to ask whether a function is well-defined' on a particular set, i.e. whether the definition leads to a contradiction. For example; since every number in $\mathbb{R}$ has an inverse, it is possible to take a negative power of a number i.e. $a^{-b}$ where $b \in \mathbb{N}$ and $a \in \mathbb{R}$. The negative power of a negative number is not well defined for real numbers. Commented Feb 3, 2018 at 16:04

You can write the function into exponential form only if $f(x) >0$, for example consider that $x=e^{\ln x}$ only when $x>0$

• And so, how should I determinate the domain of $f(x)$? Since, writing it into exponential form, would alter the result. Commented Feb 2, 2018 at 15:19
• @NapMaster Well you can divide it into cases when $f(x)>0$,$f(x) =0$,$f(x)<0$ here you don't need to worry about $f(x) <0$ but in general you can write for example $x=-e^{\ln(-x)}$ when $x<0$ Commented Feb 2, 2018 at 15:40
• Why I do not need to worry about $f(x)<0$? Because $x^{g(x)}$ is always positive or egual to zero (as in this case)? Commented Feb 2, 2018 at 15:50
• @NapMaster Yes, exactly $x^{g(x)}\geq 0$ so you don't need to worry for $f(x) <0$ Commented Feb 2, 2018 at 15:53

However, if you input $f(0)$ into your function, it returns $0$, and there is no problem with this.

$$f(0)=0^{\frac{0+1}{0+2}}=f(0)=0^{\frac{1}{2}}=0$$

• But it is not right when you write the function in exponential form. Or I’m missing something. Commented Feb 2, 2018 at 13:38

I think Wolfram is wrong and you are right.

If we write $(f(x))^{g(x)}$ then the domain it's $$D(g)\cap\{x|f(x)>0\},$$ where $d(g)$ it's the domain of $g$.

I think it's better to define such that even $0^{\frac{1}{2}}$ does not exist, but $\sqrt0=0.$

The domain and range functionality in WolframAlpha was designed specifically to answer questions for students in algebra, precalculus, and calculus. In that context, the convention that $0^{1/2}=0$ is quite reasonable. As you might hope, it's also completely consistent with the way that Mathematica treats things. For example:

In[1]:= Log[0]
Out[1]= -Infinity

In[2]:= Exp[-Infinity]
Out[2]= 0
`

Now, as others have argued, there are other reasonable ways to interpret $0^{1/2}$ and that's fine. If your objective is to understand WolframAlpha's response, however, then it's a simple matter of design choice.