# Differentiation problem

Discussion in '\$1 Daily Competition' started by xpi0t0s, Aug 9, 2009.

1. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
f(x) = x+x+x... (x times)
g(x) = x^2

Obviously f(x) = g(x), for example
if x=4 then f(x)=x+x+x+x = 4+4+4+4 = 16
if x=5 then f(x)=x+x+x+x+x = 5+5+5+5+5 = 25

Now let's differentiate both.

f'(x)=d/dx x + d/dx x + d/dx x... (x times)
and since d/dx x = 1, f'(x)=1+1+1... (x times) = x.

g'(x)=d/dx x^2 = 2x

Explain why f'(x) != g'(x).

2. ### shabbirAdministratorStaff Member

Joined:
Jul 12, 2004
Messages:
15,296
Likes Received:
366
Trophy Points:
83
3. ### mayjuneNew Member

Joined:
Jun 14, 2009
Messages:
817
Likes Received:
33
Trophy Points:
0
Occupation:
Student
Location:
Pune,Delhi
It is equal,
f(x)= x + x + x + x (x times) = x * x
Now,
f'(x) = (d/dx x) * x + x * (d/dx x)
f'(x) = 1 * x + x * 1
f'(x) = x + x = 2x = g'(x)

4. ### KshiteejNew Member

Joined:
Jul 6, 2009
Messages:
79
Likes Received:
0
Trophy Points:
0
Occupation:
Software Engineer
Location:
Mumbai
Is that mean that f'(X) and g'(X) are same in above case. As the question was to explain why f'(x) != g'(x).

5. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
Let me clarify that != is used in the C sense, i.e. DOES NOT EQUAL.
So the puzzles is to explain why f'(x) does not equal g'(x).

6. ### SaswatPadhi~ Б0ЯИ Τ0 С0δЭ ~

Joined:
May 5, 2009
Messages:
1,343
Likes Received:
55
Trophy Points:
0
Occupation:
STUDENT !
Location:
Orissa, INDIA
Home Page:
f'(x) != g'(x) because there is an error in the calculation of f'(x).

When you write f(x) = x+x+x .. (x times) .. +x ,
what do you mean by 'x times' ?? x is not something like 1, 2, 3 .. it's just a variable.
So, you are writing f(x) as sum of a variable, variable times.

Now, when you differentiate f(x) : [[ D(h(x)) = Derivative of h(x) w.r.t. x ]]
you do it like f'(x) = D(x) + D(x) + ..(x times).. + D(x) which is invalid.
The formula D(nx) = nD(x) is valid ONLY for constant n, not a variable one.
So, f'(x) != x * D(x)

PS : The correct way will be to do it like :
f(x) = x + x + ..(x times).. + x
So, f'(x) = D(x) + D(x) + ..(x times).. + D(x) + x
Note that, I have used the multiplication formula above.
Multiplication formula : D( u(x) * v(x) ) = v(x)*D(u(x)) + u(x)*D(v(x))

So, f(x) = x + x + ..(x times).. + x
=> f'(x) = xD(x) + x
=> f'(x) = x+x = 2x = g'(x)

7. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
> When you write f(x) = x+x+x .. (x times) .. +x , what do you mean by 'x times' ??

Seems a fair question. If x=3 then f(x)=x+x+x. You see there are 3 x's, because x=3.
Similarly if x=7 then f(x)=x+x+x+x+x+x+x, and there are 7 x's because x=7.

So we have f(x)=f1(x)+f2(x)+f3(x)+...+fN(x), where f1(x)=f2(x)=..=fN(x)=x and N=x, if that makes it any clearer.

> Now, when you differentiate f(x) : [[ D(h(x)) = Derivative of h(x) w.r.t. x ]]
> you do it like f'(x) = D(x) + D(x) + ..(x times).. + D(x) which is invalid.

Why is it invalid? According to http://mathworld.wolfram.com/Derivative.html "Derivatives of sums are equal to the sum of derivatives" (exact quote), see equation 36: [f(x)+...+h(x)]' = f'(x)+...+h'(x).

> Note that, I have used the multiplication formula above

Yes, I saw that, and that's what I think mayjune may have done too. But the product rule (equation 38 on the same page) relates to a(x).b(x), not a(x)+b(x), and so doesn't apply, because my f(x) is a *sum* of functions of x, not a *product* of functions of x.

Currently both proposed answers effectively declare the question invalid, but the question is not invalid and so there is no correct answer so far. Anyone else fancy a go? I won't add further clarifications, as I think the question as stated was quite clear. I get notifications of answers to this thread, so when I see the correct answer I will confirm this fairly quickly (during UK daylight hours).

8. ### shabbirAdministratorStaff Member

Joined:
Jul 12, 2004
Messages:
15,296
Likes Received:
366
Trophy Points:
83
Its already 24 hours and so the winner is the OP as per the rule

9. ### mayjuneNew Member

Joined:
Jun 14, 2009
Messages:
817
Likes Received:
33
Trophy Points:
0
Occupation:
Student
Location:
Pune,Delhi
Let's have the answer then, this question was asked to me by my friend two years ago, he gave the same explanation me and saswat gave, lets see how you answer it xp

10. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
OK. To solve this you have to go back to first principles of differentiation.
See equation 6 at http://mathworld.wolfram.com/Derivative.html
f'(x)=lim(h->0) [f(x+h)-f(x)]/h

For f(x)=x, f'(x)=lim(h->0) [f(x+h)-f(x)]/h
=lim(h->0) [(x+h)-x]/h
=lim(h->0) [h]/h
=1

For g(x)=x^2, g'(x)=lim(h->0) [g(x+h)-g(x)]/h
=lim(h->0) [(x+h)^2-x^2]/h
=lim(h->0) [(x^2+2hx+h^2)-x^2]/h
=lim(h->0) [2hx+h^2]/h
=lim(h->0) [2x+h]
=2x

If f(x)=f1(x)+f2(x)+f3(x)+...+fN(x) then by equation 36:
f'(x)=f1'(x)+f2'(x)+f3'(x)+...+fN'(x)
So if fp(x)=x (where p=1..N) and fp'(x)=1 then
f'(x)=1+1+1+...1 (N times)
so f'(x)=N.
If N=x then f'(x)=x.

So for example let's say N=4.
Then f(x)=x+x+x+x, or f(x)=4x if you prefer.
Then f'(x)=1+1+1+1=4
This is constant for all x, even when x=4.

g(x)=x^2, so g'(x)=2x, which is 8 when x=4.

Since 4!=8, f'(x)!=g'(x), and this is true for all x and all N.

11. ### mayjuneNew Member

Joined:
Jun 14, 2009
Messages:
817
Likes Received:
33
Trophy Points:
0
Occupation:
Student
Location:
Pune,Delhi
i get it and i don't get it...

12. ### SaswatPadhi~ Б0ЯИ Τ0 С0δЭ ~

Joined:
May 5, 2009
Messages:
1,343
Likes Received:
55
Trophy Points:
0
Occupation:
STUDENT !
Location:
Orissa, INDIA
Home Page:
I know that. (And, obviously everyone else does too.)
Did you go through the next line : D(nx) = nD(x) ONLY for constant value of n.

You can say D(x + x + x) = 3.
But, D(x + x + ..(y times).. + x) != y when y depends on x.

When y depends on x, D(x + x + ..(y times).. + x) = yD(x) + xD(y).
You have to apply product formula 'coz you are expressing one function (in this case, x) as the sum with itself, another function (in this case, y) times.
In your question, y depends on x as y=x.
So, f'(x) = xD(x) + xD(x) = 2x != x.

And, LOL @ what you mentioned as the correct answer.
You are trying to show that 2x != x by substituting x = 4 !!

The first principle and blah.. blah.. blah.. was simply unnecessary. Yeah it was unnecessary. You get the same results by differentiation formula too and you can still show x != 2x by showing 4 != 8. LOL

I wonder the basis on which my answer was rejected. The correct answer (by the OP) sounds too silly.

And, one more thing; the following (in bold) is the silliest thing I have ever seen in my life :
If any one on the earth would accept that, I am ready to leave programming and maths the very day.

13. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
Could you give me a single value for N where that doesn't hold please?
(By construction this must be a positive integer, of course)

As I gave two examples where it does hold I think that's fair enough.
Let me repeat those two examples just in case it's not clear:

Let's say x=3. f(x)=x+x+x; f'(x)=1+1+1=3 so f(x)=x.
x=7: f(x)=x+x+x+x+x+x+x; f'(x)=1+1+1+1+1+1+1=7 so f(x)=x.

So let's see a counter-example rather than just a declaration that I'm silly.

14. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
Correction (missed the '):

Let's say x=3. f(x)=x+x+x; f'(x)=1+1+1=3 so f'(x)=x.
x=7: f(x)=x+x+x+x+x+x+x; f'(x)=1+1+1+1+1+1+1=7 so f'(x)=x.

15. ### mayjuneNew Member

Joined:
Jun 14, 2009
Messages:
817
Likes Received:
33
Trophy Points:
0
Occupation:
Student
Location:
Pune,Delhi
this is gonna be controversial....

16. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
It doesn't have to be. If Saswat stops being confrontational and sticks to the facts without bothering with the insults then this can be sorted out very easily.

17. ### SaswatPadhi~ Б0ЯИ Τ0 С0δЭ ~

Joined:
May 5, 2009
Messages:
1,343
Likes Received:
55
Trophy Points:
0
Occupation:
STUDENT !
Location:
Orissa, INDIA
Home Page:
I was offline 'coz there was some problem with the broadband connection here.
Things have been sorted out now ....

Let's get back to the topic then.

Just go to some maths prof, and if he agrees that f'(x) = x is true, I will truly give up maths and programming. Just announce it here that the prof agrees that f'(x) = x.

And, what counter-example are you talking abt ?
Differentiation is not a game or something -- calculus is a vast branch of Maths and what you are trying to show will prove Newton and Leibniz's work false !!

As I said initially -- I am reiterating, taking x = 3, or x = 7 is a very big misconception of yours.
Let me talk your way :

Let's have x = 3.
So, f(x) = x + x + x = 3 + 3 + 3 = 9
=> f'(x) = 0.
Agree ??

Same for x= 7 or anything. Now, do you agree to this ???

Please do seriously revise differentiation, b4 next post. And, I am serious abt this thing, not 'coz it's some contest question or anything; but 'coz I love maths.

And, I do stick to facts ... but not false ones.
And I can very boldly and (may be rudely) oppose those who support any false facts.

18. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
Likes Received:
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
OK, let's take N items instead of x items.
Let's set N=5 and so f(x)=x+x+x+x+x - that's 5 X's, because N=5.
Let's also completely ignore the value of x for now.

Now let's differentiate f(x); this gives 1+1+1+1+1, which is 5.
We can further simplify f(x)=5x and this differentiates directly to 5, because d/dx (ax^b) = abx^(b-1).

Do you at least agree with that?

19. ### SaswatPadhi~ Б0ЯИ Τ0 С0δЭ ~

Joined:
May 5, 2009
Messages:
1,343
Likes Received:
55
Trophy Points:
0
Occupation:
STUDENT !
Location:
Orissa, INDIA
Home Page:
Taking N = 5 instead of x is OK,
'coz N is independent of x and hence can be treated as a constant.

Do, D(Nx) = ND(x).

20. ### SaswatPadhi~ Б0ЯИ Τ0 С0δЭ ~

Joined:
May 5, 2009
Messages:
1,343
Likes Received:
55
Trophy Points:
0
Occupation:
STUDENT !
Location:
Orissa, INDIA
Home Page:
But you can't do so when N depends on x.
Like, you can't take N = x.