# Homework Help: Boundary value ODE

1. Aug 8, 2017

### WendysRules

1. The problem statement, all variables and given/known data
$y''+\lambda y = 0 ; y(0) = 0, y(\pi)-y'(\pi) = 0$

2. Relevant equations

3. The attempt at a solution
So, we have to test when lambda is equal to, less than and greater than 0.
Let $\lambda = 0$ thus, the ODE becomes $y'' = 0$ which implies solutions of the form $y(t) = C_1t+C_2$ which would make the derivative $y'(t) = C_1$. When we apply our boundary conditions we see that $y(0) = C_2 = 0$ and $y(\pi)-y'(\pi) = C_1 \pi - C_1= 0$ therefore $C_1 = 0$ which are trivial solutions.

Let $\lambda < 0$ thus, the ODE becomes $y''- \lambda y = 0$ which implies solutions of the form $y(t) = C_1e^{\sqrt{\lambda}t}+C_2e^{-\sqrt{\lambda}t}$ which would make the derivative $y'(t) = \sqrt{\lambda}C_1e^{\sqrt{\lambda}t}-\sqrt{\lambda}C_2e^{-\sqrt{\lambda}t}$. When we apply our boundary conditions we see that $y(0) = C_1+C_2 = 0$ therefore $C_2=-C_1$ and $y(\pi)-y'(\pi) = C_1e^{\sqrt{\lambda}\pi}+C_2e^{-\sqrt{\lambda}\pi}-[\sqrt{\lambda}C_1e^{\sqrt{\lambda}\pi}-\sqrt{\lambda}C_2e^{-\sqrt{\lambda}\pi}].$ If i make my substitution from the first boundary condition, we see this become $C_1e^{\sqrt{\lambda}\pi}-C_1e^{-\sqrt{\lambda}\pi}-\sqrt{\lambda}C_1e^{\sqrt{\lambda}\pi}-\sqrt{\lambda}C_1e^{-\sqrt{\lambda}\pi}$ The two positive square root terms cancel out and we get $C_1[-e^{-\sqrt{\lambda}\pi}-e^{-\sqrt{\lambda}\pi} = 0$ Since the exponentials can't ever be zero, it implies that $C_1 = 0$ this, these solutions are trivial.

But this is wrong, so I must've done something wrong in this step. If anyone could point out my error, I'd appreciate it. Am I allowed to say $\sqrt{\lambda}C_1 = C_1$? Maybe I should convert to hyperbolic trig functions? That would be my guess, but I don't want to do more work if I just made a silly algebra error. I also got the next part wrong.

Let $\lambda > 0$ thus, the ODE becomes $y''+\lambda y = 0$ which implies solutions of the form $y(t) = C_1\cos{\sqrt{\lambda}t}+ C_2\sin{\sqrt{\lambda}t}.$Which would make the derivative $y'(t) = -\sqrt{\lambda}C_1\sin{\sqrt{\lambda}t} + \sqrt{\lambda}C_2\cos{\sqrt{\lambda}t}$. When I apply my boundary conditions, we see that $y(0) = C_1 = 0$ and $y(\pi)-y'(\pi) = 0-C_2 \cos \pi \sqrt{\lambda} = 0$ Now we solve for $\lambda$ to see that $\sqrt{\lambda} pi = \frac{npi}{2}$ which makes $\lambda = \frac{n^2}{4}$ which would make our solutions $y(t) = C \sin {\frac{n}{2}} t$ which is wrong, but I don't quite understand the answer for this one.

The solution I'm given for $\lambda > 0$ is $y(t) = c \sin \sqrt{\lambda_n} t$ where $\tan \sqrt{\lambda_n} \pi = \lambda_n$

Should I start just using determinant to get the solutions to the system of equations? Or am I able to continue down the path as above?

THanks for any help.

2. Aug 8, 2017

### Orodruin

Staff Emeritus
They do not. I also suggest that you use cosh and sinh rather than the exponential functions. It will significantly simplify the boundary condition at x=0.

Careful here. You are assuming lambda to be positive when it is negative and rewriting the differential equation using a different definition of lambda. It would be more consistent to introduce $k>0$ such that $\lambda = -k^2$.

Also double check your boundary condition implementation at $x=\pi$ for the positive case. It is not correct.

3. Aug 8, 2017

### WendysRules

Let $\lambda < 0$ then $y(t) = C_1 \cosh \sqrt{-\lambda} t + C_2 \sinh \sqrt {-\lambda} t$ and $y'(t) = \sqrt{-\lambda} C_1 \sinh \sqrt {-\lambda} t + \sqrt{-\lambda} C_2 \cosh \sqrt{-\lambda} t$ Thus for our boundary conditions, we get the system of equations that looks like $\begin{bmatrix} 1 & 0 \\ \cosh \sqrt{-\lambda} \pi - \sqrt{-\lambda} \sinh \sqrt {-\lambda} \pi & \sinh \sqrt {-\lambda} \pi - \sqrt{-\lambda} \cosh \sqrt{-\lambda} \pi \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}$

If we take the determinant (to ensure nonzero solutions for $C_1, C_2$)we see that $\sinh \sqrt {-\lambda} \pi = \sqrt{-\lambda} \cosh \sqrt{-\lambda} \pi$ So I got this, but now how do I figure out from here what my solution would be? Look for solutions for $\lambda < 0$?

Similarly for $\lambda > 0$ then $y(t) = C_1 \cos \sqrt{\lambda}t + C_2 \sin \sqrt{\lambda} t$ and $y'(t) = \sqrt{\lambda}C_1 \sin \sqrt{\lambda} t + \sqrt{\lambda}C_2 \cos \sqrt{\lambda}t$ so applying our boundary conditions we get the system of equations that looks like
$\begin{bmatrix} 1 & 0 \\ \cos \sqrt{\lambda} \pi + \sqrt{\lambda} \sin \sqrt{\lambda} \pi & \sin \sqrt{\lambda} \pi - \sqrt{\lambda} \cos \sqrt{\lambda} \pi \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}$

If we take the determinant (to ensure nonzero solutions for $C_1, C_2$) we see that $\sin \sqrt{\lambda} \pi - \sqrt{\lambda} \cos \sqrt{\lambda} \pi = 0$ therefore $\sin \sqrt{\lambda} \pi = \sqrt{\lambda} \cos \sqrt{\lambda} \pi$ and now I see where the tan in the answer comes from because if we divide by cos, we see the equation becomes $\tan \sqrt{\lambda} \pi = \sqrt{\lambda}$ so now I want to find solutions for $\lambda > 0$?

Thanks for the help!

Last edited: Aug 8, 2017
4. Aug 9, 2017

### LCKurtz

If you would write your cases as $$\lambda = \mu^2 > 0,~\lambda = 0,~ \lambda = -\mu^2 < 0$$your writing would be much easier without all the square roots. Your last equation would be from the first case with $\tan(\mu\pi) = \mu$. If you plot the graphs of $\tan \pi x$ and $x$, you will see that there are infinitely many positive values of $x$ where they are equal. You can let $\mu_n$ be the values where the graphs cross. Then $\lambda_n = \mu_n^2$ with corresponding eigenfunctions. You can calculate the first few numerically.

5. Aug 15, 2017

### Orodruin

Staff Emeritus
In addition to what @LCKurtz just said, note that the RHS grows without bound. Consequently, as the sine function is bounded by one, the high n values of $\mu_n$ will occur close to the zeros of the cosine function, ie, close to half-integer values.