# Differentiate the function

1. Dec 8, 2008

### futurept

1. The problem statement, all variables and given/known data
The problem is to differentiate the function.
y=cos4(x2 + ex)

2. Relevant equations
cos(x)'= -sin(x), (xn)'=n*xn-1, (ex)'=ex*x'

3. The attempt at a solution
Thought it would be the chain rule. Here's what I came up with:

y'=4cos3(-sin(x2 + ex)(2x + ex)

Is this right? If not, any suggestions on what I did wrong?

Last edited: Dec 8, 2008
2. Dec 8, 2008

### gabbagabbahey

Is this a typo? What are you taking the cosine of?

3. Dec 8, 2008

### futurept

no it's not a typo. my answer was y'= 4cos3(-sin(x2 + ex))*(2x + ex)

4. Dec 8, 2008

### futurept

I did forget to say that the problem says not to simplify.

5. Dec 8, 2008

### chislam

You're close but take another look at the chain rule.

f(x) = h(g(x))

f'(x) = h'(g(x)) * g'(x)

f'(x) = h'(g'(x))

But you only messed up for one part of the chain. The innermost function was differentiated correctly.

6. Dec 8, 2008

### gabbagabbahey

In that case it is incorrect.

Try using the substitution $u=x^2+e^x$ along with the chain rule....What is $$\frac{d}{dx}\cos^4(u)$$?

7. Dec 8, 2008

### futurept

so h(x)=cos4(x2+ex)

and g(x)= x2 + ex

but would the cos4 part be another function by itself? So then it would be f(g(h(x))).

and by definition of the chain rule it would be f '(g(h(x)))*g'(h(x))*h'(x)?

8. Dec 8, 2008

### gabbagabbahey

hmmm this doesn't make much sense.

Instead, let's call $g(x) \equiv \cos^4(x)$ and $h(x)\equiv x^2+e^x$ then $f(x)\equiv\cos^4(x^2+e^x)=g(h(x))$

....follow?

Now, what does the chain rule give you for $f'(x)$?

9. Dec 8, 2008

### futurept

yeah, i think i follow. so from your definition, f'(x)=g'(h(x))*h'(x)?

10. Dec 8, 2008

### futurept

so, (cos(x^2+e^x))^4

f'(x)= 4cos(x^2+e^x)^3*-sin(x^2+e^x)*(2x+e^x)

11. Dec 8, 2008

### gabbagabbahey

Yes, much better!

12. Dec 8, 2008

### futurept

you guys are awesome