Special functions¶
Some useful functions.
-
std::complex<double> mrcpp::free_particle_analytical_solution(double x, double x0, double t, double sigma)¶
Free-particle time evolution on real line.
Analytical solution of a one dimensional free-particle movement
\[ \psi(x, t) = \sqrt{ \frac{ \sigma }{ 4it + \sigma } } e^{ - \frac { (x - x_0)^2 }{ 4it + \sigma } } \]where \( t, \sigma > 0 \).- Parameters:
x – [in] space coordinate in \( \mathbb R \).
x0 – [in] \( x_0 \) center of gaussian function at zero time moment.
t – [in] time moment.
sigma – [in] \( \sigma \) width of the initial gaussian wave.
- Returns:
The complex-valued wave function \( \psi(x, t) \) at the specified space coordinate and time.
-
double mrcpp::smooth_compact_function(double x, double a, double b)¶
A smooth compactly supported non-negative function.
Smooth function on the real line \( \mathbb R \) defined by the formula
\[ g_{a,b} (x) = \exp \left( - \frac{b - a}{(x - a)(b - x)} \right) , \quad a < x < b \]and \( g_{a,b} (x) = 0 \) elsewhere.- Parameters:
x – [in] space coordinate in \( \mathbb R \).
a – [in] the left support boundary.
b – [in] the right support boundary.
- Returns:
The non-negative value \( g_{a,b} (x) \) at the specified space coordinate \( x \in \mathbb R \).