Finding eigenvalues with spectral technique: basis functions fail

Click For Summary

Discussion Overview

The discussion revolves around finding eigenvalues of a specific ordinary differential equation (ODE) using spectral techniques and basis functions. Participants explore the implications of choosing different basis functions and the completeness of these functions in spanning the solution space. The conversation includes technical reasoning regarding the formulation of matrix equations and the relationship between the chosen basis and the exact eigenfunctions.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes an attempt to find eigenvalues using basis functions defined as ##\phi_i = (1-x)x^i## and questions why starting from ##i=2## leads to incorrect solutions.
  • Another participant asks about the conditions under which the inner product matrix ##B_{ij}## becomes zero, indicating a potential misunderstanding in the formulation.
  • Some participants suggest considering the true eigenfunctions of the ODE to determine the necessary number of basis functions required to represent the exact eigenfunctions.
  • There is a discussion about the need for a complete basis and the implications of choosing to omit certain basis functions, with one participant expressing confusion about how to know which terms to include without the exact solution.
  • Another participant points out that using a finite number of basis functions may not yield a non-zero solution unless certain conditions are met, prompting a request for clarification on the intended approach.
  • One participant shares their experience of obtaining accurate eigenvalues when using a complete set of basis functions compared to a partial set, raising the question of how to validate results without an analytic solution for comparison.
  • Participants express uncertainty about the meaning of "correct" solutions and how to interpret the results when they do not match the expected eigenvalues.

Areas of Agreement / Disagreement

Participants generally agree on the importance of using a complete basis for accurate results, but there is disagreement on how to determine which basis functions are necessary and the implications of omitting certain terms. The discussion remains unresolved regarding the best approach to ensure the chosen basis spans the solution space adequately.

Contextual Notes

There are limitations in the discussion regarding the assumptions made about the completeness of the basis functions and the dependence on the definitions of the eigenfunctions. The conversation reflects a range of mathematical reasoning and varying levels of understanding among participants.

member 428835
Hi PF!

I'm trying to find the eigenvalues of this ODE $$y''(x) + \lambda y = 0 : u(0)=u(1)=0$$ by using the basis functions ##\phi_i = (1-x)x^i : i=1,2,3...n## and taking inner products to formulate the matrix equation $$A_{ij} = \int_0^1 \phi_i'' \phi_j \, dx\\ B_{ij} = \int_0^1 \phi_i\phi_j\,dx :\\A+\lambda B = 0 .$$
Solving ##A+\lambda B = 0## is direct; it's a linear algebraic equation. We can compare our approximate solution to the exact solution ##(i \pi)^2 : i=1,2,3...## In this way, I know if a solution is correct or not.

Understanding the above, why is it if I choose the basis functions to begin at ##i=2## I do not get the correct solution? I assume in this case the basis does not span the solution's function space, but can someone elaborate? How do I know if a given basis function spans the solution space?
 
Last edited by a moderator:
Physics news on Phys.org
Why are Bij =0??
 
I second hutch's question. For your question, I suggest you consider what the true eigenfunctions are for this ODE and how many functions in your basis you need to represent even one of the exact eigenfunctions.
 
hutchphd said:
Why are Bij =0??
My bad, clearly a typo!

Haborix said:
For your question, I suggest you consider what the true eigenfunctions are for this ODE and how many functions in your basis you need to represent even one of the exact eigenfunctions.
I appreciate your feedback :oldbiggrin: But this doesn't answer my question. If I don't know the exact eigenfuctions, how would I know to include the first term, ##\phi_1##?
 
Because you need a complete basis in general. What prompts the question? Frankly, I don't see the point here. Why do you think you can pick and choose?
 
hutchphd said:
Because you need a complete basis in general. What prompts the question? Frankly, I don't see the point here. Why do you think you can pick and choose?
You're coming across a little rude, and I don't know why. But we all have bad days, so it's okay, and here is some background, and also why I didn't say complete (because obviously I'm out of my league if I try to use that word).

If anyone reading this I really don't think you need the background, as the actual problem I'm working on is very complicated. However, the simple one I've manufactured in the question stem should be sufficient to help me out.

Does anyone know why we need to include the ##\phi_1## term? Without knowing the exact solution, how would I know that I'm missing a term?
 
I am having some trouble following. It looks like you're trying to find a solution to your ODE that is in the space of functions spanned by ##\phi_1,\ldots,\phi_n##, but (unless ##\lambda=0##) there won't be a nonzero solution in the span. Perhaps you don't mean to include only finite many ##\phi_i## and want to allow infinite sums? Could you clarify?
 
Infrared said:
I am having some trouble following. It looks like you're trying to find a solution to your ODE that is in the space of functions spanned by ##\phi_1,\ldots,\phi_n##, but (unless ##\lambda=0##) there won't be a nonzero solution in the span. Perhaps you don't mean to include only finite many ##\phi_i## and want to allow infinite sums? Could you clarify?
There is a non-zero solution though. Just using ##n=1## recovers ##\lambda = 10##, which is close to ##(1\cdot\pi)^2##. And if we increase the number of terms we recover higher eigenvalues and accuracy of each. Or am I not understanding you?

And yes, I'm only using finitely many ##\phi_i##. If I use ##i = 2:5## I get a bad solution, but if I use ##i = 1:4## I get a good solution. I know it's good because it matches the exact. But if I didn't have the exact solution to compare, how would I know what is right?
 
joshmccraney said:
You're coming across a little rude, and I don't know why.
Sorry about the rude (didn't intend it) but i am still not quite sure what you are asking (and I am not a mathematician).
joshmccraney said:
And yes, I'm only using finitely many ϕiϕi\phi_i. If I use i=2:5i=2:5i = 2:5 I get a bad solution, but if I use i=1:4i=1:4i = 1:4 I get a good solution. I know it's good because it matches the exact. But if I didn't have the exact solution to compare, how would I know what is right?
For instance I don't know what "right" means in the above...What do you mean "matches"...not exactly surely?
 
  • #10
hutchphd said:
Sorry about the rude (didn't intend it) but i am still not quite sure what you are asking (and I am not a mathematician).

For instance I don't know what "right" means in the above...What do you mean "matches"...not exactly surely?
Thanks for saying that, and I'm sorry for the ambiguity. The the first four analytic eigenvalues are $$\lambda_{1-4} =
{
{9.8696},
{39.4784},
{88.8264},
{157.914}
}.$$

When I compute the matrices using ##\phi_{1-4}## I recover $$\lambda _{1-4} =
{
{9.86975},
{39.5016},
{102.13},
{200.498}
}$$

which looks pretty good. However, when I compute the matrices using ##\phi_{2-5}## I recover $$\lambda _{1-4} =
{
{10.4331},
{41.3846},
{92.123},
{244.059}
}$$ which is clearly wrong. Without an analytic solution to compare to, how would I know which computed eigenvalues are correct?
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K