31
$\begingroup$

This question already has an answer here:

Let's say we have $x^2=25$ So we have two real roots ie $+5$ and $-5$.

But if we were to differentiate on both sides with respect to $x$ we'll have the equation $2x=0$ which gives us the only root as $x=0$.

So does differentiating on both sides of an equation alter it? If it does, then how do we conveniently do it in Integration by substitutions?
If not then what exactly is going on here ?

$\endgroup$

marked as duplicate by Git Gud, zhoraster, Mankind, mrf, Joe Johnson 126 Oct 12 '15 at 14:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 9
    $\begingroup$ By differentiating, you can find the roots of the derivative but not the roots of the original function. These are different, as you see with your example. For proof of why integration by substitution works, you can see it in most standard analysis books, or you can get a taste of it at proof-wiki. $\endgroup$ – JMoravitz Oct 11 '15 at 17:05
  • 1
    $\begingroup$ If you further differentiate a differential equation of a curve you get a another differential equation for a super-set of the family from which the curve arose. $\endgroup$ – Narasimham Oct 12 '15 at 9:09
  • 3
    $\begingroup$ You can differentiate * identities* but not functions. $\endgroup$ – Narasimham Oct 12 '15 at 9:58
  • 1
    $\begingroup$ Also Differentiating both sides of an equation $\endgroup$ – MJD Oct 16 '15 at 17:32
47
$\begingroup$

The problem is that $x^2=25$ is not an equality of functions; rather, equality holds only for a few values of $x$. If, on the other hand, we had some equality of the form $f(x)=g(x)$ that held for all real $x$, then we could differentiate both sides.

$\endgroup$
  • 6
    $\begingroup$ Do we have vocabulary to describe the difference between these two seemingly identical cases? $\endgroup$ – user83387 Oct 11 '15 at 17:07
  • 5
    $\begingroup$ I believe that the first is an equation while the second is equivalence. $\endgroup$ – Konrad Wrobel Oct 11 '15 at 17:12
  • 2
    $\begingroup$ If the first derivative of a function is 0 for some x value, then the slope of the tangent line to the original function is 0. This could mean that the function changes from increasing to decreasing, or the reverse, at those x values which make the derivative 0 (like at x=0 in y(x) = x^2), but certainly it is possible that the function merely levels off briefly and then contiues its ascent or descent (like at x=0 in y(x) = x^3). $\endgroup$ – user279039 Oct 11 '15 at 17:40
  • 3
    $\begingroup$ If helps to express it as f(x)=x², g(x)=25 which makes it clear that f(x)=g(x) is true only for two specific values of x, not the entire domain. $\endgroup$ – MSalters Oct 12 '15 at 8:03
  • 6
    $\begingroup$ @CiaPan: Yes, they are functions, but they are not the same function, so it is not an equality. $\endgroup$ – Henning Makholm Oct 12 '15 at 11:20
15
$\begingroup$

If we take $x^2 = 25$ as given, then it is indeed true that

$$ 2x \, \mathrm{d}x = 0 $$

your mistake is the supposition that this implies $2x = 0$; among the alternatives is that it is $\mathrm{d}x$ that vanishes, and consequently it does not make sense to take the "derivative with respect to $x$", for similar reasons that it doesn't make sense to divide by zero.

You're used to doing calculus in settings where the variables actually have room to vary, but that is not the case here: the entire domain over which $x$ is allowed to vary is the zero-dimensional set consisting of the two points $\pm 5$.

Zero dimensional calculus is degenerate and rather boring; variables don't have any room to vary continuously, and thus everything is (locally) constant and $\mathrm{d}u = 0$ no matter what $u$ is.


This kind of reasoning is more useful in higher dimension; e.g. two variables related by one equation (as you have when doing an integral substitution) is nondegenerate; in fact, it fits nicely into the single-variable calculus framework.

You can do more than $u$ substitutions too; there are other sorts of algebraic and geometric things you can do. e.g. to work in the unit circle, we can take as a given that the two dependent variables $x$ and $y$ satisfy

$$ x^2 + y^2 = 1 $$

from which we infer that

$$ 2x \, \mathrm{d}x + 2y \, \mathrm{d}y = 0 $$

which has various algebraic and geometric content. e.g. we can solve for

$$ \frac{\mathrm{d}y}{\mathrm{d}x} = -\frac{x}{y} $$

or we can quickly determine the tangent line at a point; e.g. the tangent line to $(0.6, 0.8)$ satisfies $1.2 \mathrm{d}x + 1.6 \mathrm{d}y = 0$. Since the tangent line varies in the same way the circle does at a point, the tangent line must have the form $1.2 x + 1.6 y = c$ for some constant $c$. Plugging in the given point gives $1.2 x + 1.6 y = 2$.

plot of circle and tangent line

(plot generated by this wolfram alpha command)

$\endgroup$
4
$\begingroup$

It depends on what you intend to mean when you write $$ x^2 = 25. $$ If $x$ is a real number, then the assertion "$x^2 = 25$" simply means what most people understand: equality between two real numbers. It is implied that $x$ is a real number too. The notion of differentiating a real number (with respect to ... nothing?) is not commonly defined and should be considered invalid.

If you use "$x^2$" as a shorthand for the function $x \mapsto x^2$, and $25$ as a shorthand for the function $x \mapsto 25$, then the assertion "$x^2 = 25$" would mean that the two functions are equal. (Two functions $f, g: \mathbb R \to \mathbb R$ are equal if and only if $f(x) = g(x)$ for all $x \in \mathbb R$.) Under this assumption, differentiation (with respect to the only variable) seems like a valid concept. Whether it yields a "true" statement or not is a separate matter. In this particular example, the initial assertion is false, so it is not a surprise that the conclusion $x = 0$ (which says that the identity function $x \mapsto x$ is equal to the zero function $x \mapsto 0$) is also nonsensical.

I think you actually can manufacture some context in which $x^2 = 25$ makes sense both before and after differentiation. For example, if $x$ is a name of a function $x: \mathbb R \to \mathbb R$, $25$ stands for the constant function $y \mapsto 25$, and $x^2$ stands for the function $x^2: y \mapsto x(y)^2$, then the statement "$x^2 = 25$" asserts that the function $x^2$ is equal to the function $25$. Differentiating this equation would yield $2x x'= 0$, by which I actually mean the function $y \mapsto 2 x(y) x'(y)$ and the function $y \mapsto 0$ are equal. (This suggests that $x$ should be a constant function if it is differentiable.)

$\endgroup$
2
$\begingroup$

mcb's answer suggests that the equal sign doesn't always have the same meaning. I disagree, the difference is in the role of $x$. When we write $(x-1)(x+1)=x^2-1$, we mean that for all $x$, $(x-1)(x+1)=x^2-1$. When we write $x^2=25$, it means for which $x$ is $x^2=25$ ? (Answer: $x=-5$ and $x=+5$).

In the first case, $x$ is used to denote any value from the function domain, whereas in the second example $x$ denotes a specific value from the function domain which corresponds to a given value in the codomain.

How does this apply to the question? Differentiating means calculating (f(x+dx)-f(x))/dx as dx goes to zero. This means evaluating f(x) at and around x. Now if f(x) and g(x) are only equal at a specific point x, then they're not equal at x+dx. That means f'(x) ≠ g'(x).

$\endgroup$
  • $\begingroup$ I'm not sure if this answers OP's questions... more like a comment to mcb's answer. $\endgroup$ – Andrew T. Oct 12 '15 at 8:24
  • $\begingroup$ I partly agree, but my approach is also valid. The questions is where you want to hide the complexity, whether in the equal sign predicate or in the way you do the variable evaluation. I would tend to hide it in the equal sign though, but I’m not closely familiar for the common ways this is axiomatized. $\endgroup$ – Lenar Hoyt Oct 12 '15 at 8:47
  • 2
    $\begingroup$ @mcb The equal signs means just that, the LHS and RHS being equal. Hiding complexity in a symbol that actually is quite well and uniquely defined (at this level) is probably not the way to go. You don't just throw an equation at somebody if you don't actually make a statement. If you want an equation to be solved you ask for that (ie solve the equation $x^2=25$ (which means find $x$ such that $x^2=25$). $\endgroup$ – skyking Oct 12 '15 at 9:55
  • $\begingroup$ @skyking You are right, I’ve corrected my answer. More precisely it means "find all assignments for $x$ such that…". $\endgroup$ – Lenar Hoyt Oct 12 '15 at 10:22
  • $\begingroup$ @AndrewT.: Valid point, added paragraph. $\endgroup$ – MSalters Oct 12 '15 at 11:16
2
$\begingroup$

$f(x) = 25$ is a statement about one value of the function $f$. We certainly cannot conclude from this that $f'(x) = 0$, since one value tells us nothing about the gradient of $f$ at $x$ or anywhere else.

Similarly, from $x^2 = 25$ alone we can't deduce anything about the gradient of the "squared" function at $x$, and hence we can't use the fact that we know this gradient is $2x$ to deduce anything about the value of $2x$.

On the other hand, if two functions are equal everywhere then we can certainly differentiate both sides and (because of the theorem that says that if a function has a derivative at all then it has one unique derivative) deduce that the resulting functions are equal everywhere. $x^2 = 25$ is not a statement about two functions of $x$ being equal everywhere, so we're not entitled by this logic to differentiate both sides by $x$. If we try to interpret $x^2 = 25$ as a functional equality then we come up with the interpretation, "the function that maps $x$ to $x^2$ is the same function as the function that maps $x$ to $25$". Now, that is a statement of functions being equal everywhere, but it's false.

When we integrate by substitution, the substitution is an equality of two functions everywhere (or at least everywhere in the range of the integration), so we have a lot more to go on than we'd have if all we knew is that two functions agree at a single point (that is to say, intersect).

$\endgroup$
2
$\begingroup$

Differentiating both sides is not generally an equality preserving operation for the following reason:

Every term can be interpreted as a function of any variable. There is a special case in which the variable in question is not present in the term (or has a 0 as coefficient), this is what's called a constant function with respect to the variable (which can be plotted as a horizontal line). So, an interpretation of $x^2=25$ is that you look for the intersection set of two curves, a horizontal line and a parabola. If you take the derivative of both sides you get different curves and thus a different intersection set, so the truth value of the equation is not preserved with the same variable assignment.

Differentiating both sides only works if the intersection points of the derivatives happen to fall on the same coordinates (e.g. $\sin x=\cos x$, $\sin' x=\cos' x$, $\cos x=\sin x$, or more trivially if both sides are equal for all variable assignments; that implication doesn’t always work the other way around though: if $f(x)≠g(x)$, then it could be that $f'(x)=g'(x)$, e.g. with $f(x) = 1$ and $g(x) = 2$).

If you want to learn about the exact mechanics behind this, what exactly function terms and variable assignments are, the keyword to search for is first order logic. This is the most commonly used axiom system that tells you exactly how we usually manipulate logical sentences and formulas and based on which we formulate the Zermelo–Fraenkel set theory, most commonly used for everything that involves sets.

$\endgroup$
1
$\begingroup$

Like algebraic addition or multiplication on both sides of an equation you cannot differentiate if there is no functional dependence between quantities on either side of a given equation.

Differentiation is performed mostly when rates of change have to be found, for example in finding a derivative, to find extrema or to find relationship with other variables. Also constants will disappear on differentiation.

$\endgroup$
  • 1
    $\begingroup$ Yepp I get it now. Thanks for the answer :) $\endgroup$ – Dèsjardins Oct 11 '15 at 17:58
1
$\begingroup$

Normally doing the same operation on both sides of an equation would result in an implication. That is if $L = R$ then it would imply that $\phi(L)=\phi(R)$.

The problem here is that the differentiation is a operation that works on a neighborhood of the point and the solutions to the first equation is isolated points. What happens is the first equation does not imply a function that would be differentiable, because it's solution is two isolated points.

$\endgroup$
1
$\begingroup$

When you are given two functions $f(x)$ and $g(x)$; and you make an equation: $$f(x)=g(x)$$ and try to solve the equation wrt. $x$; then you are essentially asking 'where (for what $x$ values) have the two function same value?'.
Suppose both functions are continuous and you can interpret them as positions of two bodies changing in time. Then the equation is a question 'when the two bodies meet?'

When you differentiate both sides, then the sides become a slope ('steepness') of the given functions, so requiring them equal is essentialy a question 'where the two functions rise (or fall) at the same rate?'.
For the kinematic analogy it would be 'when the two bodies move with the same velocity?'

Hope it's obvious now, that the two equations may have unrelated solutions.
The two functions (square and constant one) have same value where their graphs intersect, which is at $x=\pm 5$, but they have the same rate of change where their graphs have same direction of a tangent line, which is at $x=0$.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.