# 3 different solutions to the same integral

1. Mar 15, 2017

### Karol

1. The problem statement, all variables and given/known data

2. Relevant equations
$$\frac{dy}{dx}=f(x)~\rightarrow~dy=f(x)dx~\rightarrow~y=\int f(x)dx$$

3. The attempt at a solution
If the interpretation of an integral is the derivative at that point, x1 for example, then these can't all be solutions since the tangent, the derivatives, at x1 are different.
The constant C can't compensate for that since it shifts the graph up or down, not to the sides, as the solutions $~\sin^2x+C_1$ and $~\cos^2x+C_2$ are, but the solution $-\frac{1}{2}\cos(2x)+C_3$ is neither that nor that.

2. Mar 15, 2017

### PeroK

An integral is not a derivative. It's an anti-derivative. If you differentiate two functions that differ by a constant, you get the same derivative

3. Mar 15, 2017

### Karol

My mistake, of course an integral is an anti-derivative. if i differentiate these 3 functions i indeed get $~2\sin x\cos x~$, how come? indeed the slopes to the graphs of these functions differ for the same x. so my question is can 3 different functions have the same derivative?

4. Mar 15, 2017

### PeroK

$f(x) = x+1$
$g(x) = x+2$
$h(x) = x + 3$

Three different functions. Same derivative.

5. Mar 15, 2017

### Staff: Mentor

In fact, an infinite number of functions can have the same derivative, provided that all of the functions are vertical translations of one another. For example, y = x2, y = x2 + 1, y = x2 + 2, etc. all have exactly the same derivative.

6. Mar 15, 2017

### PeroK

And, of course:

$f(x) = \sin^2(x)$
$g(x) = -\cos^2(x)$
$h(x) = -\frac12 \cos(2x)$

7. Mar 15, 2017

### Karol

Indeed:
Strange, since these functions without the cubes look different

8. Mar 15, 2017

### Ray Vickson

You seem to have forgotten the basic trigonometric identities.

9. Mar 15, 2017

### Karol

I know: $~\sin^2 x+\cos^2 x=1~\rightarrow~\sin^2x=1-\cos^2 x$
And not just $~-\cos^2 x~$.
$$\cos(2x)=\cos^2 x-\sin^2 x=2\cos^2 x-1=1-2\sin^2 x$$

10. Mar 15, 2017

### Ray Vickson

Now you have forgotten the constants of integration. We have $\cos^2 x + C_1 = -\sin^2 x + C_2$ for some constants of integration $C_1,C_2$. There is no contradiction. You will notice in the book extract you included that the book used three separate constants of integration.

11. Mar 16, 2017

### Karol

But:
$$-\frac{1}{2}\cos(2x)\neq -2\sin^2 x+C$$

12. Mar 16, 2017

### PeroK

See post #6 for the correct relationship.

13. Mar 16, 2017

### Karol

$$-\frac{1}{2}\cos(2x)=-\frac{1}{2}+\sin^2 x=\sin^2 x+C$$
You're right.
Thank you PeroK, Mark44 and Ray Vickson