# Questionable ODE Solutions

1. Feb 18, 2014

### AntSC

Find the eigenvalues λ, and eigenfunctions u(x), associated with the following homogeneous ODE problem:

$${u}''\left ( x \right )+2{u}'\left ( x \right )+\lambda u\left ( x \right )=0\; ,\; \; u\left ( 0 \right )=u\left ( 1 \right )=0$$

Solution:

Try $u\left ( x \right )=Ae^{rx}$, which gives roots $r=-1\pm \sqrt{1-\lambda }$. Solution is altered with $\lambda <1\; ,\; \; \lambda =1\; ,\; \; \lambda >1$

For the first case $\lambda <1$:

General solution:
$$u\left ( x \right )=Ae^{\left ( -1+\sqrt{1-\lambda } \right )x}+Be^{\left ( -1-\sqrt{1-\lambda } \right )x}$$
$$u\left ( x \right )=C\cosh \left ( -1+\sqrt{1-\lambda } \right )x+D\sinh \left ( -1-\sqrt{1-\lambda } \right )x$$

Applying boundaries: (this is where my question lies - how to correctly apply BCs)

$u\left ( 0 \right )=0 \; \; \Rightarrow \; \; C+D=0$ (some cases i've seen the conclusion that only $C=0$). Do i assume that as $\cosh$ is never zero that $C=0$ and therefore it must be that $D=0$. Or do i only take $C=0$ and then apply the second BC to see what happens to $D$?
The latter (assuming $C=0$) gives $D\sinh \left ( -1-\sqrt{1-\lambda } \right )=0$. So either $D=0$ or $\sinh \left ( -1-\sqrt{1-\lambda } \right )=i\pi n$.

I'm confused by the rules for the BCs. Can anyone point out how to proceed? Thanks

Last edited: Feb 18, 2014
2. Feb 18, 2014

### ehild

What does (x) mean? Is it the independent variable, and λ is also function of x, or the whole equation is multiplied by x, and λ is a constant?

ehild

3. Feb 18, 2014

### Simon Bridge

To apply a BC u(x=a)=b, you take the general expression for u(x), and everywhere you see an "x" you write in an "a", and at the end of the line you write "=b".

In your case, for u(0)=0 you write down:
$$C\cosh (-1+\sqrt{1-\lambda})(0)+D\sinh (-1-\sqrt{1-\lambda})(0) = 0$$ ... and simplify.

You don't need to make assumptions - you know the values of the cosh and sinh parts at x=0 and if you don't you can look them up.

Then repeat for u(1)=0 ...

Note: I had the same puzzle as ehild over $\lambda(x)$ ... I assumed it was a typo considering the solution and focussed on the answer to your question.
Have you checked your general solution against the DE?

Last edited: Feb 18, 2014
4. Feb 18, 2014

### AntSC

Sorry, that was meant to be λu(x). I've corrected the original post.

5. Feb 18, 2014

### AntSC

Thanks Simon.
With the first BC i'm seeing that the result doesn't actually tell me anything about the coefficients as they're multiplied by zero. Is that correct? So i still know nothing about C and D. Assuming i got some kind of positive result from the first BC how does that impact on use of the second?. For instance if i got C=0 then do i ditch the first term in the general solution when i use the second BC?

6. Feb 18, 2014

### ehild

No need to complicate the solution with cosh and sinh.

With the notation a=√(1-λ)>0, the general solution is u(x)=e-x(Aeax+Be-ax)

At x=0, u(0)=A+B=0 --->B=-A

At x=1, u(1)=e-1(Aea+Be-a)=0---> A(ea-e-a)=0

Is it possible if a>0??

ehild

7. Feb 18, 2014

### HallsofIvy

Staff Emeritus
A lot of people consider cosh and sinh to be less complicated than $e^x$ and $e^{-x}$! Especially when one of the boundary conditions is at x=0. cosh(0)= 1 and sinh(0)= 0.

8. Feb 18, 2014

### AntSC

Ok. I'm happy with that. So $A\left ( e^{a}-e^{-a} \right )=0$ gives $a=i\pi n$ and we can get the eigenvalues from there $\lambda = 1-\pi ^2 n^2$

So, how do i write the general solution now, given that we haven't found anything out about the coefficients A and B. Would it be, $$u\left ( x \right )=Ae^{i\pi n}-Be^{-i\pi n}$$

You wrote
Did you mean a<0?

9. Feb 18, 2014

### ehild

I mean a>0 which means λ<1. Is it possible to fulfil the BC-s with λ<1? As you started to discuss that case.

And yes, you can get a solution zero at both boundaries when λ>1, that is, √(1-λ) is imaginary.

By the way, your formula with the cosh and sinh is not correct. You should have written
$$u(x)=e^{-x}(C\cosh(\sqrt{1-\lambda}x)+Dsinh(\sqrt{1-\lambda}x)$$

ehild

Last edited: Feb 18, 2014
10. Feb 18, 2014

### AntSC

Sorry, weren't we just doing the case for λ<1?

11. Feb 18, 2014

### pasmith

That should be
$$u(x) = Ce^{-x} \cosh((1-\lambda)^{1/2}x) + De^{-x} \sinh((1 - \lambda)^{1/2}x)$$

The solution to the eigenvalue problem $v'' + \mu v = 0$ with $v(0) = v(1) = 0$ is $\mu_n = n^2\pi^2$ with $v_n(x) = \sin(n\pi x)$. This is relevant to your problem, because the substitution $u(x) = e^{-x} v(x)$ reduces your ODE to
$$v'' + (\lambda - 1)v = 0$$
with $v(0) = v(1) = 0$.

12. Feb 19, 2014

### AntSC

Thanks for that.
When we apply the first boundary u(0)=0 doesn't that yield that C=D=0?

13. Feb 19, 2014

### ehild

When λ<1
at the first boundary, x=0, $u(0)=C\cosh(0)=C\rightarrow C=0$
at the second boundary,x=1, $u(1)=D\sinh(\sqrt{1-\lambda})=0 \rightarrow D=0$

ehild

14. Feb 20, 2014

### AntSC

Why is the first boundary not $u(0)=C\cosh(0)+D\sinh(0)\rightarrow C=D=0$?
This is what i don't understand. Someone else was also telling me that the boundaries are applied to find a result for one coefficient at a time. Why is this?

15. Feb 20, 2014

### pasmith

$\sinh(0) = 0$, so $D \sinh(0) = 0$ for any $D$.

16. Feb 20, 2014

### Simon Bridge

Because that would be incorrect algebra. The relationship you get is not C=D.

Since sinh(0)=0, the expression collapses to u(0)=C. That's just normal algebra.
You also know that u(0)=0, therefore C=0. Notice how, by itself, this tells you nothing about the value of D. Which is why you need another relation.

If, however, the expression was more like u(x)=Ccosh(x)+D(sinh(x)-1)
then u(0)=0 would get you 0=C-D so that C=D.
But that is not what you have. Not even close.

Exactly what he said:
Also think about how simultaneous equations work.
This is the same thing.

17. Feb 21, 2014

### AntSC

Ok, just to be really clear... As a result of the boundary conditions we have
$$u(0)=0 \Rightarrow C\cosh(0)+D\sinh(0)=0$$and
$$u(1)=0 \Rightarrow C\cosh \left ( -1+\sqrt{1-\lambda } \right )+D\sinh \left ( -1-\sqrt{1-\lambda } \right )=0$$
I understand your point about solving simultaneously but how to we infer, for the first boundary, that only C=0? Given that $\sinh (0)=0$, surely then D=0 also. So $\cosh (0)$ is undefined and $\sinh (0)=0$ so the resultant equation for $u(0)=0$ is $0=0$. Therefore both C and D must be zero???

18. Feb 21, 2014

### ehild

the second formula is wrong. It should be

$$u(x)=e^{-x}(C\cosh(\sqrt{1-\lambda}x)+Dsinh(\sqrt{1-\lambda}x))$$

ehild

Last edited: Feb 21, 2014
19. Feb 21, 2014

### AntSC

Can you show me how this is wrong? I don't get it.

20. Feb 21, 2014

See Post #11

ehild