Singular Jacobian with BVP4c used to solve eigenvalue problem

조회 수: 16 (최근 30일)
Saeid
Saeid 2018년 6월 16일
댓글: Merrill Yeung 2022년 2월 3일
I have been trying to solve an eigenvalue problem of the form:
y"+y/x+(Lambda^2)*(1-x^2)y=0
which is a Sturm-Liouville problem that occurs e.g. in the case of heat convection in tubes and channels. The task here is to find the eigenvalues Lambda in order to describe the temperature in the fluid.
As I understand one way to solve this problem is by intorudcing the parameter Lambda into the definition of the differential equation:
function dydx=evp1(x,y,lambda);
dydx=[y(2)
-y(2)/x-lambda*(1-x^2)*y(1)];
end
function res=evp1bc1(ya,yb,lambda);
res=[ya(1)-1;yb(1);ya(2)];
end
function v=evp1Guess1(x);
v=[cos(x);sin(x)];
end
clear all; close all; echo on; format long;
a=0; b=1; N=10; lambda=0.5;
solInit1=bvpinit(linspace(a,b,N),@evp1Guess1,lambda);
solN1=bvp4c(@evp1,@evp1bc1,solInit1);
This short and elegant code by Zaitsev (in the Book: Handbook of Ordinary DIfferential Equations) finds the eigenvalues for simpler eigenvalue problems (e.g. y"+Lambda.y=0). However, for my problem it creates an error message referring to a singular Jacobian which I assume is due to the presence of the y(1)/x term in the equation at x=0. Is there a way to get around this problem?
  댓글 수: 3
Saeid
Saeid 2019년 11월 16일
You're right, the problem can indeed have an infinite number of eigenvalues. What I eventually came up with may not be the most efficient/professional solution but I had to define a vector of initial guesses, then ran a loop over this vector and set those guesses as the initital guess of Lambda for the ODE, then solved it for every initial guess. Many of the eigenvalues, e.g., from the guesses number say, 25, 26, and 27, will be the same, and you need to to eliminate the repeated ones and store them only once. As I said, not very elegant, but it did the job!
However, you can also use PDEPE which is a far more powerful tool, and after finding it I kind of lost interest in the eigenvalue game.
Tanya Sharma
Tanya Sharma 2019년 12월 4일
Hello Saeid,
Actually finding the eigenvalues is very important in my analysis. Can you share the structure of the loop for your guess vector. It may help me as I am stuck with only one eigenvalue.
Thanks in advance.

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2018년 6월 18일
Use a=(a small value) instead of a=0.
Best wishes
Torsten.
  댓글 수: 1
Merrill Yeung
Merrill Yeung 2022년 2월 3일
This simple example illustrates how to solve a BVP with an unkown parameter (here actually is an eigenvalue problem). Usually for a 2rd order ODE, only two boundary conditions are avalable. My question is how to use bvp4v to solve problems like that. (This example needs 3 boundary conditions.)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by