time -independe​nt-Schrodi​nger-like-​1D-pde

조회 수: 4 (최근 30일)
pritha
pritha 2024년 1월 18일
댓글: pritha 2024년 2월 1일
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.

답변 (1개)

Amish
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:
  1. Discretize the Spatial Domain
  2. Discretize the Equation
  3. Construct the Matrix Equation
  4. Solve the Eigenvalue Problem
  5. Post-Process
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!
  댓글 수: 2
pritha
pritha 2024년 1월 22일
Thanks for you reply Amish. I'm getting "Unrecognized function or variable 'h'." while running. Could you suggest how to solve this?
pritha
pritha 2024년 2월 1일
Here eigen values are 'h' not 'h^2' and it is also multiplied with the potential G(x). So it cant be extracted simply from eig(A). Could you please help me out?

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

카테고리

Help CenterFile Exchange에서 General PDEs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by