- #1

- 45

- 0

## Main Question or Discussion Point

Hello All,

Thanks in advance for any advice.

I'm trying to evaluate whether or not a given wavefunction is a valid solution to the time-dependent schroedinger wave equation, the bottom line being that I want to check that two functions are equal to each other at all points (within a tolerance), and I'm not sure if I'm going about it the right way.

I've defined a function, and then want to evaluate two other functions that act on it, so I have:

My questions are:

1) am I taking the right approach to determining what I want to?

2) If so, how can I check for the equality of these two functions?

For (2), I tried H==T, and it just spit out the functions back, and I tried plotting H and T and showing that they are the same, but I just flatlined on both of them, so I'm not sure if my code is wrong or if those approaches are ineffective.

Thanks again!

Thanks in advance for any advice.

I'm trying to evaluate whether or not a given wavefunction is a valid solution to the time-dependent schroedinger wave equation, the bottom line being that I want to check that two functions are equal to each other at all points (within a tolerance), and I'm not sure if I'm going about it the right way.

I've defined a function, and then want to evaluate two other functions that act on it, so I have:

Code:

```
(*define wavefunction*)
h = 6.626*10^(-34); w = 10;
psi[x_, t_] := (m*w/Pi/h)^(1/4)*
Exp[(-m*w/2/h)*(x^2 + (a^2)/2*(1 + Exp[-2*I*w*t]) + I*h*t/m -
2*a*x*Exp[-i*w*t])];
(*evaluate hamiltonian operation on psi*)
H = (m/2)*Derivative[2, 0][psi][x, t] + (m/2)*w^2*x^2*psi[x, t];
(*evaluate time-depedence*)
T = I*h*Derivative[0, 1][psi][x, t];
```

1) am I taking the right approach to determining what I want to?

2) If so, how can I check for the equality of these two functions?

For (2), I tried H==T, and it just spit out the functions back, and I tried plotting H and T and showing that they are the same, but I just flatlined on both of them, so I'm not sure if my code is wrong or if those approaches are ineffective.

Thanks again!