I'm trying to solve the following ODE using the Ritz method:
$$\frac{d^2 \theta}{d x^2} - m^2\theta = 0$$
With the boundary conditions
$$\frac{d\theta}{dx}\Bigg{|}_{x=0} = 0$$
$$\theta(1) = \theta_0$$
I'm trying to follow the book "Conduction Heat Transfer" by Vedat S. Arpaci (chap. 8). So this is what I did so far:
1) Transform the problem into a variational problem:
$$ \int_o^1 \Bigg{(}\frac{d^2 \theta}{d x^2} - m^2\theta\Bigg{)} \delta\theta\ dx = 0 $$
2) (Ritz Method) Select a convergent sequence of functions such that
$$ y(x) = \sum_{n=0}^Na_n\phi_n(x) $$
I choose the following $y(x)$:
$$y(x) = \sum_{n=0}^N\theta_0(1 - (1 - x^2)(a_0 + a_1x^2 + a_2x^4 + ...))$$
Which yields the approximation
$$ y(x) = \phi_0(x) = \theta_0(1 - (1 - x^2)a_0) $$
3) Apply (2) in (1) in order to obtain $a_0$
$$ \int_o^1 \Bigg{(}\frac{d^2 \theta}{d x^2} - m^2\theta\Bigg{)} \delta\theta\ dx = $$ $$ \theta_0\int_o^1 \Bigg{(}2a_0 - m^2(1 - (1-x^2)a_0) \Bigg{)} \delta\theta\ dx = 0 $$
Where $\delta F$ is the variation of the functional $F(x, y, y^\prime)$, that is,
$$ \delta F = \frac{\partial F}{\partial y}\delta y + \frac{\partial F}{\partial y^\prime}\delta y^\prime $$
And this is where I got stuck. The book suggest the following:
$$ \theta_0\int_o^1 \Bigg{[}2a_0 - m^2(1 - (1-x^2)a_0) \Bigg{]} \delta\theta\ dx = $$ $$ \theta_0\int_o^1 \Bigg{[}2a_0 - m^2(1 - (1-x^2)a_0) \Bigg{]} \Bigg{[} -(1-x^2)\delta a_0 \Bigg{]} dx = 0 $$
But I don't understand the application of $\delta \theta$ in this case, because I though $a_0$ was meant to be a constant (Should it really?), then $\theta$ is not a functional in relation to it.
Assuming $a_0$ is a function, and the step above is correct (Which I don't understand why), I would also be stuck in the next step:
$$ \theta_0\int_o^1 \Bigg{[}2a_0 - m^2(1 - (1-x^2)a_0) \Bigg{]} \Bigg{[} -(1-x^2)\delta a_0 \Bigg{]} dx = 0 $$
For this step, the book suggests to use the following identity, which I was unable to apply here:
$$ \int_0^l(l^2-x^2)^mdx = \frac{(2m)!!}{(2m+1)!!}l^{2m+1} $$
I would be grateful for any suggestion at this point.