5

I am having trouble finding the derivative of the following:

$$y = x^x+x^3+3^x+3^3$$

$$\frac{dy}{dx}= x \times x^{(x-1)}+3x^2+3^x\ln3+0$$

I think the $x^x$ part is wrong. Any help would be appreciated.

dave5678
  • 181
  • 2
  • 3
  • 8
  • 13
    Hint on how to compute the derivative of $x^x$: think of it as $e^{x\ln x}$. – froggie May 17 '12 at 21:52
  • froggie gives probably the simplest way. If you know of the chain rule of functions of two variables, you can also do it as $y=u^v$, where $u(x)=x$ and $v(x)=x$. Use $$\frac{dy}{dx}=\frac{\partial y}{\partial u},\frac{du}{dx}+\frac{\partial y}{\partial v},\frac{dv}{dx}.$$ – Jyrki Lahtonen May 17 '12 at 21:56

3 Answers3

9

The $x^x$ part is indeed wrong: when you have the independent variable in both the base and the exponent, you can use logarithmic differentiation. Let $y=x^x$; then $\ln y=\ln(x^x)=x\ln x$. Now differentiate both sides with respect to $x$: $$\frac{d}{dx}(\ln y)=\frac1y\cdot\frac{dy}{dx}\;,$$ and $$\frac{d}{dx}(x\ln x)=x\cdot\frac1x+1\cdot\ln x=1+\ln x\;,$$ so $$\frac1y\cdot\frac{dy}{dx}=1+\ln x\;.$$ Now just solve this for $dy/dx$, replace $y$ by its value $x^x$, and you’ll have the derivative of $x^x$.

This if of course equivalent to rewriting $x^x$ as $e^{\ln(x^x)}=e^{x\ln x}$ and differentiating it as a composition of exponential and product; either method works fine, so take your pick.

Brian M. Scott
  • 616,228
3

Because the exponential and logarithmic functions (with the same base) are inverse functions, $$x^x=e^{\ln(x^x)}$$ and using the log of a power property, $$x^x=e^{\ln(x^x)}=e^{x\cdot\ln x}.$$

So, you can find the derivative of $x^x$ by finding the derivative of $e^{x\cdot\ln x}$.

Isaac
  • 36,557
2

Well you are almost right but for a term. When you wrote $\dfrac{d x^x}{dx} = x \times x^{x-1}$, you treated that the $x$ occurring in the exponent as a constant. However, since it is a variable, you need to add another term treating the other $x$ in $x^x$ as a constant. Hence, you need to add the term $x^x \ln(x)$ since $\dfrac{d a^x}{dx} = a^x \ln(a)$. In general, $$\dfrac{d \left(u(x)^{v(x)} \right)}{dx} = \underbrace{v(x) \times u(x)^{v(x)-1}}_{\text{treating } v(x) \text{ constant}} + \underbrace{u(x)^{v(x)} \log(u(x))}_{\text{treating } u(x) \text{ constant}}$$ The above follows from the chain rule. $$\left. \dfrac{d \left(u(x)^{v(x)} \right)}{dx} = \frac{\partial \left(u(x)^{v(x)} \right)}{\partial u} \frac{du}{dx} \right \rvert_{v(x)- \text{costant}} + \left. \frac{\partial \left(u(x)^{v(x)} \right)}{\partial v} \frac{dv}{dx} \right \rvert_{u(x)- \text{costant}}$$ A clear approach would be to write $x^x = e^{x \ln (x)}$, (as other have already stated) and work out the derivative.

  • thank you for editing my post, I'm going to have to look over your answer again, it seems advanced to me. – dave5678 May 17 '12 at 22:20
  • @dave5678: Marvis is applying the multivariable chain rule, which you might not know about if you're taking a single-variable calculus course (in the U.S., typically the first 2 semesters of the calculus sequence). I wrote about this here and gave some references in College Mathematics Journal, Pi Mu Epsilon Journal, and Mathematics Teacher. – Dave L. Renfro May 18 '12 at 11:19
  • @Dave L. Renfro: Thank you for clearing that up, I am indeed taking the single variable calculus route at this moment, in fact I just had a calculus final today. – dave5678 May 19 '12 at 03:43