Questions tagged [python]
For mathematical questions about Python; questions purely about the language, syntax, or runtime errors are off-topic here and would likely be better received on Stack Overflow.
971 questions
0
votes
0
answers
18
views
Parametrization of Polytope to Make it Full Dimensional
I have a question regarding polytopes. I have a constraint matrix and a vector. This matrix has a set amout of equalities on top and then the rest is inequalities. I know the number of equalities.
As ...
-1
votes
1
answer
107
views
Gaussian elimination modulo $4$ [closed]
Does anyone know how to perform Gaussian elimination modulo $4$? Are there any ready-to-use code snippets or relevant websites available? I find that there are almost no existing code implementations ...
0
votes
1
answer
48
views
rotation of 3D circle arc: confusing outputs
I have a 3D circle arc defined by
$r\begin{bmatrix}
\cos(\theta)\cos(\phi)\\
\sin(\theta)\cos(\phi)\\
\sin(\phi)
\end{bmatrix}
$
where $r$ is the radius of the circle, $\theta$ the azimuth angle, and $...
4
votes
2
answers
280
views
Difference between theory and simulation of statistic of a complex hypothesis for a Gaussian variable sequence
I am puzzled by a question on the statistics complex hypothesis testing, namely, there is a difference between particular theoretical PDF of a statistic and the simulated one, and I have no idea why ...
-2
votes
1
answer
159
views
What are the axioms of Python programming language? [closed]
My understanding is that Python is "Turing complete" which mean they work on the same axioms (or by first order logic equivalent) as a theoretical Turing machines (https://en.wikipedia.org/...
1
vote
1
answer
90
views
Visualizing the winding index of complex curves (sagemath, matplotlib) [closed]
I'm working on visualizing the winding number of complex curves using SageMath/Matplotlib. At this point, I already have the curve plotted:
Plotted lissajous curve
Colorization of different regions of ...
-3
votes
1
answer
72
views
Formula for making a bell curve looking graph given height, width, and area [closed]
I need to create a bell curve looking graph on a $X,Y$ Plot. I need a formula wherein it will return to me the corresponding $Y\!$-axis value given a $X$ value, the graph will have $3$ constant ...
3
votes
1
answer
123
views
Check the Riemann surface of complex function $\sqrt z$
I am trying to use Python to plot the Riemann surface of the multi-valued complex function $\sqrt z$. Wikipedia gives such a plot on its page HERE, and I reproduce ...
0
votes
1
answer
52
views
Why is my Gauss-Jordan inverse calculation incorrect despite consistent row operations?
I attempted to compute the inverse of the matrix
$$
\begin{bmatrix}
1 & 1 & 1 \\
5 & 0 & 2 \\
5 & 2 & 9
\end{bmatrix}
$$
using elementary row transformations. I combined it ...
0
votes
1
answer
128
views
Get different geographical distances on earth (modeled as ellipsoid)
Using Vincenty's formulae with
$$P_{\text{Frankfurt}}=(50.11552, 8.68417)$$
$$P_{\text{Rio}}=(-22.9083, -43.1964)$$
and get the shortest geographical distance (World Geodetic System)
$$s\approx 9564....
0
votes
0
answers
110
views
Logarithm of $\Gamma(z)$- What's wrong?
I was attempting to calculate the logarithm of $\Gamma(z)$ using the common (I guess) formula:
$$\log\Gamma(z)=-\gamma z – \log(z) + \sum_{n=1}^\infty \left[ \frac{z}{n} – \log(1 + \frac{z}{n}) \right]...
0
votes
0
answers
38
views
solving an initial boundary value problem with the Schrodinger equation and the Dirichlet condition using the discrete Fourier transform(FFT)
The boundary value problem is given:
\begin{cases}
\frac{\partial E}{\partial z} = \alpha\frac{\partial^{2}E }{\partial x^{2}}, -X/2\lt
x\lt X/2, \alpha \in \mathbb{C}\\
E(0,z)=0, E(X,z)=0\\
E(x,0)=...
1
vote
1
answer
175
views
Get uniformly distributed points on the unit N-sphere by sampling N spherical coordinates (instead of N+1 cartesian coordinates)
Note to moderators : this question have not been answered in another post yet, because I want to use spherical coordinates.
In an optimization algorithm, I have a categorical variable with N+1 ...
1
vote
1
answer
105
views
Math art: Introducing sinusoidal pixel shifts
I'm working on some math-inspired art. The general premise is to establish a grid corresponding to pixel locations and for each square defined by points $(x_1, y_1), (x_2, y_2)$, determine the RGB ...
0
votes
1
answer
126
views
Gram-Schmidt for arbitrary matrix
I am learning about the Gram-Schmidt operation and applying it to the following square matrix:
$$A = \begin{bmatrix} a & 1-a & 0 & 0 \\ 1-a & -a & 0 & 0 \\ 0 & 0 &-a &...