Non Linear Eigenvalue problem
I have been trying to solve a *Non linear Eigenvalue problem* using *fsolve and Newton’s iteration method* and have not been successful.
The matrix which I am looking to solve:
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2); 0 0 cos(w) -sin(w)]; (Found in a paper, using it as a practice case)
*My Newton method code:*
%Define intial values and tolerances for the variable
w0=0.1;
tol=2;
maxiter=1000;
w=w0;
wold=w0;
lambda=0.1;
%Start Iteration
for i=1:maxiter
%Define A and B
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2);
0 0 cos(w) -sin(w)];
B=[-2 0 0 0;-0.5*cos(w/2) 0.5*sin(w/2) 0.5*cos(w/2) -0.5*sin(w/2); sin(w/2) cos(w/2) -0.5*sin(w/2) -0.5*cos(w/2);
0 0 sin(w) cos(w)];
C=inv(B);
%Find Eigen value for the intermediate step
beta=eig(C*A);
epsilon=min(abs(beta));
%Update the variable
w=w0+epsilon;
err=abs(epsilon);
wold=w;
if(err<tol)
break;
end
end
*Fsolve code*
function fval=fun4evp(w)
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2);
0 0 cos(w) -sin(w)];
fval=det(A);
end
wsol=fsolve(@(w)fun4evp,0.1);
ThanksI have been trying to solve a *Non linear Eigenvalue problem* using *fsolve and Newton’s iteration method* and have not been successful.
The matrix which I am looking to solve:
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2); 0 0 cos(w) -sin(w)]; (Found in a paper, using it as a practice case)
*My Newton method code:*
%Define intial values and tolerances for the variable
w0=0.1;
tol=2;
maxiter=1000;
w=w0;
wold=w0;
lambda=0.1;
%Start Iteration
for i=1:maxiter
%Define A and B
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2);
0 0 cos(w) -sin(w)];
B=[-2 0 0 0;-0.5*cos(w/2) 0.5*sin(w/2) 0.5*cos(w/2) -0.5*sin(w/2); sin(w/2) cos(w/2) -0.5*sin(w/2) -0.5*cos(w/2);
0 0 sin(w) cos(w)];
C=inv(B);
%Find Eigen value for the intermediate step
beta=eig(C*A);
epsilon=min(abs(beta));
%Update the variable
w=w0+epsilon;
err=abs(epsilon);
wold=w;
if(err<tol)
break;
end
end
*Fsolve code*
function fval=fun4evp(w)
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2);
0 0 cos(w) -sin(w)];
fval=det(A);
end
wsol=fsolve(@(w)fun4evp,0.1);
Thanks I have been trying to solve a *Non linear Eigenvalue problem* using *fsolve and Newton’s iteration method* and have not been successful.
The matrix which I am looking to solve:
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2); 0 0 cos(w) -sin(w)]; (Found in a paper, using it as a practice case)
*My Newton method code:*
%Define intial values and tolerances for the variable
w0=0.1;
tol=2;
maxiter=1000;
w=w0;
wold=w0;
lambda=0.1;
%Start Iteration
for i=1:maxiter
%Define A and B
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2);
0 0 cos(w) -sin(w)];
B=[-2 0 0 0;-0.5*cos(w/2) 0.5*sin(w/2) 0.5*cos(w/2) -0.5*sin(w/2); sin(w/2) cos(w/2) -0.5*sin(w/2) -0.5*cos(w/2);
0 0 sin(w) cos(w)];
C=inv(B);
%Find Eigen value for the intermediate step
beta=eig(C*A);
epsilon=min(abs(beta));
%Update the variable
w=w0+epsilon;
err=abs(epsilon);
wold=w;
if(err<tol)
break;
end
end
*Fsolve code*
function fval=fun4evp(w)
A=[2*w -300 0 0;sin(w/2) cos(w/2) -sin(w/2) cos(w/2); 2*cos(w/2) -2*sin(w/2) -cos(w/2) sin(w/2);
0 0 cos(w) -sin(w)];
fval=det(A);
end
wsol=fsolve(@(w)fun4evp,0.1);
Thanks fsolve, eigenvalue, nonlinear, nonlinear eigenvalue problem MATLAB Answers — New Questions