Solving Boundary Value ODE: y''+λy=0

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 3K views
WendysRules
Messages
35
Reaction score
3

Homework Statement


## y''+\lambda y = 0 ; y(0) = 0, y(\pi)-y'(\pi) = 0##

Homework Equations

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.
 
on Phys.org
WendysRules said:
The two positive square root terms cancel
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.

WendysRules said:
Let λ<0λ<0 \lambda < 0 thus, the ODE becomes y
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.
 
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:
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.