# Derivative using product rule and chain rule

I have no idea how to do this problem I am suppose to find the derivative of $y=\cos(a^3 + x^3)$ but I do not really know how to start this problem. At first I thought I could use the sum rule and just make it $3a^2$ and $3x^2$ but for some reason I do not think that is correct, possibly because I am solving for $x$ and for some rule I can not get the derivative of a like that.

Anyways what I tried was using the product rule which gave me $\cos(a^3 + x^3)\prime -\sin(a^3 + x^3)$ not sure if that makes sense but I attempted to get the derivative of $(a^3 + x^3)$ using the chain rule and I got completely the wrong answer. I ended up with this abomination, $3\cos(a+x)^2 -\sin(a^3 + x^3)$

• It is the Chain Rule. Let $u=a^3+x^3$. Then $y=\cos u$. Note that since $a$ is assumed to be a constant, $\frac{du}{dx}=3x^2$. I think the rest of the Chain Rule has been explained to you. You should end up with $-3x^2\sin(a^3+x^3)$, or something equivalent to that. – André Nicolas Sep 22 '11 at 20:15
• This is just a relatively straightforward application of your previous question. I'd suggest looking at Jonas' answer again. – rcollyer Sep 22 '11 at 20:16
• Is $a^3+x^3$ the same as $(a+x)^3$? to me it is when I put in numbers for a and x. – toby yeats Sep 22 '11 at 20:18
• @Jordan: No, it's not the same. And it's not the same when you put in numbers, either. If $a=x=1$, then $a^3+x^3 = 1^3+1^3 = 1+1 = 2$; but $(a+x)^3 = (1+1)^3 = 2^3 = 8$. Is $2$ the same as $8$? – Arturo Magidin Sep 22 '11 at 20:20
• What do you mean "you did 2 for a and x"? Again: $a$ is a constant, $a^3$ is just a constant, the derivative of a constant is $0$, no matter how you write it. The derivative of $\pi^8$ is $0$, not $8\pi^7$, because $\pi^8$ is... a constant. The derivative of $a^3$ is $0$, because $a^3$ is a constant. – Arturo Magidin Sep 22 '11 at 20:25

Please don't write things like "$+-\sin(a^3+x^3)$"; they tend to confuse you later on. If you must put the addition and the negative sign, use parentheses, like $+(-\sin(a^3+x^3))$.

Next: $a$ is a constant; the variable is $x$. Constants have zero derivative. So you don't get $3a^2$ and $3x^2$.

Finally: the derivative of $y=\cos(a^3+x^3)$. This is a composition: if you write it as $f(g(x))$, then $g(x) = a^3+x^3$ (first you cube $x$ and add $a^3$ to it) and $f(u)=\cos u$ (then you take the cosine of whatever you have).

So $g'(x) = (a^3)' + (x^3)' = 0 + 3x^2 = 3x^2$ (again, $a$ is a constant).

On the other hand, $f'(u) = -\sin(u)$.

So, using the Chain Rule that says that $$\Bigl( f\bigl(g(x)\bigr)\Bigr)' = f'\bigl(g(x)\bigr)g'(x),$$ we have \begin{align*} \left(\cos(a^3+x^3)\right)' &= \left(f'(a^3+x^3)\right)g'(x)\\ &= \left(-\sin(a^3+x^3)\right)\left(3x^2\right)\\ &= -3x^2\sin(a^3+x^3). \end{align*}

So is y the function of x: i.e. $y(x)$? or y is the function of both x and a: i.e. $y(x,a)$?

If y is only the function of x, then you just need to use the chain rule to de the derivative:

$dy = -\sin(a^3+x^3)\cdot 3x^2 dx$

If y is the function for both x and a, then you should use chain rule on both variables:

$dy = -\sin(a^3 + x^3)\cdot (3a^2 da + 3x^2 dx)$

• Whether the function is of one variable or two depends on the context. It is a kind of convention that $x$ is a variable and $a$ is a constant, but your observation does point out to me that the question asks for the derivative, but does not specify what derivative is required. However, $x$ is stated to be variable and $a$ constant. – Mark Bennet Sep 22 '11 at 21:06