# Homework Help: Computing derivative

1. Mar 1, 2015

### goonking

1. The problem statement, all variables and given/known data
y = x 2sinx

2. Relevant equations

3. The attempt at a solution
Ok, so If I see an x in an exponent, I would want to use ln to 'bring it out', right?

ln y = ln (x 2sinx) = ln x + ln 2sinx = ln x + sinx ln2

now I take the derivative :

y'/y = 1/x + cosx ln2

multiply both sides by y

y' = [1/x + cosx ln2] (x 2sinx)

is everything correct?

2. Mar 1, 2015

### Brian T

Yes it looks correct. You could have also done a product rule + chain rule expansion. That way you could avoid the implicit form,

3. Mar 1, 2015

### goonking

ok, cool. Thanks!

4. Mar 1, 2015

### SteamKing

Staff Emeritus
Is x multiplied by 2sin x, or is it something else?

5. Mar 1, 2015

### goonking

yes , multiplied.

6. Mar 1, 2015

### goonking

could you show your work for that?

7. Mar 1, 2015

### Ray Vickson

It is correct, but should be re-written as $y' = 2^{\sin(x)} + \ln(2)\, \cos(x)\, x \, 2^{\sin(x)}$. The way YOU wrote it would not allow you to easily get $y'(0)$ because it would involve the "illegal" fraction $\frac{0}{0}$. The way I wrote it presents no problems at $x = 0$.

8. Mar 1, 2015

### Brian T

y = x 2sinx

Product rule says $y'(x) = f'(x)g(x) + f(x)g'(x)$. Choose f(x) = x, and g(x) = 2sinx. (although order doesn't really matter)

Now, all you have to do is compute the derivative of f, the derivative of g, and then plug. The derivative of g also involves the chain rule. Try figuring it out for yourself, it should be more rewarding. You already know the answer so you'll know if you've got it. Good luck :D

9. Mar 1, 2015

### goonking

Wait, how did you get 2sin(x)+ln(2)cos(x) when I got 1/x + ln2 cosx?

10. Mar 1, 2015

### goonking

but to get the derivative of 2sinx, I need to use ln right? is there any other way?

11. Mar 1, 2015

### Brian T

The derivative of some scalar a, raised to the x, is:
$\frac{d}{dx}[a^x] = (a^x)ln(a)$ ... as a side note unrelated to this problem, think about when the scalar a = e.
So, applying the chain rule the derivative of scalar a, raised to some f(x), is:
$\frac{d}{dx}[a^{f(x)}] = (a^{f(x)})ln(a)f'(x)$

12. Mar 1, 2015

### goonking

scalar a = constant right?

also, this whole time, i thought $\frac{d}{dx}[a^x] = (x)ln(a)$ , i thought you only move the exponent out, but you moved both the base AND exponent.

edit: Oh, I think i understand now. if you have a constant to the x power, like 52x then it becomes 52x ln5 ⋅2

but what if it is a variable to a power of another variable, for example y5x

is it going to be y5x ln y ⋅5 ?

Last edited: Mar 1, 2015
13. Mar 1, 2015

### Staff: Mentor

Here's how it works. As long as x > 0, you can write x as $e^{ln(x)}$.
So $5^{2x} = (e^{ln(5)})^{2x}$
Using one of the rules of exponents, the above is equal to $e^{2x*ln(5)}$. This form is much easier to differentiate.