Solving a simple integral by derivating w.r.t. to constants

51 Views Asked by At

In the following notes on the solution of the Wave equation by Separation of Variables, in Example 2 the following derivation is given \begin{align*} \int_0^1 x \sin(k\pi x) d x & = \int_0^1 -\frac{1}{\pi} \frac{d}{d k} \cos(k\pi x) d x \\ & = -\frac{1}{\pi} \frac{d}{d k} \int_0^1 \cos(k\pi x) d x \\ & = -\frac{1}{\pi} \frac{d}{d k} \frac{1}{k\pi}\sin(k\pi x) \Big \vert_0^1 \\ & = -\cos(k \pi) \frac{1}{k \pi} \end{align*} I do not understand it, what he means by differentiating by $k$? In my understanding $k$ is a constant, and of course I can solve this integral easily with integration by parts and using that $\cos(k\pi) = (-1)^k$, but I am asking what he has in mind, to me it does not make sense to derivate w.r.t. $k$?

2

There are 2 best solutions below

0
On BEST ANSWER

What is really meant here is: \begin{align*} \int_0^1 x \sin(k\pi x) d x & = \int_0^1 \frac{\partial}{\partial k} \left[ (k,x)\to -\frac{1}{\pi} \cos(k\pi x)\right] (k,x) d x \\ & \color{red} = \frac{d}{d k} \left[ k\to \int_0^1 -\frac{1}{\pi} \cos(k\pi x) d x\right] (k) \\ & = \frac{d}{d k} \left[k\to -\frac{1}{\pi^2 k} \sin(k\pi) \right] (k) \\ & = -\cos(k \pi) \frac{1}{k \pi} \end{align*}

The key equality is in red. This is true for every $k\neq 0$, not only for integers.

0
On

In my understanding, k is a constant.

No! A specific value of k is a constant. However, k itself is a parameter. It is not “bound”

to a single specific value. $I(k)=\displaystyle\int_a^bf_k(x)~dx$ is a function of argument k. As is also

$S(k)=\displaystyle\sum_{n=a}^bt_k(n),~$ or $~P(k)=\displaystyle\prod_{n=a}^bu_k(n).~$ Of course, in order to differentiate something,

one must first prove that the function in question is differentiable in the first place $($with

regard to k, not the iterator x or n $)$.