- #1
axelalma
- 3
- 0
Hello!
I need some help in Mathematica, because I'm newbie in using this program.
I've a kernel for a propagator, what i want to integrate numerically by p (because the problem hasn't got analitical solution) to receive the propagator. Next i want to use that propagator for an initial state and i want to plot the square of the absolute value of the obtained wavefunction around the pole, so that the time (in my code this is t1) will run over an interval, so it would be a running animation.
My code is here, where psi0[x] is the initial state, k1[x,x1,t,t1,p] is the kernel of the propagator and t1 runs over the interval {0,10}:
Animate[Plot[Abs[NIntegrate[psi0[x1]*k1[x, x1, 0, t1, p], {x1, -Infinity, Infinity}, {p, 0, Infinity}, MaxRecursion -> 10]]^2, {x, -1, 1}, PlotPoints -> 10, MaxRecursion -> 10], {t1, 0, 10}, AnimationRunning -> False]
It isn't working, that's why i need help.
Sorry, my language skills are low.
Thank you in anticipation
I need some help in Mathematica, because I'm newbie in using this program.
I've a kernel for a propagator, what i want to integrate numerically by p (because the problem hasn't got analitical solution) to receive the propagator. Next i want to use that propagator for an initial state and i want to plot the square of the absolute value of the obtained wavefunction around the pole, so that the time (in my code this is t1) will run over an interval, so it would be a running animation.
My code is here, where psi0[x] is the initial state, k1[x,x1,t,t1,p] is the kernel of the propagator and t1 runs over the interval {0,10}:
Animate[Plot[Abs[NIntegrate[psi0[x1]*k1[x, x1, 0, t1, p], {x1, -Infinity, Infinity}, {p, 0, Infinity}, MaxRecursion -> 10]]^2, {x, -1, 1}, PlotPoints -> 10, MaxRecursion -> 10], {t1, 0, 10}, AnimationRunning -> False]
It isn't working, that's why i need help.
Sorry, my language skills are low.
Thank you in anticipation