Find the Fourier-Bessel Series for $f(x)$ With Respect to the Orthogonal Set: How Was $w(x)$ Found? I have the following problem:

If $f(x) = x$, $0 < x < 2$, find the Fourier-Bessel series for $f(x)$ with respect to the orthogonal set $\{ J_1 (k_n x) \}$, where $k_n$ is the $n$th positive root of the equation $J_1(2k) = 0$.
You will need the following information:
$$\int_0^c x[J_\alpha (k_n x)]^2 \ dx = \dfrac{c^2}{2} [J_{\alpha + 1} k_n(c)]^2,$$
where $k_n$ is a root of $J_\alpha (kc) = 0$.
Also,
$$\dfrac{d}{dx}[x^\alpha J_\alpha (x) ] = x^\alpha J_{\alpha - 1}(x)$$

Somehow, my instructor wrote (deduced/induced?) that $w(x) = x$. I'm assuming this is the weight function. I don't understand how this was this deduced (induced?)?
I would greatly appreciate it if people could please take the time to clarify this.
EDIT: It seems that I'm probably going to have to make this a bounty. In which case, I'd appreciate it if responders could also include a full solution, showing each step and explaining why steps were taken.
 A: The weight function $w$ comes with the very definition of the orthogonality. A set of function is orthogonal only with respect to a specific weight function. For the Bessel function, the weight is $w(x)=x$.
If you ask where this particular weight function comes from, here is the derivation.
The Bessel functions are the solutions of the ordinary differential equation of $y(x)$
$$x^2y''+xy'+(x^2-\alpha^2)y=0.$$
This is equivalent to
$$(xy')'+\Big(x-\frac\alpha x\Big)y=0.$$
For a given $\alpha$, let $J$ be a real valued solution of the above ODE on $[0,\infty)$. Let $k_1$ and $k_2$ be two distinct positive roots of $J$. We have
$$\frac{d}{dx}\Big(x\frac{d}{dx}J(k_ix)\Big)+\Big(k_i^2x-\frac\alpha x\Big)J(k_ix)=0,\ \forall i.$$
Multiplying the above for $i=1$ by $J(k_2x)$ and integrate over $[0,1]$
$$\int_0^1 J(k_2x)\frac{d}{dx}\Big(x\frac{d}{dx}J(k_1x)\Big)\,dx+\int_0^1\Big(k_1^2x-\frac\alpha x\Big)J(k_2x)J(k_1x)\,dx=0. \tag1$$
Integrating by parts twice on the first integral gives
$$\int_0^1 \frac{d}{dx}\Big(x\frac{d}{dx}J(k_2x)\Big)J(k_1x)\,dx+\int_0^1\Big(k_1^2x-\frac\alpha x\Big)J(k_2x)J(k_1x)\,dx=0 \tag2$$
since the boundary terms of the integral dropps out due to $J(k_1)=J(k_2)=0$ and $xJ(k_ix)=0$ at $x=0$. Subtract (2) with its subscripts $1$ and $2$ switched from (1), we have 
$$\int_0^1 xJ(k_1x)J(k_2x)\,dx=0$$
since $k_1\ne k_2$. In other words $J(k_1x)$ and $J(k_2x)$ are orthoganal to each other with weight function $x$ on the interval $[0,1]$.
