Why we can't differentiate both sides of a polynomial equation? [duplicate]

Suppose we had the equation below and we are going to differentiate it both sides: \begin{align} &2x^2-x=1\\ &4x-1=0\\ &4=0 \end{align}

This problem doesn't seems to happens with other equation like $$\ln x =1$$ or $$\sin x = 0$$, we can keep differentiating these two without getting "$$4=0$$", for example. This why I asked about polynomials.

PS: I'm not trying to solve any of these equations by differentiating then. But differentiation or integration helps and solving equations?

I remember that sometimes to solve trigonometry equtions like $$\sin x = \cos x$$ we had to square both side so we could use the identity $$\sin^2x + \cos^2x =1$$. Even thought squaring appears to make it worse because we have a new root.

marked as duplicate by Eric Wofsey real-analysis StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 24 at 23:45

• The function $2x^2-2$ is not the same as the function $1$ so it makes no sense to differentiate both sides of that equation the way you have. – lulu Mar 24 at 19:38
• $x=1$ and $x=0$ don't work, either. Differentiating both sides gives you $1=0.$ @Pinteco In general, an "equation" is one where we are trying to solve for individual values, but differentiation requires values in an area around the value for $x,$ so in general, if you are trying to solve $f(x)=g(x),$ you cannot differential both sides and get an equation. If, however, for every $x$ in an interval, you have $f(x)=g(x)$, then you can differentiate both sides and still get an equation, potentially more solutions, but containing the solutions in that interval. – Thomas Andrews Mar 24 at 19:43
• You can indeed take derivatives, like any other function, as much as you want, on both sides of an equality between objects for which the operation of taking derivatives is defined. The objects being equated in the first equality are not functions, but constant numbers. You could, if you want, tread them as constant functions of some other variable $y$ and then take derivative with respect to $y$. This would give you the true equation $0=0$. – user647486 Mar 24 at 19:56
• Instead you computed as if taking derivative with respect to $x$. Derivative with respect to $x$ is defined for some functions of $x$, . But that is not an equality between functions of $x$. Equality of functions, by definition, is an equation that is satisfied for all values of $x$. – user647486 Mar 24 at 19:59
• If we differentiate the functions on each side of $\ln x = 1$, we get $\frac{1}{x} = 0$, which is also an absurdity. – Eric Towers Mar 24 at 22:52

It's important to remember that we can only differentiate functions. When you write the expression $$2x^2-x=1$$ you are no longer dealing with a function. Instead, this expression describes only the solutions $$x$$ to a given equation. For instance, $$f(x) = 2x-x^2$$ is a function, but $$2x-x^2 = 0$$ is not.

When two functions intersect, they don't have to have the same slopes. For example, $$y=x^2, y=x$$.

• This is essentially the correct answer, but it might be worth pointing out that $$2x^2-x=1$$ describes the point(s) where the function on the left-hand side crosses the function on the right-hand side. – MSalters Mar 24 at 23:05

The kicker is that our domain of truth isn't "big enough" to allow it.

From your example, the functions on both sides only agree on $$\left\{-\frac12,1\right\}$$ However, we can't differentiate functions at isolated points of their domains!

On the other hand, consider the equation $$\sin x=\cos x\tan x.$$ The functions here agree everywhere the function on the right-hand side is defined--namely, all points except the odd integer multiples of $$\frac\pi2.$$ We can therefore differentiate at all such points, to obtain $$\cos x=-\sin x\tan x+\cos x\sec^2 x,$$ which one can verify to be true for all such points.

• The same thing can be said about indefinite/definite integration? – Pinteco Mar 24 at 19:54
• For indefinite integration, how would you define an antiderivative of a function whose domain is a finite set? For definite integration, it turns out to be doable, but we'd end up with $0$ on both sides, rather than what we might expect. – Cameron Buie Mar 24 at 20:01

In general if two functions $$f$$ and $$g$$ agree at point $$a$$ they need not have the same derivative there i.e. $$f(a)=g(a)$$ does not imply $$f'(a)=g'(a)$$. This is readily seen by taking $$f(x)=x$$ and $$g$$ to be the constant function at $$1$$. Then for example $$f(1)=g(1)$$ but $$1=f'(1)\neq g'(1)=0$$.

We shouldn't be surprised since to compute the derivative of a function $$f$$ at a point $$a$$ we need to know how $$f$$ behaves in a neighbourhood $$(a-h, a+h)$$ for some $$h>0$$ of that point. Knowing the value of the point is not enough. There are many ways to draw a differentiable curve through a point.

In the event that the two functions do agree on a neighbourhood, then the desired claim does follow.

Differentiation isn't an algebraic operation like squaring or addition. Same thing with integration.

You found a counterexample yourself: if you could solve $$2x^2-2x=1$$ with diff. then you would've gotten $$x=-1/2,1$$, not (the contradictory statement) $$4=0$$.