Download presentation
Presentation is loading. Please wait.
Published byPolly Riley Modified over 9 years ago
1
Eigenvalues of Ordinary Differential Equations Jake Blanchard University of Wisconsin
2
Introduction Finite Difference Techniques Matlab
3
Model Problem A simple eigenvalue problem Solution
4
Finite Difference Solution
5
Choosing a Mesh Divide range 0<x<1 into 8 regions This produces 9 mesh points Boundary conditions eliminate two unknowns We’re left with 7 unknowns (the 7 internal mesh points)
6
Matrix Equation
7
Code n=7; h=1/(n+1); voffdiag=ones(n-1,1); mymat=-2*eye(n)+diag(voffdiag,1)+diag(voffdiag,-1); D=sort(eig(mymat),'descend'); lam=sqrt(-D)/h; check=lam/pi; myint=(1:n)'; plot(myint,check,myint,myint) myerr=abs(check-myint)./(myint); figure semilogy(myint,myerr)
8
Results – n=7
9
Results (error) – n=7
10
Results – n=2000
11
Results (error) – n=2000
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.