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

In summary: 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 \sq
  • #1
WendysRules
37
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.
 
Physics news on Phys.org
  • #2
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.
 
  • #3
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:
  • #4
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
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.
 

1. How do you solve a boundary value ODE with the given equation?

To solve a boundary value ODE with the equation y''+λy=0, you can use various methods such as the shooting method, finite difference method, or the finite element method. Each method has its own advantages and disadvantages, but they all involve solving the equation numerically by breaking it down into smaller steps.

2. What are the boundary conditions for this type of ODE?

The boundary conditions for this type of ODE typically include the values of the dependent variable (y) at two distinct points, known as the initial and final boundary points. These values are necessary for solving the ODE and finding the particular solution that satisfies the given equation.

3. How does the value of λ affect the solution of the ODE?

The value of λ, also known as the eigenvalue, directly affects the solution of the ODE. It determines the type of solution that can be found, such as a trigonometric or exponential function. Different values of λ will result in different types of solutions, and finding the appropriate value is crucial for solving the ODE.

4. Can numerical methods accurately solve boundary value ODEs?

Yes, numerical methods can accurately solve boundary value ODEs. The accuracy of the solution depends on the method used and the number of steps taken to solve the equation. Generally, the more steps that are taken, the more accurate the solution will be.

5. Are there any real-world applications of solving boundary value ODEs?

Yes, there are many real-world applications of solving boundary value ODEs. Some examples include modeling heat transfer in a rod, predicting the trajectory of a projectile, and analyzing the behavior of electrical circuits. Boundary value ODEs are used in various fields such as physics, engineering, and economics to model and solve real-world problems.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
293
  • Calculus and Beyond Homework Help
Replies
6
Views
268
  • Calculus and Beyond Homework Help
Replies
1
Views
253
  • Calculus and Beyond Homework Help
Replies
2
Views
513
  • Calculus and Beyond Homework Help
Replies
8
Views
207
  • Calculus and Beyond Homework Help
Replies
1
Views
692
  • Calculus and Beyond Homework Help
Replies
2
Views
821
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
791
Back
Top