Re: inhomogeneous DE via expansion
dwsmith said:
I think I have to use Green's function since I need an exact solution but I have gotten that.
However, if \(k = k_m\), why would \(u_m(x)\) have to be orthogonal to \(\phi(x)\). For the case \(k_m = k_n\), the LHS is always zero.
\[
\sum_na_n[k_m^2 - k_n^2]\sin(k_nx) = \frac{2}{\ell}\sum_n\sin(k_nx)
\]
Therefore, in order \(\int_0^{\ell}u_m(x)\phi(x)dx = 0\), they must be orthgonal. When \(k_m\neq k_n\), I don't see why that would be the case.
Hmm. Well, here's my analysis. First, we write $\phi$ in terms of the eigenfunctions:
\begin{align*}
\phi(x)&= \sum_{n=1}^{ \infty}b_{n} \sin( \pi n x / \ell) \\
\int_{0}^{ \ell} \sin( \pi m x / \ell) \, \phi(x) \, dx&= \sum_{n=1}^{ \infty} \left[b_{n} \int_{0}^{ \ell} \sin( \pi n x / \ell) \sin( \pi m x / \ell) \, dx\right] \\
\int_{0}^{ \ell} \sin( \pi m x / \ell) \, \phi(x) \, dx&= \sum_{n=1}^{ \infty} \left[b_{n} \delta_{nm} (\ell/2) \right] = b_{m} (\ell/2).
\end{align*}
Therefore,
$$b_{m}= \frac{2}{ \ell}\int_{0}^{ \ell} \sin( \pi m x / \ell) \, \phi(x) \, dx.$$
Now, from the equation I wrote down in the previous post, we have that
$$\sum_{j=1}^{ \infty} \left[ (k^{2}-( \pi j / \ell)^{2}) \, a_{j} \sin( \pi j x / \ell) \right]= \sum_{p=1}^{ \infty} b_{p} \sin( \pi p x / \ell).$$
Multiplying through by $\sin( \pi m x / \ell)$ and integrating from $0$ to $\ell$ yields
$$\sum_{j=1}^{ \infty} \left[ (k^{2}- \pi^{2} j^{2}/ \ell^{2}) \, a_{j} \, \delta_{mj} \, ( \ell/2) \right]= \sum_{p=1}^{ \infty} b_{p} \delta_{mp}( \ell/2),$$
and collapsing both sums due to the Kronecker Deltas yields
$$a_{m}= \left( \frac{ \ell^{2}}{k^{2} \ell^{2}- \pi^{2} m^{2}} \right) \, b_{m}.$$
Therefore, the final solution in all its glory is
\begin{align*}
y(x)&= \sum_{m=1}^{ \infty} \left[
\frac{ \ell^{2}}{k^{2} \ell^{2}- \pi^{2}m^{2}} \cdot \frac{2}{ \ell} \cdot \int_{0}^{ \ell} \sin( \pi m \xi/ \ell) \, \phi( \xi) \, d \xi \cdot \sin( \pi m x/ \ell) \right] \\
&=\sum_{m=1}^{ \infty} \left[
\frac{ 2 \ell}{k^{2} \ell^{2}- \pi^{2}m^{2}} \cdot \int_{0}^{ \ell} \sin( \pi m \xi/ \ell) \, \phi( \xi) \, d \xi \cdot \sin( \pi m x/ \ell) \right].
\end{align*}
It's an exact solution (assuming I've done everything correctly), with no Green's functions required.
If you want to use Green's functions, go ahead. Alas, I know only the very basics of the theory, so I cannot follow you there. But this method of solution is fairly straight-forward, involving nothing more complicated than Fourier analysis.