# How to differentiate a three term function?

JoshHolloway
I know this is how to differentiate a funtion consisting of two terms:
$$f(x)=xy , f'(x)=x'y+y'x$$

But is this how to differentiate three terms:
$$f(x)=xyz , f'(x)=(x'y+y'x)+(y'z+z'y)+(x'z+z'x)$$

Homework Helper
JoshHolloway said:
I know this is how to differentiate a funtion consisting of two terms:
$$f(x)=xy , f'(x)=x'y+y'x$$

But is this how to differentiate three terms:
$$f(x)=xyz , f'(x)=(x'y+y'x)+(y'z+z'y)+(x'z+z'x)$$
odd notation you have. I assume you mean y,z are functions of x that is y(x) and z(x). Thoughout ' denotes partial differentiation with respect to x.
anyway
(xyz)'=x'yz+xy'z+zyz'
for a general function f(u1,...,un) you can differentiate holding all functions except one constant at a time. so (In what follows y'=0)
if
g(x)=f(u1(x),u2(x),...,un(x))
g'(x)=(f(u1(x),u2(x),...,un(x)))'
=(f(u1(x),u2(x),...,un(x)))'
=(f(u1(x),u2(y),...,un(y)))'|y=x
+(f(u1(y),u2(x),...,un(y)))'|y=x
+...
+(f(u1(y),u2(y),...,un(x)))'|y=x
or more concreatly for three functions...
if
g(x)=f(u1(x),u2(x),u3(x))
g'(x)=(f(u1(x),u2(x),u3(x)))'
=(f(u1(x),u2(x),u3(x)))'
=(f(u1(x),u2(y),u3(y)))'|y=x
+(f(u1(y),u2(x),u3(y)))'|y=x
+(f(u1(y),u2(y),u3(x)))'|y=x

Last edited:
$$f(x)=xy$$
This is wrong notation, unless y is a constant. I assume you mean something like

$$f(x,y)=xy$$

and you're differentiating with respect to a third variable,

\begin{align*} f'(x(t),y(t)) &= \frac{d}{dt} \left[ f(x(t),y(t)) \right] \\ &=\frac{d}{dt}(xy)\\ &=\left( \frac{dx}{dt} \right) y+ \left( \frac{dy}{dt} \right)x\\ &=x'y+y'x \end{align}

where your notation refers to the product rule of differentiation - stop me if I'm misreading you.

In which case

$$\frac{d}{dt}f(x,y,z)$$ where $$f(x,y,z)=xyz$$

where x, y, and z are functions of t, can be obtained by substitution:

$$u=yz,$$ (shorthand for u(t) = y(t)z(t) )
\begin{align*} \frac{d}{dt}f(x,y,z)&=\frac{d}{dt}(xyz)\\ &=\frac{d}{dt}(xu)\\ &=\left( \frac{dx}{dt} \right) u + \left( \frac{du}{dt} \right) x\\ &=x'yz+\frac{d(yz)}{dt}x\end{align}

Do you see how this works?

Last edited by a moderator:
What you might have been thinking is f is a function of t, as in

$$f(t)=x(t) \cdot y(t) \cdot z(t)$$

JoshHolloway
You guys are a little bit over my head. I did not realize what I wrote was incorrect notation. I apologize, but I am extremely new at calculus. What does f(x,y) mean? I know that f(x) means that f is a function of x. And f(x)=y, which is the dependent variable, since it is a function of x. But I do not know what f(x,y) or f(x,y,z) means. Could someone please explain this to me in words. But as for my original question, I meant when you differentiate an expresion containig three variables, do to basically use the product rule the same way one would with two variable, and the add all of this togeter: (x'y+y'x)+(y'z+z'y)+(x'z+z'x) ? Or do you do it like this: (xyz)'=x'yz+xy'z+zyz' , as lurf has said? I am assuming the second way.

Homework Helper
it would be simplest just to remove the y's from all of your equations

hod do i differentiate sin(x)cos(x)x^2 with respect to x.

this is straight forward. you can dfferentiate f(x)g(x) so set f(x)=sin(x)cos(x) and g(x)=x^2 and differentiate that.

you should'nt write f(x)=xy at this stage. it's ok to think of y as a function of x, and g(x) as that function, but saying f(x)=xy sort og implies that y is a function of x, though we don't know what (it certainly isn't f(x))

Homework Helper
The notation is not all that bad as long as it is understood that x, y, and z are functions of some other variable, say t (the problem with the prime notation is that it doesn't make clear what the independent variable is).

One way to see it is to write xyz= (xy)z and treat (xy) as a single function of t:
(xyz)'= ((xy)z)'= (xy)'z+ (xy)z' using the "two term" product rule. But (xy)'= x'y+ xy', again by the "two term" product rule. So (xyz)'= (x'y+ xy')z+ (xy)z'= x'yz+ xy'z+ xyz'.

Homework Helper
JoshHolloway said:
You guys are a little bit over my head. I did not realize what I wrote was incorrect notation. I apologize, but I am extremely new at calculus. What does f(x,y) mean? I know that f(x) means that f is a function of x. And f(x)=y, which is the dependent variable, since it is a function of x. But I do not know what f(x,y) or f(x,y,z) means. Could someone please explain this to me in words. But as for my original question, I meant when you differentiate an expresion containig three variables, do to basically use the product rule the same way one would with two variable, and the add all of this togeter: (x'y+y'x)+(y'z+z'y)+(x'z+z'x) ? Or do you do it like this: (xyz)'=x'yz+xy'z+zyz' , as lurf has said? I am assuming the second way.
f(x) means we provide a number and get one back.
f(x,y) means we provide wto numbes and get one back
When you are differentiating a function where x appears several times like in the product rule f(x)=u(x)v(x) for example here is something that may help. First it would be much easier is all the x's but one were constants. What you can do is let all the x's but one at a time be constants and add up what you get for each.
I will write the x's I consider constant as X and the other one as x to make it more clear.
f(x)=u(x)v(x)
f'(x)=(u(x)v(x))'
=(u(x)v(X))'+(u(X)v(x))'
=u'(x)v(X)+u(X)v'(x)
=u'(x)v(x)+u(x)v'(x)
Nice if you forget the product rule due to head injury.
Also the ever popular
f(x)=x^x
f'(x)=(x^x)'
=(x^X)'+(X^x)'
=X(x^(X-1))+(x^X)log(x)
=x(x^(x-1))+(x^x)log(x)
=(x^x)(1+log(x))

JoshHolloway
Excellent. Thanks lurf.

Benny
I think I remember seeing something about how to differentiate a product of three functions(each function is of a single variable) in my book. For p(x) = f(x)g(x)h(x), to find p'(x) I think there's a pattern that can be used: A product of n functions(of the same single variable) has a derivative with n terms, with each term being a product of n functions(of the same single variable).

So for p(x) = f(x)g(x)h(x) you get $$p'\left( x \right) = f'\left( x \right)g\left( x \right)h\left( x \right) + f\left( x \right)g'\left( x \right)h\left( x \right) + f\left( x \right)g\left( x \right)h'\left( x \right)$$. As in, you move the prime 'across one function' for each successive term. Not entirely sure if the method works in general though.