- Discretize the Spatial Domain
- Discretize the Equation
- Construct the Matrix Equation
- Solve the Eigenvalue Problem
- Post-Process
time -independent-Schrodinger-like-1D-pde
조회 수: 3 (최근 30일)
이전 댓글 표시
I have [-\nabla^2+ (h*G(x)+H(x)) ] y(x) = h^2 y(x), where, for a range of x values, G(x) and H(x) values are known (not their functions are known). How to solve h and y(x) simultaneously.
댓글 수: 0
답변 (1개)
Amish
2024년 1월 22일
Hi Pritha,
I see that you are looking for a way to solve time-independent Schrödinger-like 1D Partial Differential Equation. Solving the time-independent Schrödinger-like 1D PDE, where "G(x)" and "H(x)" are given as data points rather than as analytical functions, typically requires numerical methods.
The equation you've provided resembles the time-independent Schrödinger equation with a potential "V(x) = hG(x) + H(x)", and you're looking to solve for the eigenvalues "h^2" and corresponding eigenfunctions "y(x)".
Follwing are the high-level steps you might do using the finite difference methods:
You can find a generic MATLAB code for the same below:
% Assuming that the Gx and Hx are vectors containing the values of G(x) and H(x) at discrete points x
N = length(Gx); % Number of points
dx = x(2) - x(1); % Uniform spacing
% Make a tridiagonal matrix for the discretized -nabla^2 operator
main_diag = -2 * ones(N, 1) / dx^2;
off_diag = ones(N-1, 1) / dx^2;
laplacian_matrix = diag(main_diag) + diag(off_diag, 1) + diag(off_diag, -1);
% Add the potential terms to the diagonal
A = laplacian_matrix + diag(h*Gx + Hx);
% Solve the eigenvalue problem
[eigenvectors, eigenvalues] = eig(A);
% Extract eigenvalues and convert them to h^2
h_squared = diag(eigenvalues);
The above code assumes the conditions of a uniform grid and boundary conditions that the wavefunction "y(x)" goes to zero at the boundaries of the domain.
Here are some of the documentation links for your reference:
Hope this helps!
참고 항목
카테고리
Help Center 및 File Exchange에서 Eigenvalue Problems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!