Chain rule for product of functions

  • Thread starter smath42
  • Start date
  • #1
10
0
Here is a simple question :

let f(g(x)) = h(x)*g(x).

I want to calculate df/dx.

If I use the product rule, I get g(x)h'(x) + h(x)g'x).

Now if I use the composition/chain rule, I get

df/dx = df/dg * dg/dx = h(x) * g'(x) which is different.

I guess my df/dg = h is wrong, but I can't see what it should be.

Any help is welcome:-)
 

Answers and Replies

  • #2
pwsnafu
Science Advisor
1,080
85
I don't want to double up on ##x##, so let's use ##y##.
What is ##f(y)## in the question? What is it's derivative?
 
  • #3
10
0
that's where I'm confused...
my first thought that in f(g(x)) f(y) is the function that multiplies y by h(x). therefore if I derivate with respect to y, I get h(x). Which apparently is wrong...

no your question replaces x by y, which in fact doesn't really change anything so I'd say
f(y) obviously equals to h(y)g(y) so its derivative is h'(y)g(y)+g'(y)h(y)...

now I'm again confused
 
  • #4
pwsnafu
Science Advisor
1,080
85
f(y) obviously equals to h(y)g(y)

This is wrong.
 
  • #5
10
0
humm... so you've seen where my problem is... what's f ?
 
  • #6
10
0
are there 2 f ? the one if f(x) = h(x)*g(x) and the one if f(g(x)) ?
 
  • #7
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,151
8,951
that's where I'm confused...
my first thought that in f(g(x)) f(y) is the function that multiplies y by h(x). therefore if I derivate with respect to y, I get h(x). Which apparently is wrong...

no your question replaces x by y, which in fact doesn't really change anything so I'd say
f(y) obviously equals to h(y)g(y) so its derivative is h'(y)g(y)+g'(y)h(y)...

now I'm again confused

Yes, you've got yourself into a terrible tangle here! If you define another function:

##k(x) = f(g(x)) = h(x)g(x)##

You may be able to see the problem. ##f(x) \ne k(x)##
 
  • #8
10
0
OK I see that now, but I'm still in trouble to calculate df/dg. I'd like to say f(u) = h(x)*u but then again I end up with h(x) for df/dg
 
  • #9
pwsnafu
Science Advisor
1,080
85
Instead of trying ##k(x) = (f \circ g)(x) = h(x) \cdot g(x)## start with something simpler ##k(x) = (f \circ g)(x) = (l \circ g) (x) \cdot g(x)##
 
  • #10
10
0
hum...
then here too, I can't find what l is although I see l(g(x)) should be h(x)
 
  • #11
10
0
Could you guys explain me what is f here please.
I don't know why but I really have trouble seing where is the composition here
 
  • #12
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,151
8,951
Could you guys explain me what is f here please.
I don't know why but I really have trouble seing where is the composition here

It's easier if you set ##y = g(x)##, so that ##x = g^{-1}(y)##:

##f(y) = f(g(x)) = h(x)g(x) = h(g^{-1}(y))y##
 
  • #13
10
0
hum ok I can now do

f'(y) = h(g^{-1}(y)) + yg^{-1}'(y)h'(g^{-1}(y)) = h(x) + yh'(g^{-1}(y))/g'(g^{-1}(y))
then g'df/dy = g'h+hg'

ok... thanks !
 
  • #14
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,151
8,951
hum ok I can now do

f'(y) = h(g^{-1}(y)) + yg^{-1}'(y)h'(g^{-1}(y)) = h(x) + yh'(g^{-1}(y))/g'(g^{-1}(y))
then g'df/dy = g'h+hg'

ok... thanks !

You could have got that directly from the initial equation:

##f(g(x)) = h(x)g(x) \ \Rightarrow \ f'(g(x))g'(x) = h'(x)g(x) + h(x)g'(x)##
 
  • #15
10
0
I'm sorry I must have a very slow mind today but I don't see exactly why the implication and the second equality.
 
  • #16
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,151
8,951
I'm sorry I must have a very slow mind today but I don't see exactly why the implication and the second equality.

Simply differentiate both sides wrt ##x##.
 
  • #17
10
0
ah ok :-D
I was trying to see how one could find h'g+hg' from f'(g)*g' "only"
 

Related Threads on Chain rule for product of functions

  • Last Post
Replies
7
Views
22K
  • Last Post
3
Replies
65
Views
8K
  • Last Post
Replies
2
Views
37K
  • Last Post
Replies
4
Views
8K
  • Last Post
Replies
11
Views
466
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
12
Views
969
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
14K
  • Last Post
Replies
1
Views
1K
Top