We are given the differential equation $$u''(x)-\lambda u(x)=0$$ (negative $\lambda$), with boundary conditions $u(0)=u(1)=0$. As the solution will involve trig functions I'd like to do a change of variable substitution to get the new boundary conditions $u(0)=u(\pi)=0$. To achieve this I consider a new variable $X=\pi x$ with a new constant $\gamma=\lambda \pi^2$. I then try to solve $$u''(X)-\gamma u(X)=0$$ I think this is correct but I'm not entirely sure what we're looking for in terms of equivalencies to be able to check so I'd be much obliged if someone could explain how I can determine myself whether this is a correct variable change that doesn't change the solution.
Using this change of variable I get a sequence of solutions of the form $$u_m(X)=A_m\sin(mX)$$ At this point I'd like to change back to the original variable, and so I think the solution should be of the form $$u_m(x)=A_m\sin\big (\frac{mx}{\pi}\big )$$ but once again I'm not sure if it's as simple as a reverse substitution, because $m$ depends on $\gamma$ as $-m^2=\gamma$ and I don't know if I need to account for this. Any advice would be appreciated.
When you change variables it can be a good thing to keep track of with respect to what you are differentiating. The original differential equation reads $$\frac{d^2u}{dx^2}-\lambda u=0$$ If we let $X=\pi x$ then $$\frac{du}{dx}=\frac{du}{dX}\frac{dX}{dx}=\pi\frac{du}{dX}$$ $$\frac{d^2u}{dx^2}=\frac{d}{dx}\left(\pi\frac{du}{dX}\right)=\frac{d}{dX}\left(\pi\frac{du}{dX}\right)\frac{dX}{dx}=\pi^2\frac{d^2u}{dX^2}$$ So now we get $$\pi^2\frac{d^2u}{dX^2}-\lambda u=0$$ $$\frac{d^2u}{dX^2}-\mu u=0$$ And so $\mu=\lambda/\pi^2$. Solutions for $\mu<0$ are $$u=c_1\cos\left(\sqrt{-\mu}X\right)+c_2\sin\left(\sqrt{-\mu}X\right)$$ Applying the boundary conditions we see that $c_1=0$ and when $x=1$, $X=\pi$, $\sqrt{-\mu}\pi=m\pi$, so $\mu=-m^2$, $u=\sin mX=\sin m\pi x$, $\lambda=\mu\pi^2=-m^2\pi^2$.