# Trig and derivatives: If condition holds for derivative, does it hold for the original equation?

Let's say I have some trigonometric identity such as $\sin(x) + 1 = -\cos(y)$. As we can see, the derivative of this identity gives $\cos(x) = \sin(y)$, which implies that $x + y = \pi/2$. Does that mean that $x + y = \pi/2$ in the original equation?

• It doesn't.Put x and y as $\frac{\pi}{4}$. Apr 23, 2015 at 12:38
• Your derivative is wrong, if you differentiate wrt to $x$ (assuming $y=y(x))$ then you would get $\cos x=\frac{dy}{dx} \sin y$. In general, to your further point, the answer is no. Apr 23, 2015 at 12:39
• what do you mean by $1+\sin x = \cos y$ an idnetity?
– abel
Apr 23, 2015 at 13:09
• You are right, it's an equation, not an identity. Sorry. Apr 23, 2015 at 13:55

The derivative of this identity does NOT give you $\cos(x) = \sin(y)$

You need to know what you are differentiating over, and there are several options:

1. Differentiating over $x$, if $y$ is an independent variable, the identity becomes $\cos(x) = 0$
2. Differentiating over $y$, seeing $x$ as an independent variable, means you get $0=\sin y$
3. If $y$ is a function of $x$, then after derivation (over $x$), you get $\cos x = \frac{dy}{dx}\cdot \sin y$
4. If $x$ is a function of $y$, then you get $\frac{dx}{dy}\cdot\cos(x) = \sin y$.
• I see. I was having doubts about what was it that I was differentiating over and whether you could do what I did there or not. Thanks for helping! Apr 23, 2015 at 12:44
• Can the downvoter please explain how this answer is WRONG and deserving of a downvote?
– 5xum
Apr 23, 2015 at 12:46

If $x$ and $y$ are supposed to be numbers, then $\sin(x)$ and $\cos(y)$ are also numbers, and the derivative of both sides will be $0$. Then you just get the true, but useless, identity $0=0$.

I think you confused yourself by including $x$ and $y$. Typically an identity is in the form of some equation that includes the same variable on both sides, say $x$, and the equation holds for any value of $x$ (or any value that in the the domain of both sides).

Some identities have the two instances of $x$ on the same side, for example: $$\left(\cos\left(x\right)\right)^2 + \left(\sin\left(x\right)\right)^2 = 1$$

if we take the derivative of both sides with respect to $x$:

$$-2\cos(x)\sin(x) + 2\sin(x)\cos(x) = 0$$

That is true! But be careful. We could have started with any constant right-hand side, not just $1$. The derivative of any constant with respect to $x$ is $0$.

What this means is that if you know the identity is true, and then take a derivative, the new identity will also be true. But you cannot go the other way. And that is because when you integrate the derivative of a function, you don't recover the constant offset in the function (because the derivative of that term is always zero). This ambiguity is the reason why you include a constant of integration when stating the anti-derivative of a function.

Still, though, if you're stuck on trying to find an identity of some form, you can integrate something you do know, and then solve for the constant.

For example, suppose you didn't know about kinetic and potential energy. And you didn't ever hear about conservation of energy. But you did know how to write down the equations for an object in free-fall:

$$\frac{\text{d}^2}{\text{d}t^2}y(t) = a(t) = -g$$

and you chose the coordinates of $y$ such that $y(0)=0$, and you also know the object starts at rest. Then you know the velocity and position of the object as

$$\frac{\text{d}}{\text{d}t}y(t) = v(t) = -gt$$ $$\frac{\text{d}}{\text{d}t}y(t) = p(t) = -\frac{1}{2}gt^2$$

(note that $a(t)$, $v(t)$, $p(t)$ are mnemonics for acceleration, velocity, and position)

Let's suppose that somehow you decided that the following was remarkable:

$$a(t) \cdot v(t) - g \cdot v(t) = 0$$

If you take the anti-derivative with respect to $t$ (The first term requires $u$-substitution with $u=v(t)$. The second term requires the fundamental theorem of calculus.), you get

$$\frac{1}{2}\left(v(t)\right)^2 - g \cdot p(t) = C$$

If you did the integration of each term separately, you get three constants of integration. You can combine them all into one constant.

That above is a statement of conservation of energy. The first term is the kinetic energy per unit mass, and the second term is the potential energy per unit mass. The constant reflects that we don't know the ground level for defining the potential energy, so we don't know how much potential energy the object starts with. But whatever it is, the energy is constant.

• Thanks for the awesome post! This totally cleared my doubts. Apr 24, 2015 at 15:25