# Product of function and its derivative

1. Sep 29, 2011

### RasmusJes

Hi there

Can someone please explain me this step when rewriting the Darcy equation?

q = -K*h*dh/dx = -0.5*K*d(h^2)/dx

I don't understand how h*dh/dx changes to 0.5*d(h^2)/dx

Thank you.

-Rasmus

Last edited: Sep 29, 2011
2. Sep 29, 2011

### RasmusJes

I have tried to seperate variables, integrate on both sides, and then differentiate with regard to x:

q = -K*h*dh/dx
<=>
q dx = -K*h*dh
<=>
int q dx = int -K*h*dh
<=>
q*x = -0.5*K*h^2
<=>
d/dx q*x = d/dx (-0.5*K*h^2)
<=>
q = -0.5*K*d(h^2)/dx

Is that correct?

3. Sep 29, 2011

### Mute

It's just recognizing the chain rule and reversing it:

$$\frac{dy^2(x)}{dx} = 2y(x)\frac{dy(x)}{dx}$$

4. Sep 29, 2011

### RasmusJes

Wow, that took me a long time to understand :-) Thank you.
Would my suggestion, though much more awkward, still be right?