# Tag Info

2

Usually, not always but usually, even if both $A$ and $x$ are sparse, $Ax$ is not. Even when it is, it is denser than $x$. If you consider something like $e^Ax$, which can be rewritten as $(I+A+A^2/2+\dots)x$, there is no guarantee that it will have the same sparsity pattern or the same number of nonzeros as $x$. Which means that either scipy would have to ...

4

If you simply want to compute the convolution you can construct a Kernel matrix for computation with arbitrary arrangements of Gaussians that do not lie on grid points of the domain where you want to compute the convolution. To do that one can employ an "outer sum". In python its given as done here: https://stackoverflow.com/questions/33848599/...

5

I think that the main problem might be with the solver you are using. The Hamiltonian (matrix) in this case is Hermitian, it is even symmetric since it is purely real. You could use eigh instead of eig to take advantage of this. Furthermore, you are not removing only the first and last points but intervals of size 1 at each end. Following, I show you a ...

3

Your particle is a rounded proton (mass m = 2e-27 kg instead of 1.672e-27 kg). The equation of motion is $$\dot x=v,~~~ m\dot v = q\,v\times B,$$ where $B=(0,0,B_z)$ with $B_z=4T=4N/(m\,A)$ and $q=1e=1.602·10^{-19} C$, $C=A\,s$ This then gives for the acceleration m=2e-27 e_charge = 1.6e-19 q=+1*e_charge Bz = 4 ax = q/m*vy*Bz; ay = -q/m*vx*Bz; az = 0 For ...

Top 50 recent answers are included