The value of k such that two vectors are orthogonal in integral product spaces For $f,g \in C[0,1]$ we define inner product space $\langle f,g \rangle =\int_0^1 f(x)g(x) dx$. Find the value of $k$ such that $f(x)=\sin(kx)$ and $g(x)=\cos(7x)$ are orthogonal in this inner product space.
I have tried to solve the integral for the given $f(x)$ and $g(x)$ function, and got this result:
$$k-k\cos k \cos 7-28\sin k \sin 7 = 0$$
I don't know how to find the value of $k$. I hope you can help me.
 A: First of all, while integrating at one point you had to divide by both $k\pm7$ when finding antiderivatives of $\sin(k\pm7)x$. Such division is undefined when $k=\pm7$, so these two cases have to be considered separately. Integrating
$$\int_0^1\sin(\pm7x)\cos(7x)\,dx=\pm\int_0^1\sin(7x)\cos(7x)\,dx,$$
you will see that these integrals are not equal to zero.
Second, you made a slight mistake somewhere in your calculations, because the coefficient of $\color{red}{28}$ is incorrect. The correct equation should be
$$k-k\cos k\cos7-\color{magenta}{7}\sin k\sin7=0.$$
This is a transcendental equation, and I seriously doubt it can be solved for exact answers, where by "solving" I mean performing a sequence of steps to get to the roots of the equation. One root is easy to guess, though: $k=0$ clearly works. Are there any more?
Graphing the left-hand side or asking a numerical solver to find the roots, we'll see that there are no more integer roots, but four more real roots. For example, Mathematica input
NSolve[k - k Cos[k] Cos[7] - 7 Sin[k] Sin[7] == 0, k, Reals]
produces (remember that $k=\pm7$ have been discarded for our purposes)
{{k -> -7.}, {k -> -6.891}, {k -> -2.29558}, {k -> 0.}, {k -> 2.29558}, {k -> 6.891}, {k -> 7.}}
but I'm honestly not sure how to prove manually that these are the only roots.
